/* Generated by Cython 3.0.7 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "/io/cuda/include/cuda",
            "/io/cuda/include/cuda.h",
            "/io/cuda/include/cudaProfiler.h"
        ],
        "extra_compile_args": [
            "-std=c++14",
            "-fpermissive",
            "-Wno-deprecated-declarations",
            "-D _GLIBCXX_ASSERTIONS",
            "-fno-var-tracking-assignments",
            "-O3"
        ],
        "include_dirs": [
            "cuda",
            "/opt/conda/conda-bld/cuda-python_1705509865348/_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/include"
        ],
        "language": "c++",
        "library_dirs": [
            "/opt/conda/conda-bld/cuda-python_1705509865348/_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.9/site-packages",
            "/opt/conda/conda-bld/cuda-python_1705509865348/_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.ccuda",
        "sources": [
            "cuda/ccuda.pyx"
        ]
    },
    "module_name": "cuda.ccuda"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#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 < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
#define __PYX_EXTRA_ABI_MODULE_NAME "limited"
#else
#define __PYX_EXTRA_ABI_MODULE_NAME ""
#endif
#define CYTHON_ABI "3_0_7" __PYX_EXTRA_ABI_MODULE_NAME
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x030007F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !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
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 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_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 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(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #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_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #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(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #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
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #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_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #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
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 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_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef 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
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #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 1
  #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 !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#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(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #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_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #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 short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #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
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

#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 ==(const U& other) const { return *ptr == other; }
    template<typename U> bool operator !=(const U& other) const { return *ptr != other; }
    template<typename U> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
    template<typename U> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
  private:
    T *ptr;
};

#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_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, 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)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, 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 *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
        PyObject *version_info; // borrowed
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
        minor_version = 11; // we don't yet need to distinguish between versions > 11
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
    #ifndef CO_OPTIMIZED
    #define CO_OPTIMIZED 0x0001
    #endif
    #ifndef CO_NEWLOCALS
    #define CO_NEWLOCALS 0x0002
    #endif
    #ifndef CO_VARARGS
    #define CO_VARARGS 0x0004
    #endif
    #ifndef CO_VARKEYWORDS
    #define CO_VARKEYWORDS 0x0008
    #endif
    #ifndef CO_ASYNC_GENERATOR
    #define CO_ASYNC_GENERATOR 0x0200
    #endif
    #ifndef CO_GENERATOR
    #define CO_GENERATOR 0x0020
    #endif
    #ifndef CO_COROUTINE
    #define CO_COROUTINE 0x0080
    #endif
#elif PY_VERSION_HEX >= 0x030B0000
  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, 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) {
    PyCodeObject *result;
    PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);  // we don't have access to __pyx_empty_bytes here
    if (!empty_bytes) return NULL;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
    Py_DECREF(empty_bytes);
    return result;
  }
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, 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
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef CO_COROUTINE
  #define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
  #define CO_ASYNC_GENERATOR 0x200
#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 Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 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_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_MAJOR_VERSION >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if __PYX_LIMITED_VERSION_HEX < 0x030900B1
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#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_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_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_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#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 CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#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 PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || 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 > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
#else
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif 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)         ((int)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, (Py_UCS4) 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) ? 65535U : 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((int)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] = (Py_UNICODE) 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
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef PyUnicode_Contains
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#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
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_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_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
#endif
#if PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#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 __Pyx_Py3Int_Check(op)       PyLong_Check(op)
  #define __Pyx_Py3Int_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
#else
  #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
  #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
#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 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; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
    #define __PYX_EXTERN_C extern "C++"
#endif

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

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

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#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_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __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)
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
{
    const wchar_t *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
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);
}
#endif
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#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
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else  // Py < 3.12
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
#include <string.h>
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] = (char) 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
#include <string.h>
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; }

#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

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

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

/* #### Code section: numeric_typedefs ### */

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

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

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

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

/* "cuda/ccuda.pxd":2361
 * 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":2363
 * ctypedef unsigned long long VdpGetProcAddress
 * 
 * ctypedef uint32_t VdpVideoSurface             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpOutputSurface
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpVideoSurface;

/* "cuda/ccuda.pxd":2365
 * ctypedef uint32_t VdpVideoSurface
 * 
 * ctypedef uint32_t VdpOutputSurface             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpOutputSurface;
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

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

/* "cuda/ccuda.pxd":2168
 *     ctypedef CUoutput_mode_enum CUoutput_mode
 * 
 * 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":2174
 * 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":2180
 * 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":2324
 * ctypedef CUeglStreamConnection_st* CUeglStreamConnection
 * 
 * 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":2331
 * 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":3267
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil
 * 
 * cdef enum: CUDA_VERSION = 12040             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_VERSION = 0x2F08
};

/* "cuda/ccuda.pxd":3269
 * cdef enum: CUDA_VERSION = 12040
 * 
 * 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":3271
 * 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":3273
 * cdef enum: CU_STREAM_LEGACY = 1
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_PER_THREAD = 2
};

/* "cuda/ccuda.pxd":3275
 * cdef enum: CU_STREAM_PER_THREAD = 2
 * 
 * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000
};

/* "cuda/ccuda.pxd":3277
 * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536
 * 
 * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_COND_ASSIGN_DEFAULT = 1
};

/* "cuda/ccuda.pxd":3279
 * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1
 * 
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0
};

/* "cuda/ccuda.pxd":3281
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0
 * 
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1
};

/* "cuda/ccuda.pxd":3283
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1
 * 
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2
};

/* "cuda/ccuda.pxd":3285
 * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 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":3287
 * 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":3289
 * 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":3291
 * 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":3293
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
};

/* "cuda/ccuda.pxd":3295
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
};

/* "cuda/ccuda.pxd":3297
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
};

/* "cuda/ccuda.pxd":3299
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13
};

/* "cuda/ccuda.pxd":3301
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13
 * 
 * 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":3303
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
};

/* "cuda/ccuda.pxd":3305
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_PRIORITY = 8
};

/* "cuda/ccuda.pxd":3307
 * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
};

/* "cuda/ccuda.pxd":3309
 * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
};

/* "cuda/ccuda.pxd":3311
 * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_PORTABLE = 1
};

/* "cuda/ccuda.pxd":3313
 * 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":3315
 * 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":3317
 * 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":3319
 * 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":3321
 * 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":3323
 * 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":3325
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8
 * 
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
};

/* "cuda/ccuda.pxd":3327
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
 * 
 * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TENSOR_MAP_NUM_QWORDS = 16
};

/* "cuda/ccuda.pxd":3329
 * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16
 * 
 * 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":3331
 * 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":3333
 * 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":3335
 * 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":3337
 * 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":3339
 * 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":3341
 * 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":3343
 * 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":3345
 * 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":3347
 * 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":3349
 * 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":3351
 * 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":3353
 * 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":3355
 * 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":3357
 * 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":3359
 * 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":3361
 * 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":3363
 * 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":3365
 * 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":3367
 * 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":3369
 * 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":3371
 * 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":3373
 * 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":3375
 * 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":3377
 * 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":3379
 * 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":3381
 * 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":3383
 * 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":3385
 * 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":3387
 * 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":3389
 * 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":3391
 * cdef enum: CU_DEVICE_CPU = -1
 * 
 * cdef enum: CU_DEVICE_INVALID = -2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: RESOURCE_ABI_VERSION = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_INVALID = -2L
};

/* "cuda/ccuda.pxd":3393
 * cdef enum: CU_DEVICE_INVALID = -2
 * 
 * cdef enum: RESOURCE_ABI_VERSION = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48
 */
enum  {
  __pyx_e_4cuda_5ccuda_RESOURCE_ABI_VERSION = 1
};

/* "cuda/ccuda.pxd":3395
 * cdef enum: RESOURCE_ABI_VERSION = 1
 * 
 * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48             # <<<<<<<<<<<<<<
 * 
 * cdef enum: MAX_PLANES = 3
 */
enum  {
  __pyx_e_4cuda_5ccuda_RESOURCE_ABI_EXTERNAL_BYTES = 48
};

/* "cuda/ccuda.pxd":3397
 * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48
 * 
 * cdef enum: MAX_PLANES = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295
 */
enum  {
  __pyx_e_4cuda_5ccuda_MAX_PLANES = 3
};

/* "cuda/ccuda.pxd":3399
 * 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":2172
 *     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":2178
 *     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":2297
 *     CU_EGL_COLOR_FORMAT_MAX = 114
 * 
 * ctypedef CUeglColorFormat_enum CUeglColorFormat             # <<<<<<<<<<<<<<
 * 
 * cdef union anon_union14:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum __pyx_t_4cuda_5ccuda_CUeglColorFormat;

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

/* "cuda/ccuda.pxd":2303
 *     void* pPitch[3]
 * 
 * cdef struct CUeglFrame_st:             # <<<<<<<<<<<<<<
 *     anon_union14 frame
 *     unsigned int width
 */
struct __pyx_t_4cuda_5ccuda_CUeglFrame_st {
  union __pyx_t_4cuda_5ccuda_anon_union14 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":2315
 *     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":2317
 * 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":2322
 *     cdef struct CUeglStreamConnection_st:
 *         pass
 * ctypedef CUeglStreamConnection_st* CUeglStreamConnection             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUGLDeviceList_enum:
 */
typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_5ccuda_CUeglStreamConnection;

/* "cuda/ccuda.pxd":2329
 *     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":2336
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
 * 
 * ctypedef CUGLmap_flags_enum CUGLmap_flags             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int GLenum
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum __pyx_t_4cuda_5ccuda_CUGLmap_flags;

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

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

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

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, 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__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #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); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #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_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  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 && PY_VERSION_HEX < 0x030C00A6
#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_LIMITED_API || CYTHON_COMPILING_IN_PYPY
  #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
  #if PY_VERSION_HEX >= 0x030C00b1
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     ((!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #else
  #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)))
  #endif
  #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 = __Pyx_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);\
              }\
              __Pyx_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

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

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

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

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

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

/* 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 */
#if !CYTHON_COMPILING_IN_LIMITED_API
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);
#endif

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

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

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

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

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

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

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, 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_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#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_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static unsigned long __Pyx_get_runtime_version(void);
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

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

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

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

/* #### Code section: module_declarations ### */

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

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

/* Module declarations from "cuda.ccuda" */
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "cuda.ccuda"
extern int __pyx_module_is_main_cuda__ccuda;
int __pyx_module_is_main_cuda__ccuda = 0;

/* Implementation of "cuda.ccuda" */
/* #### Code section: global_var ### */
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = "?";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
/* #### Code section: decls ### */
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  #ifdef __Pyx_Generator_USED
  PyTypeObject *__pyx_GeneratorType;
  #endif
  #ifdef __Pyx_IterableCoroutine_USED
  PyTypeObject *__pyx_IterableCoroutineType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineAwaitType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineType;
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  PyObject *__pyx_n_s_;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_test;
} __pyx_mstate;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
  extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#else
static __pyx_mstate __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_n_s_);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_n_s_);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#ifdef __Pyx_Generator_USED
#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
#endif
#ifdef __Pyx_IterableCoroutine_USED
#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_n_s_ __pyx_mstate_global->__pyx_n_s_
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
/* #### Code section: module_code ### */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* "cuda/ccuda.pyx":62
 * 
 * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceGetExecAffinitySupport(pi, typename, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport(__pyx_v_pi, __pyx_v_typename, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 62, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

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

/* "cuda/ccuda.pyx":64
 *     return ccuda._cuDeviceGetExecAffinitySupport(pi, typename, dev)
 * 
 * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFlushGPUDirectRDMAWrites(target, scope)
 * 
 */

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

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

  /* "cuda/ccuda.pyx":64
 *     return ccuda._cuDeviceGetExecAffinitySupport(pi, typename, dev)
 * 
 * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFlushGPUDirectRDMAWrites(target, scope)
 * 
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* "cuda/ccuda.pyx":86
 * 
 * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDevicePrimaryCtxReset_v2(dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxReset_v2(__pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 86, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* "cuda/ccuda.pyx":115
 *     return ccuda._cuCtxGetFlags(flags)
 * 
 * cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetFlags(flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxSetFlags(unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCtxSetFlags", __pyx_f[0], 115, 1, __PYX_ERR(0, 115, __pyx_L1_error));

  /* "cuda/ccuda.pyx":116
 * 
 * cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCtxSetFlags(flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetFlags(__pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 116, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":115
 *     return ccuda._cuCtxGetFlags(flags)
 * 
 * cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetFlags(flags)
 * 
 */

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

/* "cuda/ccuda.pyx":118
 *     return ccuda._cuCtxSetFlags(flags)
 * 
 * cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetId(ctx, ctxId)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetId(CUcontext __pyx_v_ctx, unsigned PY_LONG_LONG *__pyx_v_ctxId) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCtxGetId", __pyx_f[0], 118, 1, __PYX_ERR(0, 118, __pyx_L1_error));

  /* "cuda/ccuda.pyx":119
 * 
 * cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCtxGetId(ctx, ctxId)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetId(__pyx_v_ctx, __pyx_v_ctxId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 119, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":118
 *     return ccuda._cuCtxSetFlags(flags)
 * 
 * cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetId(ctx, ctxId)
 * 
 */

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

/* "cuda/ccuda.pyx":121
 *     return ccuda._cuCtxGetId(ctx, ctxId)
 * 
 * cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSynchronize()
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxSynchronize(void) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCtxSynchronize", __pyx_f[0], 121, 1, __PYX_ERR(0, 121, __pyx_L1_error));

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

  /* "cuda/ccuda.pyx":121
 *     return ccuda._cuCtxGetId(ctx, ctxId)
 * 
 * cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSynchronize()
 * 
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* "cuda/ccuda.pyx":154
 *     return ccuda._cuCtxDetach(ctx)
 * 
 * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetSharedMemConfig(pConfig)
 * 
 */

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

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

  /* "cuda/ccuda.pyx":154
 *     return ccuda._cuCtxDetach(ctx)
 * 
 * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetSharedMemConfig(pConfig)
 * 
 */

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

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

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

  /* "cuda/ccuda.pyx":158
 * 
 * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCtxSetSharedMemConfig(config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig(__pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 158, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* "cuda/ccuda.pyx":179
 * 
 * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuModuleGetFunction(hfunc, hmod, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction(__pyx_v_hfunc, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 179, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

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

/* "cuda/ccuda.pyx":181
 *     return ccuda._cuModuleGetFunction(hfunc, hmod, name)
 * 
 * cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetFunctionCount(count, mod)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleGetFunctionCount(unsigned int *__pyx_v_count, CUmodule __pyx_v_mod) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuModuleGetFunctionCount", __pyx_f[0], 181, 1, __PYX_ERR(0, 181, __pyx_L1_error));

  /* "cuda/ccuda.pyx":182
 * 
 * cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuModuleGetFunctionCount(count, mod)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunctionCount(__pyx_v_count, __pyx_v_mod); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 182, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":181
 *     return ccuda._cuModuleGetFunction(hfunc, hmod, name)
 * 
 * cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetFunctionCount(count, mod)
 * 
 */

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

/* "cuda/ccuda.pyx":184
 *     return ccuda._cuModuleGetFunctionCount(count, mod)
 * 
 * cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleEnumerateFunctions(functions, numFunctions, mod)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleEnumerateFunctions(CUfunction *__pyx_v_functions, unsigned int __pyx_v_numFunctions, CUmodule __pyx_v_mod) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuModuleEnumerateFunctions", __pyx_f[0], 184, 1, __PYX_ERR(0, 184, __pyx_L1_error));

  /* "cuda/ccuda.pyx":185
 * 
 * cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuModuleEnumerateFunctions(functions, numFunctions, mod)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleEnumerateFunctions(__pyx_v_functions, __pyx_v_numFunctions, __pyx_v_mod); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 185, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":184
 *     return ccuda._cuModuleGetFunctionCount(count, mod)
 * 
 * cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleEnumerateFunctions(functions, numFunctions, mod)
 * 
 */

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

/* "cuda/ccuda.pyx":187
 *     return ccuda._cuModuleEnumerateFunctions(functions, numFunctions, mod)
 * 
 * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name)
 * 
 */

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

  /* "cuda/ccuda.pyx":188
 * 
 * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetGlobal_v2(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 188, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":187
 *     return ccuda._cuModuleEnumerateFunctions(functions, numFunctions, mod)
 * 
 * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name)
 * 
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* "cuda/ccuda.pyx":203
 * 
 * cdef CUresult cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLinkDestroy(state)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLinkDestroy(__pyx_v_state); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 203, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

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

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

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

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

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

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

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

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

  /* "cuda/ccuda.pyx":209
 * 
 * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuModuleGetSurfRef(pSurfRef, hmod, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef(__pyx_v_pSurfRef, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 209, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

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

/* "cuda/ccuda.pyx":211
 *     return ccuda._cuModuleGetSurfRef(pSurfRef, hmod, name)
 * 
 * cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryLoadData(CUlibrary *__pyx_v_library, void const *__pyx_v_code, CUjit_option *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, CUlibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryLoadData", __pyx_f[0], 211, 1, __PYX_ERR(0, 211, __pyx_L1_error));

  /* "cuda/ccuda.pyx":212
 * 
 * cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryLoadData(__pyx_v_library, __pyx_v_code, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 212, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":211
 *     return ccuda._cuModuleGetSurfRef(pSurfRef, hmod, name)
 * 
 * cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 * 
 */

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

/* "cuda/ccuda.pyx":214
 *     return ccuda._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 * 
 * cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryLoadFromFile(CUlibrary *__pyx_v_library, char const *__pyx_v_fileName, CUjit_option *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, CUlibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryLoadFromFile", __pyx_f[0], 214, 1, __PYX_ERR(0, 214, __pyx_L1_error));

  /* "cuda/ccuda.pyx":215
 * 
 * cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryLoadFromFile(__pyx_v_library, __pyx_v_fileName, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 215, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":214
 *     return ccuda._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 * 
 * cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 * 
 */

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

/* "cuda/ccuda.pyx":217
 *     return ccuda._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 * 
 * cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryUnload(library)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryUnload(CUlibrary __pyx_v_library) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryUnload", __pyx_f[0], 217, 1, __PYX_ERR(0, 217, __pyx_L1_error));

  /* "cuda/ccuda.pyx":218
 * 
 * cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryUnload(library)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryUnload(__pyx_v_library); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 218, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":217
 *     return ccuda._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 * 
 * cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryUnload(library)
 * 
 */

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

/* "cuda/ccuda.pyx":220
 *     return ccuda._cuLibraryUnload(library)
 * 
 * cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetKernel(pKernel, library, name)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryGetKernel(CUkernel *__pyx_v_pKernel, CUlibrary __pyx_v_library, char const *__pyx_v_name) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryGetKernel", __pyx_f[0], 220, 1, __PYX_ERR(0, 220, __pyx_L1_error));

  /* "cuda/ccuda.pyx":221
 * 
 * cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryGetKernel(pKernel, library, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetKernel(__pyx_v_pKernel, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 221, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":220
 *     return ccuda._cuLibraryUnload(library)
 * 
 * cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetKernel(pKernel, library, name)
 * 
 */

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

/* "cuda/ccuda.pyx":223
 *     return ccuda._cuLibraryGetKernel(pKernel, library, name)
 * 
 * cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetKernelCount(count, lib)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryGetKernelCount(unsigned int *__pyx_v_count, CUlibrary __pyx_v_lib) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryGetKernelCount", __pyx_f[0], 223, 1, __PYX_ERR(0, 223, __pyx_L1_error));

  /* "cuda/ccuda.pyx":224
 * 
 * cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryGetKernelCount(count, lib)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetKernelCount(__pyx_v_count, __pyx_v_lib); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 224, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":223
 *     return ccuda._cuLibraryGetKernel(pKernel, library, name)
 * 
 * cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetKernelCount(count, lib)
 * 
 */

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

/* "cuda/ccuda.pyx":226
 *     return ccuda._cuLibraryGetKernelCount(count, lib)
 * 
 * cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryEnumerateKernels(kernels, numKernels, lib)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryEnumerateKernels(CUkernel *__pyx_v_kernels, unsigned int __pyx_v_numKernels, CUlibrary __pyx_v_lib) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryEnumerateKernels", __pyx_f[0], 226, 1, __PYX_ERR(0, 226, __pyx_L1_error));

  /* "cuda/ccuda.pyx":227
 * 
 * cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryEnumerateKernels(kernels, numKernels, lib)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryEnumerateKernels(__pyx_v_kernels, __pyx_v_numKernels, __pyx_v_lib); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 227, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":226
 *     return ccuda._cuLibraryGetKernelCount(count, lib)
 * 
 * cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryEnumerateKernels(kernels, numKernels, lib)
 * 
 */

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

/* "cuda/ccuda.pyx":229
 *     return ccuda._cuLibraryEnumerateKernels(kernels, numKernels, lib)
 * 
 * cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetModule(pMod, library)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryGetModule(CUmodule *__pyx_v_pMod, CUlibrary __pyx_v_library) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryGetModule", __pyx_f[0], 229, 1, __PYX_ERR(0, 229, __pyx_L1_error));

  /* "cuda/ccuda.pyx":230
 * 
 * cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryGetModule(pMod, library)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetModule(__pyx_v_pMod, __pyx_v_library); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 230, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":229
 *     return ccuda._cuLibraryEnumerateKernels(kernels, numKernels, lib)
 * 
 * cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetModule(pMod, library)
 * 
 */

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

/* "cuda/ccuda.pyx":232
 *     return ccuda._cuLibraryGetModule(pMod, library)
 * 
 * cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelGetFunction(pFunc, kernel)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuKernelGetFunction(CUfunction *__pyx_v_pFunc, CUkernel __pyx_v_kernel) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuKernelGetFunction", __pyx_f[0], 232, 1, __PYX_ERR(0, 232, __pyx_L1_error));

  /* "cuda/ccuda.pyx":233
 * 
 * cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuKernelGetFunction(pFunc, kernel)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetFunction(__pyx_v_pFunc, __pyx_v_kernel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 233, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":232
 *     return ccuda._cuLibraryGetModule(pMod, library)
 * 
 * cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelGetFunction(pFunc, kernel)
 * 
 */

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

/* "cuda/ccuda.pyx":235
 *     return ccuda._cuKernelGetFunction(pFunc, kernel)
 * 
 * cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetGlobal(dptr, numbytes, library, name)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryGetGlobal(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUlibrary __pyx_v_library, char const *__pyx_v_name) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryGetGlobal", __pyx_f[0], 235, 1, __PYX_ERR(0, 235, __pyx_L1_error));

  /* "cuda/ccuda.pyx":236
 * 
 * cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryGetGlobal(dptr, numbytes, library, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetGlobal(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":235
 *     return ccuda._cuKernelGetFunction(pFunc, kernel)
 * 
 * cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetGlobal(dptr, numbytes, library, name)
 * 
 */

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

/* "cuda/ccuda.pyx":238
 *     return ccuda._cuLibraryGetGlobal(dptr, numbytes, library, name)
 * 
 * cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetManaged(dptr, numbytes, library, name)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryGetManaged(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUlibrary __pyx_v_library, char const *__pyx_v_name) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryGetManaged", __pyx_f[0], 238, 1, __PYX_ERR(0, 238, __pyx_L1_error));

  /* "cuda/ccuda.pyx":239
 * 
 * cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryGetManaged(dptr, numbytes, library, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetManaged(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 239, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":238
 *     return ccuda._cuLibraryGetGlobal(dptr, numbytes, library, name)
 * 
 * cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetManaged(dptr, numbytes, library, name)
 * 
 */

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

/* "cuda/ccuda.pyx":241
 *     return ccuda._cuLibraryGetManaged(dptr, numbytes, library, name)
 * 
 * cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetUnifiedFunction(fptr, library, symbol)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLibraryGetUnifiedFunction(void **__pyx_v_fptr, CUlibrary __pyx_v_library, char const *__pyx_v_symbol) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLibraryGetUnifiedFunction", __pyx_f[0], 241, 1, __PYX_ERR(0, 241, __pyx_L1_error));

  /* "cuda/ccuda.pyx":242
 * 
 * cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLibraryGetUnifiedFunction(fptr, library, symbol)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetUnifiedFunction(__pyx_v_fptr, __pyx_v_library, __pyx_v_symbol); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 242, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":241
 *     return ccuda._cuLibraryGetManaged(dptr, numbytes, library, name)
 * 
 * cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLibraryGetUnifiedFunction(fptr, library, symbol)
 * 
 */

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

/* "cuda/ccuda.pyx":244
 *     return ccuda._cuLibraryGetUnifiedFunction(fptr, library, symbol)
 * 
 * cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelGetAttribute(pi, attrib, kernel, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuKernelGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUkernel __pyx_v_kernel, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuKernelGetAttribute", __pyx_f[0], 244, 1, __PYX_ERR(0, 244, __pyx_L1_error));

  /* "cuda/ccuda.pyx":245
 * 
 * cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuKernelGetAttribute(pi, attrib, kernel, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetAttribute(__pyx_v_pi, __pyx_v_attrib, __pyx_v_kernel, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 245, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":244
 *     return ccuda._cuLibraryGetUnifiedFunction(fptr, library, symbol)
 * 
 * cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelGetAttribute(pi, attrib, kernel, dev)
 * 
 */

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

/* "cuda/ccuda.pyx":247
 *     return ccuda._cuKernelGetAttribute(pi, attrib, kernel, dev)
 * 
 * cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelSetAttribute(attrib, val, kernel, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuKernelSetAttribute(CUfunction_attribute __pyx_v_attrib, int __pyx_v_val, CUkernel __pyx_v_kernel, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuKernelSetAttribute", __pyx_f[0], 247, 1, __PYX_ERR(0, 247, __pyx_L1_error));

  /* "cuda/ccuda.pyx":248
 * 
 * cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuKernelSetAttribute(attrib, val, kernel, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuKernelSetAttribute(__pyx_v_attrib, __pyx_v_val, __pyx_v_kernel, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 248, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":247
 *     return ccuda._cuKernelGetAttribute(pi, attrib, kernel, dev)
 * 
 * cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelSetAttribute(attrib, val, kernel, dev)
 * 
 */

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

/* "cuda/ccuda.pyx":250
 *     return ccuda._cuKernelSetAttribute(attrib, val, kernel, dev)
 * 
 * cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelSetCacheConfig(kernel, config, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuKernelSetCacheConfig(CUkernel __pyx_v_kernel, CUfunc_cache __pyx_v_config, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuKernelSetCacheConfig", __pyx_f[0], 250, 1, __PYX_ERR(0, 250, __pyx_L1_error));

  /* "cuda/ccuda.pyx":251
 * 
 * cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuKernelSetCacheConfig(kernel, config, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuKernelSetCacheConfig(__pyx_v_kernel, __pyx_v_config, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 251, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":250
 *     return ccuda._cuKernelSetAttribute(attrib, val, kernel, dev)
 * 
 * cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelSetCacheConfig(kernel, config, dev)
 * 
 */

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

/* "cuda/ccuda.pyx":253
 *     return ccuda._cuKernelSetCacheConfig(kernel, config, dev)
 * 
 * cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelGetName(name, hfunc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuKernelGetName(char const **__pyx_v_name, CUkernel __pyx_v_hfunc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuKernelGetName", __pyx_f[0], 253, 1, __PYX_ERR(0, 253, __pyx_L1_error));

  /* "cuda/ccuda.pyx":254
 * 
 * cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuKernelGetName(name, hfunc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetName(__pyx_v_name, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 254, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":253
 *     return ccuda._cuKernelSetCacheConfig(kernel, config, dev)
 * 
 * cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelGetName(name, hfunc)
 * 
 */

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

/* "cuda/ccuda.pyx":256
 *     return ccuda._cuKernelGetName(name, hfunc)
 * 
 * cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuKernelGetParamInfo(CUkernel __pyx_v_kernel, size_t __pyx_v_paramIndex, size_t *__pyx_v_paramOffset, size_t *__pyx_v_paramSize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuKernelGetParamInfo", __pyx_f[0], 256, 1, __PYX_ERR(0, 256, __pyx_L1_error));

  /* "cuda/ccuda.pyx":257
 * 
 * cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetParamInfo(__pyx_v_kernel, __pyx_v_paramIndex, __pyx_v_paramOffset, __pyx_v_paramSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 257, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":256
 *     return ccuda._cuKernelGetName(name, hfunc)
 * 
 * cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize)
 * 
 */

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

/* "cuda/ccuda.pyx":259
 *     return ccuda._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize)
 * 
 * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetInfo_v2(free, total)
 * 
 */

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

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

  /* "cuda/ccuda.pyx":259
 *     return ccuda._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize)
 * 
 * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetInfo_v2(free, total)
 * 
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* "cuda/ccuda.pyx":290
 * 
 * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemAllocManaged(dptr, bytesize, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocManaged(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 290, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

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

/* "cuda/ccuda.pyx":292
 *     return ccuda._cuMemAllocManaged(dptr, bytesize, flags)
 * 
 * cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceRegisterAsyncNotification(CUdevice __pyx_v_device, CUasyncCallback __pyx_v_callbackFunc, void *__pyx_v_userData, CUasyncCallbackHandle *__pyx_v_callback) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDeviceRegisterAsyncNotification", __pyx_f[0], 292, 1, __PYX_ERR(0, 292, __pyx_L1_error));

  /* "cuda/ccuda.pyx":293
 * 
 * cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceRegisterAsyncNotification(__pyx_v_device, __pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 293, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":292
 *     return ccuda._cuMemAllocManaged(dptr, bytesize, flags)
 * 
 * cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback)
 * 
 */

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

/* "cuda/ccuda.pyx":295
 *     return ccuda._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback)
 * 
 * cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceUnregisterAsyncNotification(device, callback)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceUnregisterAsyncNotification(CUdevice __pyx_v_device, CUasyncCallbackHandle __pyx_v_callback) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDeviceUnregisterAsyncNotification", __pyx_f[0], 295, 1, __PYX_ERR(0, 295, __pyx_L1_error));

  /* "cuda/ccuda.pyx":296
 * 
 * cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceUnregisterAsyncNotification(device, callback)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceUnregisterAsyncNotification(__pyx_v_device, __pyx_v_callback); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 296, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":295
 *     return ccuda._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback)
 * 
 * cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceUnregisterAsyncNotification(device, callback)
 * 
 */

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

/* "cuda/ccuda.pyx":298
 *     return ccuda._cuDeviceUnregisterAsyncNotification(device, callback)
 * 
 * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetByPCIBusId(dev, pciBusId)
 * 
 */

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

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

  /* "cuda/ccuda.pyx":298
 *     return ccuda._cuDeviceUnregisterAsyncNotification(device, callback)
 * 
 * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetByPCIBusId(dev, pciBusId)
 * 
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* "cuda/ccuda.pyx":487
 *     return ccuda._cuMemRelease(handle)
 * 
 * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemMap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_offset, CUmemGenericAllocationHandle __pyx_v_handle, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemMap", __pyx_f[0], 487, 1, __PYX_ERR(0, 487, __pyx_L1_error));

  /* "cuda/ccuda.pyx":488
 * 
 * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemMap(__pyx_v_ptr, __pyx_v_size, __pyx_v_offset, __pyx_v_handle, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 488, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":487
 *     return ccuda._cuMemRelease(handle)
 * 
 * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":490
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)
 * 
 * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemMapArrayAsync(CUarrayMapInfo *__pyx_v_mapInfoList, unsigned int __pyx_v_count, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemMapArrayAsync", __pyx_f[0], 490, 1, __PYX_ERR(0, 490, __pyx_L1_error));

  /* "cuda/ccuda.pyx":491
 * 
 * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemMapArrayAsync(__pyx_v_mapInfoList, __pyx_v_count, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 491, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":490
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)
 * 
 * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":493
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)
 * 
 * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemUnmap(ptr, size)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemUnmap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemUnmap", __pyx_f[0], 493, 1, __PYX_ERR(0, 493, __pyx_L1_error));

  /* "cuda/ccuda.pyx":494
 * 
 * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemUnmap(ptr, size)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 494, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":493
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)
 * 
 * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemUnmap(ptr, size)
 * 
 */

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

/* "cuda/ccuda.pyx":496
 *     return ccuda._cuMemUnmap(ptr, size)
 * 
 * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemSetAccess(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, CUmemAccessDesc const *__pyx_v_desc, size_t __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemSetAccess", __pyx_f[0], 496, 1, __PYX_ERR(0, 496, __pyx_L1_error));

  /* "cuda/ccuda.pyx":497
 * 
 * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess(__pyx_v_ptr, __pyx_v_size, __pyx_v_desc, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 497, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":496
 *     return ccuda._cuMemUnmap(ptr, size)
 * 
 * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)
 * 
 */

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

/* "cuda/ccuda.pyx":499
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)
 * 
 * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAccess(flags, location, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetAccess(unsigned PY_LONG_LONG *__pyx_v_flags, CUmemLocation const *__pyx_v_location, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemGetAccess", __pyx_f[0], 499, 1, __PYX_ERR(0, 499, __pyx_L1_error));

  /* "cuda/ccuda.pyx":500
 * 
 * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemGetAccess(flags, location, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAccess(__pyx_v_flags, __pyx_v_location, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 500, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":499
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)
 * 
 * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAccess(flags, location, ptr)
 * 
 */

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

/* "cuda/ccuda.pyx":502
 *     return ccuda._cuMemGetAccess(flags, location, ptr)
 * 
 * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemExportToShareableHandle(void *__pyx_v_shareableHandle, CUmemGenericAllocationHandle __pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemExportToShareableHandle", __pyx_f[0], 502, 1, __PYX_ERR(0, 502, __pyx_L1_error));

  /* "cuda/ccuda.pyx":503
 * 
 * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle(__pyx_v_shareableHandle, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 503, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":502
 *     return ccuda._cuMemGetAccess(flags, location, ptr)
 * 
 * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":505
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)
 * 
 * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemImportFromShareableHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_osHandle, CUmemAllocationHandleType __pyx_v_shHandleType) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemImportFromShareableHandle", __pyx_f[0], 505, 1, __PYX_ERR(0, 505, __pyx_L1_error));

  /* "cuda/ccuda.pyx":506
 * 
 * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemImportFromShareableHandle(__pyx_v_handle, __pyx_v_osHandle, __pyx_v_shHandleType); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 506, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":505
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)
 * 
 * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)
 * 
 */

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

/* "cuda/ccuda.pyx":508
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)
 * 
 * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetAllocationGranularity(size_t *__pyx_v_granularity, CUmemAllocationProp const *__pyx_v_prop, CUmemAllocationGranularity_flags __pyx_v_option) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemGetAllocationGranularity", __pyx_f[0], 508, 1, __PYX_ERR(0, 508, __pyx_L1_error));

  /* "cuda/ccuda.pyx":509
 * 
 * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 509, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":508
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)
 * 
 * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)
 * 
 */

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

/* "cuda/ccuda.pyx":511
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)
 * 
 * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp *__pyx_v_prop, CUmemGenericAllocationHandle __pyx_v_handle) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemGetAllocationPropertiesFromHandle", __pyx_f[0], 511, 1, __PYX_ERR(0, 511, __pyx_L1_error));

  /* "cuda/ccuda.pyx":512
 * 
 * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle(__pyx_v_prop, __pyx_v_handle); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 512, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":511
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)
 * 
 * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)
 * 
 */

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

/* "cuda/ccuda.pyx":514
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)
 * 
 * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemRetainAllocationHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_addr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemRetainAllocationHandle", __pyx_f[0], 514, 1, __PYX_ERR(0, 514, __pyx_L1_error));

  /* "cuda/ccuda.pyx":515
 * 
 * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle(__pyx_v_handle, __pyx_v_addr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 515, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":514
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)
 * 
 * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)
 * 
 */

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

/* "cuda/ccuda.pyx":517
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)
 * 
 * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemFreeAsync(dptr, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemFreeAsync(CUdeviceptr __pyx_v_dptr, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemFreeAsync", __pyx_f[0], 517, 1, __PYX_ERR(0, 517, __pyx_L1_error));

  /* "cuda/ccuda.pyx":518
 * 
 * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemFreeAsync(dptr, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync(__pyx_v_dptr, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 518, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":517
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)
 * 
 * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemFreeAsync(dptr, hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":520
 *     return ccuda._cuMemFreeAsync(dptr, hStream)
 * 
 * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAllocAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemAllocAsync", __pyx_f[0], 520, 1, __PYX_ERR(0, 520, __pyx_L1_error));

  /* "cuda/ccuda.pyx":521
 * 
 * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 521, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":520
 *     return ccuda._cuMemFreeAsync(dptr, hStream)
 * 
 * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":523
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)
 * 
 * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolTrimTo(CUmemoryPool __pyx_v_pool, size_t __pyx_v_minBytesToKeep) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolTrimTo", __pyx_f[0], 523, 1, __PYX_ERR(0, 523, __pyx_L1_error));

  /* "cuda/ccuda.pyx":524
 * 
 * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo(__pyx_v_pool, __pyx_v_minBytesToKeep); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 524, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":523
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)
 * 
 * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)
 * 
 */

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

/* "cuda/ccuda.pyx":526
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)
 * 
 * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolSetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolSetAttribute", __pyx_f[0], 526, 1, __PYX_ERR(0, 526, __pyx_L1_error));

  /* "cuda/ccuda.pyx":527
 * 
 * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute(__pyx_v_pool, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 527, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":526
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)
 * 
 * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)
 * 
 */

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

/* "cuda/ccuda.pyx":529
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)
 * 
 * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolGetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolGetAttribute", __pyx_f[0], 529, 1, __PYX_ERR(0, 529, __pyx_L1_error));

  /* "cuda/ccuda.pyx":530
 * 
 * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute(__pyx_v_pool, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 530, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":529
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)
 * 
 * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)
 * 
 */

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

/* "cuda/ccuda.pyx":532
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)
 * 
 * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolSetAccess(CUmemoryPool __pyx_v_pool, CUmemAccessDesc const *__pyx_v_map, size_t __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolSetAccess", __pyx_f[0], 532, 1, __PYX_ERR(0, 532, __pyx_L1_error));

  /* "cuda/ccuda.pyx":533
 * 
 * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess(__pyx_v_pool, __pyx_v_map, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 533, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":532
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)
 * 
 * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)
 * 
 */

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

/* "cuda/ccuda.pyx":535
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)
 * 
 * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolGetAccess(CUmemAccess_flags *__pyx_v_flags, CUmemoryPool __pyx_v_memPool, CUmemLocation *__pyx_v_location) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolGetAccess", __pyx_f[0], 535, 1, __PYX_ERR(0, 535, __pyx_L1_error));

  /* "cuda/ccuda.pyx":536
 * 
 * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAccess(__pyx_v_flags, __pyx_v_memPool, __pyx_v_location); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 536, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":535
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)
 * 
 * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)
 * 
 */

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

/* "cuda/ccuda.pyx":538
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)
 * 
 * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolCreate(pool, poolProps)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolCreate(CUmemoryPool *__pyx_v_pool, CUmemPoolProps const *__pyx_v_poolProps) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolCreate", __pyx_f[0], 538, 1, __PYX_ERR(0, 538, __pyx_L1_error));

  /* "cuda/ccuda.pyx":539
 * 
 * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolCreate(pool, poolProps)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate(__pyx_v_pool, __pyx_v_poolProps); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 539, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":538
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)
 * 
 * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolCreate(pool, poolProps)
 * 
 */

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

/* "cuda/ccuda.pyx":541
 *     return ccuda._cuMemPoolCreate(pool, poolProps)
 * 
 * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolDestroy(pool)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolDestroy(CUmemoryPool __pyx_v_pool) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolDestroy", __pyx_f[0], 541, 1, __PYX_ERR(0, 541, __pyx_L1_error));

  /* "cuda/ccuda.pyx":542
 * 
 * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolDestroy(pool)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy(__pyx_v_pool); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":541
 *     return ccuda._cuMemPoolCreate(pool, poolProps)
 * 
 * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolDestroy(pool)
 * 
 */

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

/* "cuda/ccuda.pyx":544
 *     return ccuda._cuMemPoolDestroy(pool)
 * 
 * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAllocFromPoolAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUmemoryPool __pyx_v_pool, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemAllocFromPoolAsync", __pyx_f[0], 544, 1, __PYX_ERR(0, 544, __pyx_L1_error));

  /* "cuda/ccuda.pyx":545
 * 
 * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_pool, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 545, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":544
 *     return ccuda._cuMemPoolDestroy(pool)
 * 
 * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":547
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)
 * 
 * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolExportToShareableHandle(void *__pyx_v_handle_out, CUmemoryPool __pyx_v_pool, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolExportToShareableHandle", __pyx_f[0], 547, 1, __PYX_ERR(0, 547, __pyx_L1_error));

  /* "cuda/ccuda.pyx":548
 * 
 * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle(__pyx_v_handle_out, __pyx_v_pool, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 548, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":547
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)
 * 
 * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":550
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)
 * 
 * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolImportFromShareableHandle(CUmemoryPool *__pyx_v_pool_out, void *__pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolImportFromShareableHandle", __pyx_f[0], 550, 1, __PYX_ERR(0, 550, __pyx_L1_error));

  /* "cuda/ccuda.pyx":551
 * 
 * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportFromShareableHandle(__pyx_v_pool_out, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 551, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":550
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)
 * 
 * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":553
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)
 * 
 * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolExportPointer(CUmemPoolPtrExportData *__pyx_v_shareData_out, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolExportPointer", __pyx_f[0], 553, 1, __PYX_ERR(0, 553, __pyx_L1_error));

  /* "cuda/ccuda.pyx":554
 * 
 * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportPointer(__pyx_v_shareData_out, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 554, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":553
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)
 * 
 * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)
 * 
 */

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

/* "cuda/ccuda.pyx":556
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)
 * 
 * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolImportPointer(CUdeviceptr *__pyx_v_ptr_out, CUmemoryPool __pyx_v_pool, CUmemPoolPtrExportData *__pyx_v_shareData) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPoolImportPointer", __pyx_f[0], 556, 1, __PYX_ERR(0, 556, __pyx_L1_error));

  /* "cuda/ccuda.pyx":557
 * 
 * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer(__pyx_v_ptr_out, __pyx_v_pool, __pyx_v_shareData); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 557, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":556
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)
 * 
 * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)
 * 
 */

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

/* "cuda/ccuda.pyx":559
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)
 * 
 * cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastCreate(mcHandle, prop)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMulticastCreate(CUmemGenericAllocationHandle *__pyx_v_mcHandle, CUmulticastObjectProp const *__pyx_v_prop) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMulticastCreate", __pyx_f[0], 559, 1, __PYX_ERR(0, 559, __pyx_L1_error));

  /* "cuda/ccuda.pyx":560
 * 
 * cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMulticastCreate(mcHandle, prop)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastCreate(__pyx_v_mcHandle, __pyx_v_prop); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 560, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":559
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)
 * 
 * cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastCreate(mcHandle, prop)
 * 
 */

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

/* "cuda/ccuda.pyx":562
 *     return ccuda._cuMulticastCreate(mcHandle, prop)
 * 
 * cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastAddDevice(mcHandle, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMulticastAddDevice(CUmemGenericAllocationHandle __pyx_v_mcHandle, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMulticastAddDevice", __pyx_f[0], 562, 1, __PYX_ERR(0, 562, __pyx_L1_error));

  /* "cuda/ccuda.pyx":563
 * 
 * cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMulticastAddDevice(mcHandle, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastAddDevice(__pyx_v_mcHandle, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 563, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":562
 *     return ccuda._cuMulticastCreate(mcHandle, prop)
 * 
 * cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastAddDevice(mcHandle, dev)
 * 
 */

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

/* "cuda/ccuda.pyx":565
 *     return ccuda._cuMulticastAddDevice(mcHandle, dev)
 * 
 * cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMulticastBindMem(CUmemGenericAllocationHandle __pyx_v_mcHandle, size_t __pyx_v_mcOffset, CUmemGenericAllocationHandle __pyx_v_memHandle, size_t __pyx_v_memOffset, size_t __pyx_v_size, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMulticastBindMem", __pyx_f[0], 565, 1, __PYX_ERR(0, 565, __pyx_L1_error));

  /* "cuda/ccuda.pyx":566
 * 
 * cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastBindMem(__pyx_v_mcHandle, __pyx_v_mcOffset, __pyx_v_memHandle, __pyx_v_memOffset, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 566, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":565
 *     return ccuda._cuMulticastAddDevice(mcHandle, dev)
 * 
 * cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":568
 *     return ccuda._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 * 
 * cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMulticastBindAddr(CUmemGenericAllocationHandle __pyx_v_mcHandle, size_t __pyx_v_mcOffset, CUdeviceptr __pyx_v_memptr, size_t __pyx_v_size, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMulticastBindAddr", __pyx_f[0], 568, 1, __PYX_ERR(0, 568, __pyx_L1_error));

  /* "cuda/ccuda.pyx":569
 * 
 * cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastBindAddr(__pyx_v_mcHandle, __pyx_v_mcOffset, __pyx_v_memptr, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 569, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":568
 *     return ccuda._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 * 
 * cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":571
 *     return ccuda._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags)
 * 
 * cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastUnbind(mcHandle, dev, mcOffset, size)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMulticastUnbind(CUmemGenericAllocationHandle __pyx_v_mcHandle, CUdevice __pyx_v_dev, size_t __pyx_v_mcOffset, size_t __pyx_v_size) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMulticastUnbind", __pyx_f[0], 571, 1, __PYX_ERR(0, 571, __pyx_L1_error));

  /* "cuda/ccuda.pyx":572
 * 
 * cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMulticastUnbind(mcHandle, dev, mcOffset, size)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastUnbind(__pyx_v_mcHandle, __pyx_v_dev, __pyx_v_mcOffset, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 572, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":571
 *     return ccuda._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags)
 * 
 * cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastUnbind(mcHandle, dev, mcOffset, size)
 * 
 */

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

/* "cuda/ccuda.pyx":574
 *     return ccuda._cuMulticastUnbind(mcHandle, dev, mcOffset, size)
 * 
 * cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastGetGranularity(granularity, prop, option)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMulticastGetGranularity(size_t *__pyx_v_granularity, CUmulticastObjectProp const *__pyx_v_prop, CUmulticastGranularity_flags __pyx_v_option) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMulticastGetGranularity", __pyx_f[0], 574, 1, __PYX_ERR(0, 574, __pyx_L1_error));

  /* "cuda/ccuda.pyx":575
 * 
 * cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMulticastGetGranularity(granularity, prop, option)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastGetGranularity(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 575, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":574
 *     return ccuda._cuMulticastUnbind(mcHandle, dev, mcOffset, size)
 * 
 * cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMulticastGetGranularity(granularity, prop, option)
 * 
 */

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

/* "cuda/ccuda.pyx":577
 *     return ccuda._cuMulticastGetGranularity(granularity, prop, option)
 * 
 * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuPointerGetAttribute(void *__pyx_v_data, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuPointerGetAttribute", __pyx_f[0], 577, 1, __PYX_ERR(0, 577, __pyx_L1_error));

  /* "cuda/ccuda.pyx":578
 * 
 * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute(__pyx_v_data, __pyx_v_attribute, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 578, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":577
 *     return ccuda._cuMulticastGetGranularity(granularity, prop, option)
 * 
 * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)
 * 
 */

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

/* "cuda/ccuda.pyx":580
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)
 * 
 * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPrefetchAsync(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUdevice __pyx_v_dstDevice, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPrefetchAsync", __pyx_f[0], 580, 1, __PYX_ERR(0, 580, __pyx_L1_error));

  /* "cuda/ccuda.pyx":581
 * 
 * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 581, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":580
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)
 * 
 * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":583
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)
 * 
 * cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPrefetchAsync_v2(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmemLocation __pyx_v_location, unsigned int __pyx_v_flags, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemPrefetchAsync_v2", __pyx_f[0], 583, 1, __PYX_ERR(0, 583, __pyx_L1_error));

  /* "cuda/ccuda.pyx":584
 * 
 * cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_location, __pyx_v_flags, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 584, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":583
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)
 * 
 * cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":586
 *     return ccuda._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream)
 * 
 * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAdvise(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUdevice __pyx_v_device) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemAdvise", __pyx_f[0], 586, 1, __PYX_ERR(0, 586, __pyx_L1_error));

  /* "cuda/ccuda.pyx":587
 * 
 * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 587, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":586
 *     return ccuda._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream)
 * 
 * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)
 * 
 */

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

/* "cuda/ccuda.pyx":589
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)
 * 
 * cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAdvise_v2(devPtr, count, advice, location)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAdvise_v2(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUmemLocation __pyx_v_location) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemAdvise_v2", __pyx_f[0], 589, 1, __PYX_ERR(0, 589, __pyx_L1_error));

  /* "cuda/ccuda.pyx":590
 * 
 * cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemAdvise_v2(devPtr, count, advice, location)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_location); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 590, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":589
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)
 * 
 * cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAdvise_v2(devPtr, count, advice, location)
 * 
 */

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

/* "cuda/ccuda.pyx":592
 *     return ccuda._cuMemAdvise_v2(devPtr, count, advice, location)
 * 
 * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, CUmem_range_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemRangeGetAttribute", __pyx_f[0], 592, 1, __PYX_ERR(0, 592, __pyx_L1_error));

  /* "cuda/ccuda.pyx":593
 * 
 * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute(__pyx_v_data, __pyx_v_dataSize, __pyx_v_attribute, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 593, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":592
 *     return ccuda._cuMemAdvise_v2(devPtr, count, advice, location)
 * 
 * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
 * 
 */

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

/* "cuda/ccuda.pyx":595
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
 * 
 * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, CUmem_range_attribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuMemRangeGetAttributes", __pyx_f[0], 595, 1, __PYX_ERR(0, 595, __pyx_L1_error));

  /* "cuda/ccuda.pyx":596
 * 
 * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes(__pyx_v_data, __pyx_v_dataSizes, __pyx_v_attributes, __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 596, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":595
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
 * 
 * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
 * 
 */

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

/* "cuda/ccuda.pyx":598
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
 * 
 * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuPointerSetAttribute(void const *__pyx_v_value, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuPointerSetAttribute", __pyx_f[0], 598, 1, __PYX_ERR(0, 598, __pyx_L1_error));

  /* "cuda/ccuda.pyx":599
 * 
 * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute(__pyx_v_value, __pyx_v_attribute, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 599, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":598
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
 * 
 * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)
 * 
 */

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

/* "cuda/ccuda.pyx":601
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)
 * 
 * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuPointerGetAttributes(unsigned int __pyx_v_numAttributes, CUpointer_attribute *__pyx_v_attributes, void **__pyx_v_data, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuPointerGetAttributes", __pyx_f[0], 601, 1, __PYX_ERR(0, 601, __pyx_L1_error));

  /* "cuda/ccuda.pyx":602
 * 
 * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes(__pyx_v_numAttributes, __pyx_v_attributes, __pyx_v_data, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 602, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":601
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)
 * 
 * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)
 * 
 */

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

/* "cuda/ccuda.pyx":604
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)
 * 
 * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCreate(phStream, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamCreate(CUstream *__pyx_v_phStream, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamCreate", __pyx_f[0], 604, 1, __PYX_ERR(0, 604, __pyx_L1_error));

  /* "cuda/ccuda.pyx":605
 * 
 * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamCreate(phStream, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate(__pyx_v_phStream, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 605, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":604
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)
 * 
 * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCreate(phStream, Flags)
 * 
 */

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

/* "cuda/ccuda.pyx":607
 *     return ccuda._cuStreamCreate(phStream, Flags)
 * 
 * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamCreateWithPriority(CUstream *__pyx_v_phStream, unsigned int __pyx_v_flags, int __pyx_v_priority) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamCreateWithPriority", __pyx_f[0], 607, 1, __PYX_ERR(0, 607, __pyx_L1_error));

  /* "cuda/ccuda.pyx":608
 * 
 * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority(__pyx_v_phStream, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 608, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":607
 *     return ccuda._cuStreamCreate(phStream, Flags)
 * 
 * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)
 * 
 */

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

/* "cuda/ccuda.pyx":610
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)
 * 
 * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetPriority(hStream, priority)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetPriority(CUstream __pyx_v_hStream, int *__pyx_v_priority) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamGetPriority", __pyx_f[0], 610, 1, __PYX_ERR(0, 610, __pyx_L1_error));

  /* "cuda/ccuda.pyx":611
 * 
 * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamGetPriority(hStream, priority)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetPriority(__pyx_v_hStream, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 611, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":610
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)
 * 
 * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetPriority(hStream, priority)
 * 
 */

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

/* "cuda/ccuda.pyx":613
 *     return ccuda._cuStreamGetPriority(hStream, priority)
 * 
 * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetFlags(hStream, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetFlags(CUstream __pyx_v_hStream, unsigned int *__pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamGetFlags", __pyx_f[0], 613, 1, __PYX_ERR(0, 613, __pyx_L1_error));

  /* "cuda/ccuda.pyx":614
 * 
 * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamGetFlags(hStream, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags(__pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 614, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":613
 *     return ccuda._cuStreamGetPriority(hStream, priority)
 * 
 * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetFlags(hStream, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":616
 *     return ccuda._cuStreamGetFlags(hStream, flags)
 * 
 * cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetId(hStream, streamId)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetId(CUstream __pyx_v_hStream, unsigned PY_LONG_LONG *__pyx_v_streamId) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamGetId", __pyx_f[0], 616, 1, __PYX_ERR(0, 616, __pyx_L1_error));

  /* "cuda/ccuda.pyx":617
 * 
 * cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamGetId(hStream, streamId)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetId(__pyx_v_hStream, __pyx_v_streamId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 617, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":616
 *     return ccuda._cuStreamGetFlags(hStream, flags)
 * 
 * cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetId(hStream, streamId)
 * 
 */

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

/* "cuda/ccuda.pyx":619
 *     return ccuda._cuStreamGetId(hStream, streamId)
 * 
 * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCtx(hStream, pctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetCtx(CUstream __pyx_v_hStream, CUcontext *__pyx_v_pctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamGetCtx", __pyx_f[0], 619, 1, __PYX_ERR(0, 619, __pyx_L1_error));

  /* "cuda/ccuda.pyx":620
 * 
 * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamGetCtx(hStream, pctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx(__pyx_v_hStream, __pyx_v_pctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 620, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":619
 *     return ccuda._cuStreamGetId(hStream, streamId)
 * 
 * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCtx(hStream, pctx)
 * 
 */

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

/* "cuda/ccuda.pyx":622
 *     return ccuda._cuStreamGetCtx(hStream, pctx)
 * 
 * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWaitEvent(CUstream __pyx_v_hStream, CUevent __pyx_v_hEvent, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamWaitEvent", __pyx_f[0], 622, 1, __PYX_ERR(0, 622, __pyx_L1_error));

  /* "cuda/ccuda.pyx":623
 * 
 * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent(__pyx_v_hStream, __pyx_v_hEvent, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 623, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":622
 *     return ccuda._cuStreamGetCtx(hStream, pctx)
 * 
 * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)
 * 
 */

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

/* "cuda/ccuda.pyx":625
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)
 * 
 * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamAddCallback(CUstream __pyx_v_hStream, CUstreamCallback __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamAddCallback", __pyx_f[0], 625, 1, __PYX_ERR(0, 625, __pyx_L1_error));

  /* "cuda/ccuda.pyx":626
 * 
 * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback(__pyx_v_hStream, __pyx_v_callback, __pyx_v_userData, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 626, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":625
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)
 * 
 * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":628
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)
 * 
 * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamBeginCapture(CUstream __pyx_v_hStream, CUstreamCaptureMode __pyx_v_mode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamBeginCapture", __pyx_f[0], 628, 1, __PYX_ERR(0, 628, __pyx_L1_error));

  /* "cuda/ccuda.pyx":629
 * 
 * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCapture_v2(__pyx_v_hStream, __pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 629, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":628
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)
 * 
 * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)
 * 
 */

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

/* "cuda/ccuda.pyx":631
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)
 * 
 * cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamBeginCaptureToGraph(CUstream __pyx_v_hStream, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, CUstreamCaptureMode __pyx_v_mode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamBeginCaptureToGraph", __pyx_f[0], 631, 1, __PYX_ERR(0, 631, __pyx_L1_error));

  /* "cuda/ccuda.pyx":632
 * 
 * cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCaptureToGraph(__pyx_v_hStream, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 632, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":631
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)
 * 
 * cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode)
 * 
 */

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

/* "cuda/ccuda.pyx":634
 *     return ccuda._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode)
 * 
 * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode *__pyx_v_mode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuThreadExchangeStreamCaptureMode", __pyx_f[0], 634, 1, __PYX_ERR(0, 634, __pyx_L1_error));

  /* "cuda/ccuda.pyx":635
 * 
 * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode(__pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 635, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":634
 *     return ccuda._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode)
 * 
 * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)
 * 
 */

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

/* "cuda/ccuda.pyx":637
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)
 * 
 * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamEndCapture(CUstream __pyx_v_hStream, CUgraph *__pyx_v_phGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamEndCapture", __pyx_f[0], 637, 1, __PYX_ERR(0, 637, __pyx_L1_error));

  /* "cuda/ccuda.pyx":638
 * 
 * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture(__pyx_v_hStream, __pyx_v_phGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 638, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":637
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)
 * 
 * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)
 * 
 */

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

/* "cuda/ccuda.pyx":640
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)
 * 
 * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamIsCapturing(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamIsCapturing", __pyx_f[0], 640, 1, __PYX_ERR(0, 640, __pyx_L1_error));

  /* "cuda/ccuda.pyx":641
 * 
 * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing(__pyx_v_hStream, __pyx_v_captureStatus); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 641, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":640
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)
 * 
 * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)
 * 
 */

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

/* "cuda/ccuda.pyx":643
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)
 * 
 * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out, CUgraph *__pyx_v_graph_out, CUgraphNode const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamGetCaptureInfo", __pyx_f[0], 643, 1, __PYX_ERR(0, 643, __pyx_L1_error));

  /* "cuda/ccuda.pyx":644
 * 
 * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 644, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":643
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)
 * 
 * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 * 
 */

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

/* "cuda/ccuda.pyx":646
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 * 
 * cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo_v3(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out, CUgraph *__pyx_v_graph_out, CUgraphNode const **__pyx_v_dependencies_out, CUgraphEdgeData const **__pyx_v_edgeData_out, size_t *__pyx_v_numDependencies_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamGetCaptureInfo_v3", __pyx_f[0], 646, 1, __PYX_ERR(0, 646, __pyx_L1_error));

  /* "cuda/ccuda.pyx":647
 * 
 * cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v3(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_edgeData_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 647, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":646
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 * 
 * cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out)
 * 
 */

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

/* "cuda/ccuda.pyx":649
 *     return ccuda._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out)
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamUpdateCaptureDependencies(CUstream __pyx_v_hStream, CUgraphNode *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamUpdateCaptureDependencies", __pyx_f[0], 649, 1, __PYX_ERR(0, 649, __pyx_L1_error));

  /* "cuda/ccuda.pyx":650
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies(__pyx_v_hStream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":649
 *     return ccuda._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out)
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":652
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamUpdateCaptureDependencies_v2(CUstream __pyx_v_hStream, CUgraphNode *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamUpdateCaptureDependencies_v2", __pyx_f[0], 652, 1, __PYX_ERR(0, 652, __pyx_L1_error));

  /* "cuda/ccuda.pyx":653
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies_v2(__pyx_v_hStream, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 653, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":652
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":655
 *     return ccuda._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags)
 * 
 * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamAttachMemAsync(CUstream __pyx_v_hStream, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_length, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamAttachMemAsync", __pyx_f[0], 655, 1, __PYX_ERR(0, 655, __pyx_L1_error));

  /* "cuda/ccuda.pyx":656
 * 
 * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAttachMemAsync(__pyx_v_hStream, __pyx_v_dptr, __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 656, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":655
 *     return ccuda._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags)
 * 
 * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":658
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)
 * 
 * cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamQuery(hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamQuery(CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamQuery", __pyx_f[0], 658, 1, __PYX_ERR(0, 658, __pyx_L1_error));

  /* "cuda/ccuda.pyx":659
 * 
 * cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamQuery(hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamQuery(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 659, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":658
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)
 * 
 * cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamQuery(hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":661
 *     return ccuda._cuStreamQuery(hStream)
 * 
 * cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamSynchronize(hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamSynchronize(CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamSynchronize", __pyx_f[0], 661, 1, __PYX_ERR(0, 661, __pyx_L1_error));

  /* "cuda/ccuda.pyx":662
 * 
 * cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamSynchronize(hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 662, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":661
 *     return ccuda._cuStreamQuery(hStream)
 * 
 * cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamSynchronize(hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":664
 *     return ccuda._cuStreamSynchronize(hStream)
 * 
 * cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamDestroy_v2(hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamDestroy(CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamDestroy", __pyx_f[0], 664, 1, __PYX_ERR(0, 664, __pyx_L1_error));

  /* "cuda/ccuda.pyx":665
 * 
 * cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamDestroy_v2(hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 665, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":664
 *     return ccuda._cuStreamSynchronize(hStream)
 * 
 * cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamDestroy_v2(hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":667
 *     return ccuda._cuStreamDestroy_v2(hStream)
 * 
 * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCopyAttributes(dst, src)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamCopyAttributes(CUstream __pyx_v_dst, CUstream __pyx_v_src) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamCopyAttributes", __pyx_f[0], 667, 1, __PYX_ERR(0, 667, __pyx_L1_error));

  /* "cuda/ccuda.pyx":668
 * 
 * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamCopyAttributes(dst, src)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 668, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":667
 *     return ccuda._cuStreamDestroy_v2(hStream)
 * 
 * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCopyAttributes(dst, src)
 * 
 */

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

/* "cuda/ccuda.pyx":670
 *     return ccuda._cuStreamCopyAttributes(dst, src)
 * 
 * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue *__pyx_v_value_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamGetAttribute", __pyx_f[0], 670, 1, __PYX_ERR(0, 670, __pyx_L1_error));

  /* "cuda/ccuda.pyx":671
 * 
 * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 671, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":670
 *     return ccuda._cuStreamCopyAttributes(dst, src)
 * 
 * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)
 * 
 */

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

/* "cuda/ccuda.pyx":673
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)
 * 
 * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamSetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue const *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamSetAttribute", __pyx_f[0], 673, 1, __PYX_ERR(0, 673, __pyx_L1_error));

  /* "cuda/ccuda.pyx":674
 * 
 * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 674, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":673
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)
 * 
 * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)
 * 
 */

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

/* "cuda/ccuda.pyx":676
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)
 * 
 * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventCreate(phEvent, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventCreate(CUevent *__pyx_v_phEvent, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEventCreate", __pyx_f[0], 676, 1, __PYX_ERR(0, 676, __pyx_L1_error));

  /* "cuda/ccuda.pyx":677
 * 
 * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEventCreate(phEvent, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate(__pyx_v_phEvent, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":676
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)
 * 
 * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventCreate(phEvent, Flags)
 * 
 */

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

/* "cuda/ccuda.pyx":679
 *     return ccuda._cuEventCreate(phEvent, Flags)
 * 
 * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventRecord(hEvent, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventRecord(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEventRecord", __pyx_f[0], 679, 1, __PYX_ERR(0, 679, __pyx_L1_error));

  /* "cuda/ccuda.pyx":680
 * 
 * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEventRecord(hEvent, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord(__pyx_v_hEvent, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 680, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":679
 *     return ccuda._cuEventCreate(phEvent, Flags)
 * 
 * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventRecord(hEvent, hStream)
 * 
 */

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

/* "cuda/ccuda.pyx":682
 *     return ccuda._cuEventRecord(hEvent, hStream)
 * 
 * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventRecordWithFlags(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEventRecordWithFlags", __pyx_f[0], 682, 1, __PYX_ERR(0, 682, __pyx_L1_error));

  /* "cuda/ccuda.pyx":683
 * 
 * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags(__pyx_v_hEvent, __pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 683, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":682
 *     return ccuda._cuEventRecord(hEvent, hStream)
 * 
 * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":685
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)
 * 
 * cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventQuery(hEvent)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventQuery(CUevent __pyx_v_hEvent) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEventQuery", __pyx_f[0], 685, 1, __PYX_ERR(0, 685, __pyx_L1_error));

  /* "cuda/ccuda.pyx":686
 * 
 * cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEventQuery(hEvent)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":685
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)
 * 
 * cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventQuery(hEvent)
 * 
 */

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

/* "cuda/ccuda.pyx":688
 *     return ccuda._cuEventQuery(hEvent)
 * 
 * cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventSynchronize(hEvent)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventSynchronize(CUevent __pyx_v_hEvent) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEventSynchronize", __pyx_f[0], 688, 1, __PYX_ERR(0, 688, __pyx_L1_error));

  /* "cuda/ccuda.pyx":689
 * 
 * cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEventSynchronize(hEvent)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 689, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":688
 *     return ccuda._cuEventQuery(hEvent)
 * 
 * cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventSynchronize(hEvent)
 * 
 */

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

/* "cuda/ccuda.pyx":691
 *     return ccuda._cuEventSynchronize(hEvent)
 * 
 * cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventDestroy_v2(hEvent)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventDestroy(CUevent __pyx_v_hEvent) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEventDestroy", __pyx_f[0], 691, 1, __PYX_ERR(0, 691, __pyx_L1_error));

  /* "cuda/ccuda.pyx":692
 * 
 * cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEventDestroy_v2(hEvent)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 692, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":691
 *     return ccuda._cuEventSynchronize(hEvent)
 * 
 * cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventDestroy_v2(hEvent)
 * 
 */

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

/* "cuda/ccuda.pyx":694
 *     return ccuda._cuEventDestroy_v2(hEvent)
 * 
 * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventElapsedTime(float *__pyx_v_pMilliseconds, CUevent __pyx_v_hStart, CUevent __pyx_v_hEnd) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEventElapsedTime", __pyx_f[0], 694, 1, __PYX_ERR(0, 694, __pyx_L1_error));

  /* "cuda/ccuda.pyx":695
 * 
 * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime(__pyx_v_pMilliseconds, __pyx_v_hStart, __pyx_v_hEnd); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 695, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":694
 *     return ccuda._cuEventDestroy_v2(hEvent)
 * 
 * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)
 * 
 */

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

/* "cuda/ccuda.pyx":697
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)
 * 
 * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuImportExternalMemory(CUexternalMemory *__pyx_v_extMem_out, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *__pyx_v_memHandleDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuImportExternalMemory", __pyx_f[0], 697, 1, __PYX_ERR(0, 697, __pyx_L1_error));

  /* "cuda/ccuda.pyx":698
 * 
 * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory(__pyx_v_extMem_out, __pyx_v_memHandleDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 698, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":697
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)
 * 
 * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)
 * 
 */

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

/* "cuda/ccuda.pyx":700
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)
 * 
 * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedBuffer(CUdeviceptr *__pyx_v_devPtr, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *__pyx_v_bufferDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuExternalMemoryGetMappedBuffer", __pyx_f[0], 700, 1, __PYX_ERR(0, 700, __pyx_L1_error));

  /* "cuda/ccuda.pyx":701
 * 
 * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedBuffer(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 701, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":700
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)
 * 
 * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
 * 
 */

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

/* "cuda/ccuda.pyx":703
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
 * 
 * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_mipmap, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *__pyx_v_mipmapDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuExternalMemoryGetMappedMipmappedArray", __pyx_f[0], 703, 1, __PYX_ERR(0, 703, __pyx_L1_error));

  /* "cuda/ccuda.pyx":704
 * 
 * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedMipmappedArray(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 704, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":703
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
 * 
 * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
 * 
 */

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

/* "cuda/ccuda.pyx":706
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
 * 
 * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDestroyExternalMemory(extMem)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDestroyExternalMemory(CUexternalMemory __pyx_v_extMem) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDestroyExternalMemory", __pyx_f[0], 706, 1, __PYX_ERR(0, 706, __pyx_L1_error));

  /* "cuda/ccuda.pyx":707
 * 
 * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDestroyExternalMemory(extMem)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalMemory(__pyx_v_extMem); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 707, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":706
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
 * 
 * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDestroyExternalMemory(extMem)
 * 
 */

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

/* "cuda/ccuda.pyx":709
 *     return ccuda._cuDestroyExternalMemory(extMem)
 * 
 * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuImportExternalSemaphore(CUexternalSemaphore *__pyx_v_extSem_out, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *__pyx_v_semHandleDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuImportExternalSemaphore", __pyx_f[0], 709, 1, __PYX_ERR(0, 709, __pyx_L1_error));

  /* "cuda/ccuda.pyx":710
 * 
 * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore(__pyx_v_extSem_out, __pyx_v_semHandleDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 710, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":709
 *     return ccuda._cuDestroyExternalMemory(extMem)
 * 
 * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)
 * 
 */

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

/* "cuda/ccuda.pyx":712
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)
 * 
 * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSignalExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuSignalExternalSemaphoresAsync", __pyx_f[0], 712, 1, __PYX_ERR(0, 712, __pyx_L1_error));

  /* "cuda/ccuda.pyx":713
 * 
 * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSignalExternalSemaphoresAsync(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 713, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":712
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)
 * 
 * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 */

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

/* "cuda/ccuda.pyx":715
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuWaitExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuWaitExternalSemaphoresAsync", __pyx_f[0], 715, 1, __PYX_ERR(0, 715, __pyx_L1_error));

  /* "cuda/ccuda.pyx":716
 * 
 * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 716, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":715
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 */

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

/* "cuda/ccuda.pyx":718
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDestroyExternalSemaphore(extSem)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDestroyExternalSemaphore(CUexternalSemaphore __pyx_v_extSem) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDestroyExternalSemaphore", __pyx_f[0], 718, 1, __PYX_ERR(0, 718, __pyx_L1_error));

  /* "cuda/ccuda.pyx":719
 * 
 * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDestroyExternalSemaphore(extSem)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore(__pyx_v_extSem); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 719, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":718
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDestroyExternalSemaphore(extSem)
 * 
 */

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

/* "cuda/ccuda.pyx":721
 *     return ccuda._cuDestroyExternalSemaphore(extSem)
 * 
 * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWaitValue32(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamWaitValue32", __pyx_f[0], 721, 1, __PYX_ERR(0, 721, __pyx_L1_error));

  /* "cuda/ccuda.pyx":722
 * 
 * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 722, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":721
 *     return ccuda._cuDestroyExternalSemaphore(extSem)
 * 
 * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":724
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWaitValue64(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamWaitValue64", __pyx_f[0], 724, 1, __PYX_ERR(0, 724, __pyx_L1_error));

  /* "cuda/ccuda.pyx":725
 * 
 * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 725, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":724
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":727
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWriteValue32(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamWriteValue32", __pyx_f[0], 727, 1, __PYX_ERR(0, 727, __pyx_L1_error));

  /* "cuda/ccuda.pyx":728
 * 
 * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 728, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":727
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":730
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWriteValue64(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamWriteValue64", __pyx_f[0], 730, 1, __PYX_ERR(0, 730, __pyx_L1_error));

  /* "cuda/ccuda.pyx":731
 * 
 * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 731, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":730
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":733
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamBatchMemOp(CUstream __pyx_v_stream, unsigned int __pyx_v_count, CUstreamBatchMemOpParams *__pyx_v_paramArray, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamBatchMemOp", __pyx_f[0], 733, 1, __PYX_ERR(0, 733, __pyx_L1_error));

  /* "cuda/ccuda.pyx":734
 * 
 * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp_v2(__pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 734, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":733
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)
 * 
 */

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

/* "cuda/ccuda.pyx":736
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)
 * 
 * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUfunction __pyx_v_hfunc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncGetAttribute", __pyx_f[0], 736, 1, __PYX_ERR(0, 736, __pyx_L1_error));

  /* "cuda/ccuda.pyx":737
 * 
 * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute(__pyx_v_pi, __pyx_v_attrib, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 737, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":736
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)
 * 
 * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)
 * 
 */

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

/* "cuda/ccuda.pyx":739
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)
 * 
 * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetAttribute(CUfunction __pyx_v_hfunc, CUfunction_attribute __pyx_v_attrib, int __pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncSetAttribute", __pyx_f[0], 739, 1, __PYX_ERR(0, 739, __pyx_L1_error));

  /* "cuda/ccuda.pyx":740
 * 
 * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute(__pyx_v_hfunc, __pyx_v_attrib, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 740, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":739
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)
 * 
 * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)
 * 
 */

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

/* "cuda/ccuda.pyx":742
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)
 * 
 * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetCacheConfig(CUfunction __pyx_v_hfunc, CUfunc_cache __pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncSetCacheConfig", __pyx_f[0], 742, 1, __PYX_ERR(0, 742, __pyx_L1_error));

  /* "cuda/ccuda.pyx":743
 * 
 * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig(__pyx_v_hfunc, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 743, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":742
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)
 * 
 * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":745
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)
 * 
 * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetModule(hmod, hfunc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncGetModule(CUmodule *__pyx_v_hmod, CUfunction __pyx_v_hfunc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncGetModule", __pyx_f[0], 745, 1, __PYX_ERR(0, 745, __pyx_L1_error));

  /* "cuda/ccuda.pyx":746
 * 
 * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncGetModule(hmod, hfunc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule(__pyx_v_hmod, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 746, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":745
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)
 * 
 * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetModule(hmod, hfunc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":748
 *     return ccuda._cuFuncGetModule(hmod, hfunc)
 * 
 * cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetName(name, hfunc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncGetName(char const **__pyx_v_name, CUfunction __pyx_v_hfunc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncGetName", __pyx_f[0], 748, 1, __PYX_ERR(0, 748, __pyx_L1_error));

  /* "cuda/ccuda.pyx":749
 * 
 * cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncGetName(name, hfunc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetName(__pyx_v_name, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":748
 *     return ccuda._cuFuncGetModule(hmod, hfunc)
 * 
 * cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetName(name, hfunc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncGetName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":751
 *     return ccuda._cuFuncGetName(name, hfunc)
 * 
 * cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncGetParamInfo(CUfunction __pyx_v_func, size_t __pyx_v_paramIndex, size_t *__pyx_v_paramOffset, size_t *__pyx_v_paramSize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncGetParamInfo", __pyx_f[0], 751, 1, __PYX_ERR(0, 751, __pyx_L1_error));

  /* "cuda/ccuda.pyx":752
 * 
 * cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetParamInfo(__pyx_v_func, __pyx_v_paramIndex, __pyx_v_paramOffset, __pyx_v_paramSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 752, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":751
 *     return ccuda._cuFuncGetName(name, hfunc)
 * 
 * cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncGetParamInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":754
 *     return ccuda._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize)
 * 
 * cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncIsLoaded(state, function)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncIsLoaded(CUfunctionLoadingState *__pyx_v_state, CUfunction __pyx_v_function) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncIsLoaded", __pyx_f[0], 754, 1, __PYX_ERR(0, 754, __pyx_L1_error));

  /* "cuda/ccuda.pyx":755
 * 
 * cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncIsLoaded(state, function)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncIsLoaded(__pyx_v_state, __pyx_v_function); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 755, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":754
 *     return ccuda._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize)
 * 
 * cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncIsLoaded(state, function)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncIsLoaded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":757
 *     return ccuda._cuFuncIsLoaded(state, function)
 * 
 * cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncLoad(function)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncLoad(CUfunction __pyx_v_function) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncLoad", __pyx_f[0], 757, 1, __PYX_ERR(0, 757, __pyx_L1_error));

  /* "cuda/ccuda.pyx":758
 * 
 * cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncLoad(function)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncLoad(__pyx_v_function); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 758, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":757
 *     return ccuda._cuFuncIsLoaded(state, function)
 * 
 * cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncLoad(function)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncLoad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":760
 *     return ccuda._cuFuncLoad(function)
 * 
 * cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams, void **__pyx_v_extra) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLaunchKernel", __pyx_f[0], 760, 1, __PYX_ERR(0, 760, __pyx_L1_error));

  /* "cuda/ccuda.pyx":761
 * 
 * cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams, __pyx_v_extra); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 761, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":760
 *     return ccuda._cuFuncLoad(function)
 * 
 * cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuLaunchKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":763
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 * 
 * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchKernelEx(CUlaunchConfig const *__pyx_v_config, CUfunction __pyx_v_f, void **__pyx_v_kernelParams, void **__pyx_v_extra) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLaunchKernelEx", __pyx_f[0], 763, 1, __PYX_ERR(0, 763, __pyx_L1_error));

  /* "cuda/ccuda.pyx":764
 * 
 * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernelEx(__pyx_v_config, __pyx_v_f, __pyx_v_kernelParams, __pyx_v_extra); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 764, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":763
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 * 
 * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuLaunchKernelEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":766
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)
 * 
 * cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLaunchCooperativeKernel", __pyx_f[0], 766, 1, __PYX_ERR(0, 766, __pyx_L1_error));

  /* "cuda/ccuda.pyx":767
 * 
 * cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 767, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":766
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)
 * 
 * cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuLaunchCooperativeKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":769
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 * 
 * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS *__pyx_v_launchParamsList, unsigned int __pyx_v_numDevices, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLaunchCooperativeKernelMultiDevice", __pyx_f[0], 769, 1, __PYX_ERR(0, 769, __pyx_L1_error));

  /* "cuda/ccuda.pyx":770
 * 
 * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice(__pyx_v_launchParamsList, __pyx_v_numDevices, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 770, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":769
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 * 
 * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuLaunchCooperativeKernelMultiDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":772
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)
 * 
 * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchHostFunc(CUstream __pyx_v_hStream, CUhostFn __pyx_v_fn, void *__pyx_v_userData) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLaunchHostFunc", __pyx_f[0], 772, 1, __PYX_ERR(0, 772, __pyx_L1_error));

  /* "cuda/ccuda.pyx":773
 * 
 * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchHostFunc(__pyx_v_hStream, __pyx_v_fn, __pyx_v_userData); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 773, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":772
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)
 * 
 * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":775
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)
 * 
 * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetBlockShape(CUfunction __pyx_v_hfunc, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncSetBlockShape", __pyx_f[0], 775, 1, __PYX_ERR(0, 775, __pyx_L1_error));

  /* "cuda/ccuda.pyx":776
 * 
 * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape(__pyx_v_hfunc, __pyx_v_x, __pyx_v_y, __pyx_v_z); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 776, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":775
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)
 * 
 * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncSetBlockShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":778
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)
 * 
 * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetSharedSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncSetSharedSize", __pyx_f[0], 778, 1, __PYX_ERR(0, 778, __pyx_L1_error));

  /* "cuda/ccuda.pyx":779
 * 
 * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedSize(__pyx_v_hfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 779, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":778
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)
 * 
 * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncSetSharedSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":781
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)
 * 
 * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetSize(hfunc, numbytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSetSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuParamSetSize", __pyx_f[0], 781, 1, __PYX_ERR(0, 781, __pyx_L1_error));

  /* "cuda/ccuda.pyx":782
 * 
 * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuParamSetSize(hfunc, numbytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize(__pyx_v_hfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 782, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":781
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)
 * 
 * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetSize(hfunc, numbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuParamSetSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":784
 *     return ccuda._cuParamSetSize(hfunc, numbytes)
 * 
 * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSeti(hfunc, offset, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSeti(CUfunction __pyx_v_hfunc, int __pyx_v_offset, unsigned int __pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuParamSeti", __pyx_f[0], 784, 1, __PYX_ERR(0, 784, __pyx_L1_error));

  /* "cuda/ccuda.pyx":785
 * 
 * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuParamSeti(hfunc, offset, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 785, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":784
 *     return ccuda._cuParamSetSize(hfunc, numbytes)
 * 
 * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSeti(hfunc, offset, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuParamSeti", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":787
 *     return ccuda._cuParamSeti(hfunc, offset, value)
 * 
 * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetf(hfunc, offset, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSetf(CUfunction __pyx_v_hfunc, int __pyx_v_offset, float __pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuParamSetf", __pyx_f[0], 787, 1, __PYX_ERR(0, 787, __pyx_L1_error));

  /* "cuda/ccuda.pyx":788
 * 
 * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuParamSetf(hfunc, offset, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetf(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 788, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":787
 *     return ccuda._cuParamSeti(hfunc, offset, value)
 * 
 * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetf(hfunc, offset, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuParamSetf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":790
 *     return ccuda._cuParamSetf(hfunc, offset, value)
 * 
 * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSetv(CUfunction __pyx_v_hfunc, int __pyx_v_offset, void *__pyx_v_ptr, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuParamSetv", __pyx_f[0], 790, 1, __PYX_ERR(0, 790, __pyx_L1_error));

  /* "cuda/ccuda.pyx":791
 * 
 * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_ptr, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":790
 *     return ccuda._cuParamSetf(hfunc, offset, value)
 * 
 * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuParamSetv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":793
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)
 * 
 * cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunch(f)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunch(CUfunction __pyx_v_f) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLaunch", __pyx_f[0], 793, 1, __PYX_ERR(0, 793, __pyx_L1_error));

  /* "cuda/ccuda.pyx":794
 * 
 * cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLaunch(f)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunch(__pyx_v_f); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 794, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":793
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)
 * 
 * cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunch(f)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":796
 *     return ccuda._cuLaunch(f)
 * 
 * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchGrid(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLaunchGrid", __pyx_f[0], 796, 1, __PYX_ERR(0, 796, __pyx_L1_error));

  /* "cuda/ccuda.pyx":797
 * 
 * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 797, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":796
 *     return ccuda._cuLaunch(f)
 * 
 * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuLaunchGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":799
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)
 * 
 * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchGridAsync(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuLaunchGridAsync", __pyx_f[0], 799, 1, __PYX_ERR(0, 799, __pyx_L1_error));

  /* "cuda/ccuda.pyx":800
 * 
 * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 800, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":799
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)
 * 
 * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuLaunchGridAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":802
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)
 * 
 * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSetTexRef(CUfunction __pyx_v_hfunc, int __pyx_v_texunit, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuParamSetTexRef", __pyx_f[0], 802, 1, __PYX_ERR(0, 802, __pyx_L1_error));

  /* "cuda/ccuda.pyx":803
 * 
 * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef(__pyx_v_hfunc, __pyx_v_texunit, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 803, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":802
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)
 * 
 * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuParamSetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":805
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)
 * 
 * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetSharedMemConfig(CUfunction __pyx_v_hfunc, CUsharedconfig __pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuFuncSetSharedMemConfig", __pyx_f[0], 805, 1, __PYX_ERR(0, 805, __pyx_L1_error));

  /* "cuda/ccuda.pyx":806
 * 
 * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig(__pyx_v_hfunc, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 806, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":805
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)
 * 
 * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":808
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)
 * 
 * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphCreate(phGraph, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphCreate(CUgraph *__pyx_v_phGraph, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphCreate", __pyx_f[0], 808, 1, __PYX_ERR(0, 808, __pyx_L1_error));

  /* "cuda/ccuda.pyx":809
 * 
 * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphCreate(phGraph, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate(__pyx_v_phGraph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 809, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":808
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)
 * 
 * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphCreate(phGraph, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":811
 *     return ccuda._cuGraphCreate(phGraph, flags)
 * 
 * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddKernelNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddKernelNode", __pyx_f[0], 811, 1, __PYX_ERR(0, 811, __pyx_L1_error));

  /* "cuda/ccuda.pyx":812
 * 
 * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode_v2(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 812, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":811
 *     return ccuda._cuGraphCreate(phGraph, flags)
 * 
 * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddKernelNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":814
 *     return ccuda._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeGetParams_v2(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphKernelNodeGetParams", __pyx_f[0], 814, 1, __PYX_ERR(0, 814, __pyx_L1_error));

  /* "cuda/ccuda.pyx":815
 * 
 * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphKernelNodeGetParams_v2(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams_v2(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 815, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":814
 *     return ccuda._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeGetParams_v2(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":817
 *     return ccuda._cuGraphKernelNodeGetParams_v2(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeSetParams_v2(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphKernelNodeSetParams", __pyx_f[0], 817, 1, __PYX_ERR(0, 817, __pyx_L1_error));

  /* "cuda/ccuda.pyx":818
 * 
 * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphKernelNodeSetParams_v2(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams_v2(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 818, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":817
 *     return ccuda._cuGraphKernelNodeGetParams_v2(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeSetParams_v2(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":820
 *     return ccuda._cuGraphKernelNodeSetParams_v2(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddMemcpyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddMemcpyNode", __pyx_f[0], 820, 1, __PYX_ERR(0, 820, __pyx_L1_error));

  /* "cuda/ccuda.pyx":821
 * 
 * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemcpyNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_copyParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 821, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":820
 *     return ccuda._cuGraphKernelNodeSetParams_v2(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":823
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 * 
 * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphMemcpyNodeGetParams", __pyx_f[0], 823, 1, __PYX_ERR(0, 823, __pyx_L1_error));

  /* "cuda/ccuda.pyx":824
 * 
 * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 824, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":823
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 * 
 * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphMemcpyNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":826
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphMemcpyNodeSetParams", __pyx_f[0], 826, 1, __PYX_ERR(0, 826, __pyx_L1_error));

  /* "cuda/ccuda.pyx":827
 * 
 * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 827, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":826
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":829
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddMemsetNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddMemsetNode", __pyx_f[0], 829, 1, __PYX_ERR(0, 829, __pyx_L1_error));

  /* "cuda/ccuda.pyx":830
 * 
 * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_memsetParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 830, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":829
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":832
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 * 
 * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemsetNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphMemsetNodeGetParams", __pyx_f[0], 832, 1, __PYX_ERR(0, 832, __pyx_L1_error));

  /* "cuda/ccuda.pyx":833
 * 
 * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 833, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":832
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 * 
 * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphMemsetNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":835
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemsetNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphMemsetNodeSetParams", __pyx_f[0], 835, 1, __PYX_ERR(0, 835, __pyx_L1_error));

  /* "cuda/ccuda.pyx":836
 * 
 * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 836, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":835
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":838
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddHostNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddHostNode", __pyx_f[0], 838, 1, __PYX_ERR(0, 838, __pyx_L1_error));

  /* "cuda/ccuda.pyx":839
 * 
 * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddHostNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 839, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":838
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":841
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphHostNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphHostNodeGetParams", __pyx_f[0], 841, 1, __PYX_ERR(0, 841, __pyx_L1_error));

  /* "cuda/ccuda.pyx":842
 * 
 * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 842, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":841
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphHostNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":844
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphHostNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphHostNodeSetParams", __pyx_f[0], 844, 1, __PYX_ERR(0, 844, __pyx_L1_error));

  /* "cuda/ccuda.pyx":845
 * 
 * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 845, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":844
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":847
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddChildGraphNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraph __pyx_v_childGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddChildGraphNode", __pyx_f[0], 847, 1, __PYX_ERR(0, 847, __pyx_L1_error));

  /* "cuda/ccuda.pyx":848
 * 
 * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddChildGraphNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_childGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 848, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":847
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":850
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 * 
 * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphChildGraphNodeGetGraph(CUgraphNode __pyx_v_hNode, CUgraph *__pyx_v_phGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphChildGraphNodeGetGraph", __pyx_f[0], 850, 1, __PYX_ERR(0, 850, __pyx_L1_error));

  /* "cuda/ccuda.pyx":851
 * 
 * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph(__pyx_v_hNode, __pyx_v_phGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 851, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":850
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 * 
 * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphChildGraphNodeGetGraph", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":853
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)
 * 
 * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddEmptyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddEmptyNode", __pyx_f[0], 853, 1, __PYX_ERR(0, 853, __pyx_L1_error));

  /* "cuda/ccuda.pyx":854
 * 
 * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 854, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":853
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)
 * 
 * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":856
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)
 * 
 * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddEventRecordNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddEventRecordNode", __pyx_f[0], 856, 1, __PYX_ERR(0, 856, __pyx_L1_error));

  /* "cuda/ccuda.pyx":857
 * 
 * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventRecordNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 857, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":856
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)
 * 
 * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":859
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphEventRecordNodeGetEvent", __pyx_f[0], 859, 1, __PYX_ERR(0, 859, __pyx_L1_error));

  /* "cuda/ccuda.pyx":860
 * 
 * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent(__pyx_v_hNode, __pyx_v_event_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 860, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":859
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphEventRecordNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":862
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)
 * 
 * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphEventRecordNodeSetEvent", __pyx_f[0], 862, 1, __PYX_ERR(0, 862, __pyx_L1_error));

  /* "cuda/ccuda.pyx":863
 * 
 * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent(__pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 863, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":862
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)
 * 
 * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":865
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)
 * 
 * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddEventWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddEventWaitNode", __pyx_f[0], 865, 1, __PYX_ERR(0, 865, __pyx_L1_error));

  /* "cuda/ccuda.pyx":866
 * 
 * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 866, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":865
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)
 * 
 * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":868
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphEventWaitNodeGetEvent", __pyx_f[0], 868, 1, __PYX_ERR(0, 868, __pyx_L1_error));

  /* "cuda/ccuda.pyx":869
 * 
 * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent(__pyx_v_hNode, __pyx_v_event_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 869, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":868
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphEventWaitNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":871
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)
 * 
 * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphEventWaitNodeSetEvent", __pyx_f[0], 871, 1, __PYX_ERR(0, 871, __pyx_L1_error));

  /* "cuda/ccuda.pyx":872
 * 
 * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent(__pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 872, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":871
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)
 * 
 * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":874
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresSignalNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddExternalSemaphoresSignalNode", __pyx_f[0], 874, 1, __PYX_ERR(0, 874, __pyx_L1_error));

  /* "cuda/ccuda.pyx":875
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 875, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":874
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":877
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_f[0], 877, 1, __PYX_ERR(0, 877, __pyx_L1_error));

  /* "cuda/ccuda.pyx":878
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 878, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":877
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":880
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_f[0], 880, 1, __PYX_ERR(0, 880, __pyx_L1_error));

  /* "cuda/ccuda.pyx":881
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 881, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":880
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":883
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddExternalSemaphoresWaitNode", __pyx_f[0], 883, 1, __PYX_ERR(0, 883, __pyx_L1_error));

  /* "cuda/ccuda.pyx":884
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresWaitNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 884, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":883
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":886
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_f[0], 886, 1, __PYX_ERR(0, 886, __pyx_L1_error));

  /* "cuda/ccuda.pyx":887
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 887, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":886
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":889
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_f[0], 889, 1, __PYX_ERR(0, 889, __pyx_L1_error));

  /* "cuda/ccuda.pyx":890
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 890, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":889
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":892
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddBatchMemOpNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddBatchMemOpNode", __pyx_f[0], 892, 1, __PYX_ERR(0, 892, __pyx_L1_error));

  /* "cuda/ccuda.pyx":893
 * 
 * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddBatchMemOpNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 893, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":892
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddBatchMemOpNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":895
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphBatchMemOpNodeGetParams", __pyx_f[0], 895, 1, __PYX_ERR(0, 895, __pyx_L1_error));

  /* "cuda/ccuda.pyx":896
 * 
 * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 896, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":895
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphBatchMemOpNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":898
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)
 * 
 * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphBatchMemOpNodeSetParams", __pyx_f[0], 898, 1, __PYX_ERR(0, 898, __pyx_L1_error));

  /* "cuda/ccuda.pyx":899
 * 
 * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 899, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":898
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)
 * 
 * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":901
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecBatchMemOpNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecBatchMemOpNodeSetParams", __pyx_f[0], 901, 1, __PYX_ERR(0, 901, __pyx_L1_error));

  /* "cuda/ccuda.pyx":902
 * 
 * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecBatchMemOpNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 902, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":901
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":904
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddMemAllocNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddMemAllocNode", __pyx_f[0], 904, 1, __PYX_ERR(0, 904, __pyx_L1_error));

  /* "cuda/ccuda.pyx":905
 * 
 * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 905, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":904
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":907
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemAllocNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphMemAllocNodeGetParams", __pyx_f[0], 907, 1, __PYX_ERR(0, 907, __pyx_L1_error));

  /* "cuda/ccuda.pyx":908
 * 
 * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemAllocNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 908, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":907
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphMemAllocNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":910
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddMemFreeNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddMemFreeNode", __pyx_f[0], 910, 1, __PYX_ERR(0, 910, __pyx_L1_error));

  /* "cuda/ccuda.pyx":911
 * 
 * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemFreeNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 911, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":910
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":913
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 * 
 * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemFreeNodeGetParams(CUgraphNode __pyx_v_hNode, CUdeviceptr *__pyx_v_dptr_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphMemFreeNodeGetParams", __pyx_f[0], 913, 1, __PYX_ERR(0, 913, __pyx_L1_error));

  /* "cuda/ccuda.pyx":914
 * 
 * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams(__pyx_v_hNode, __pyx_v_dptr_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 914, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":913
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 * 
 * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphMemFreeNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":916
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)
 * 
 * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGraphMemTrim(device)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGraphMemTrim(CUdevice __pyx_v_device) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDeviceGraphMemTrim", __pyx_f[0], 916, 1, __PYX_ERR(0, 916, __pyx_L1_error));

  /* "cuda/ccuda.pyx":917
 * 
 * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceGraphMemTrim(device)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim(__pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 917, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":916
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)
 * 
 * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGraphMemTrim(device)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuDeviceGraphMemTrim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":919
 *     return ccuda._cuDeviceGraphMemTrim(device)
 * 
 * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDeviceGetGraphMemAttribute", __pyx_f[0], 919, 1, __PYX_ERR(0, 919, __pyx_L1_error));

  /* "cuda/ccuda.pyx":920
 * 
 * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 920, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":919
 *     return ccuda._cuDeviceGraphMemTrim(device)
 * 
 * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":922
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)
 * 
 * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceSetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDeviceSetGraphMemAttribute", __pyx_f[0], 922, 1, __PYX_ERR(0, 922, __pyx_L1_error));

  /* "cuda/ccuda.pyx":923
 * 
 * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 923, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":922
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)
 * 
 * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":925
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)
 * 
 * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphClone(CUgraph *__pyx_v_phGraphClone, CUgraph __pyx_v_originalGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphClone", __pyx_f[0], 925, 1, __PYX_ERR(0, 925, __pyx_L1_error));

  /* "cuda/ccuda.pyx":926
 * 
 * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone(__pyx_v_phGraphClone, __pyx_v_originalGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 926, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":925
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)
 * 
 * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":928
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)
 * 
 * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeFindInClone(CUgraphNode *__pyx_v_phNode, CUgraphNode __pyx_v_hOriginalNode, CUgraph __pyx_v_hClonedGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeFindInClone", __pyx_f[0], 928, 1, __PYX_ERR(0, 928, __pyx_L1_error));

  /* "cuda/ccuda.pyx":929
 * 
 * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone(__pyx_v_phNode, __pyx_v_hOriginalNode, __pyx_v_hClonedGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 929, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":928
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)
 * 
 * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":931
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)
 * 
 * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetType(hNode, typename)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetType(CUgraphNode __pyx_v_hNode, CUgraphNodeType *__pyx_v_typename) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeGetType", __pyx_f[0], 931, 1, __PYX_ERR(0, 931, __pyx_L1_error));

  /* "cuda/ccuda.pyx":932
 * 
 * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeGetType(hNode, typename)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType(__pyx_v_hNode, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 932, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":931
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)
 * 
 * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetType(hNode, typename)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":934
 *     return ccuda._cuGraphNodeGetType(hNode, typename)
 * 
 * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphGetNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_nodes, size_t *__pyx_v_numNodes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphGetNodes", __pyx_f[0], 934, 1, __PYX_ERR(0, 934, __pyx_L1_error));

  /* "cuda/ccuda.pyx":935
 * 
 * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes(__pyx_v_hGraph, __pyx_v_nodes, __pyx_v_numNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 935, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":934
 *     return ccuda._cuGraphNodeGetType(hNode, typename)
 * 
 * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":937
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)
 * 
 * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphGetRootNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_rootNodes, size_t *__pyx_v_numRootNodes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphGetRootNodes", __pyx_f[0], 937, 1, __PYX_ERR(0, 937, __pyx_L1_error));

  /* "cuda/ccuda.pyx":938
 * 
 * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes(__pyx_v_hGraph, __pyx_v_rootNodes, __pyx_v_numRootNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 938, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":937
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)
 * 
 * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":940
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)
 * 
 * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphGetEdges(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_from_, CUgraphNode *__pyx_v_to, size_t *__pyx_v_numEdges) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphGetEdges", __pyx_f[0], 940, 1, __PYX_ERR(0, 940, __pyx_L1_error));

  /* "cuda/ccuda.pyx":941
 * 
 * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 941, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":940
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)
 * 
 * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":943
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)
 * 
 * cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphGetEdges_v2(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_from_, CUgraphNode *__pyx_v_to, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numEdges) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphGetEdges_v2", __pyx_f[0], 943, 1, __PYX_ERR(0, 943, __pyx_L1_error));

  /* "cuda/ccuda.pyx":944
 * 
 * cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges_v2(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numEdges); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 944, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":943
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)
 * 
 * cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphGetEdges_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":946
 *     return ccuda._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges)
 * 
 * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetDependencies(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependencies, size_t *__pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeGetDependencies", __pyx_f[0], 946, 1, __PYX_ERR(0, 946, __pyx_L1_error));

  /* "cuda/ccuda.pyx":947
 * 
 * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 947, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":946
 *     return ccuda._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges)
 * 
 * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":949
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)
 * 
 * cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetDependencies_v2(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependencies, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeGetDependencies_v2", __pyx_f[0], 949, 1, __PYX_ERR(0, 949, __pyx_L1_error));

  /* "cuda/ccuda.pyx":950
 * 
 * cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies_v2(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 950, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":949
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)
 * 
 * cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":952
 *     return ccuda._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies)
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetDependentNodes(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependentNodes, size_t *__pyx_v_numDependentNodes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeGetDependentNodes", __pyx_f[0], 952, 1, __PYX_ERR(0, 952, __pyx_L1_error));

  /* "cuda/ccuda.pyx":953
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_numDependentNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 953, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":952
 *     return ccuda._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies)
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":955
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetDependentNodes_v2(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependentNodes, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numDependentNodes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeGetDependentNodes_v2", __pyx_f[0], 955, 1, __PYX_ERR(0, 955, __pyx_L1_error));

  /* "cuda/ccuda.pyx":956
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes_v2(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_edgeData, __pyx_v_numDependentNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 956, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":955
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetDependentNodes_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":958
 *     return ccuda._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes)
 * 
 * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddDependencies", __pyx_f[0], 958, 1, __PYX_ERR(0, 958, __pyx_L1_error));

  /* "cuda/ccuda.pyx":959
 * 
 * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 959, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":958
 *     return ccuda._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes)
 * 
 * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":961
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)
 * 
 * cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddDependencies_v2(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, CUgraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddDependencies_v2", __pyx_f[0], 961, 1, __PYX_ERR(0, 961, __pyx_L1_error));

  /* "cuda/ccuda.pyx":962
 * 
 * cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies_v2(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 962, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":961
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)
 * 
 * cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":964
 *     return ccuda._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies)
 * 
 * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphRemoveDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphRemoveDependencies", __pyx_f[0], 964, 1, __PYX_ERR(0, 964, __pyx_L1_error));

  /* "cuda/ccuda.pyx":965
 * 
 * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 965, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":964
 *     return ccuda._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies)
 * 
 * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":967
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)
 * 
 * cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphRemoveDependencies_v2(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, CUgraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphRemoveDependencies_v2", __pyx_f[0], 967, 1, __PYX_ERR(0, 967, __pyx_L1_error));

  /* "cuda/ccuda.pyx":968
 * 
 * cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies_v2(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 968, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":967
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)
 * 
 * cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphRemoveDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":970
 *     return ccuda._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies)
 * 
 * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDestroyNode(hNode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphDestroyNode(CUgraphNode __pyx_v_hNode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphDestroyNode", __pyx_f[0], 970, 1, __PYX_ERR(0, 970, __pyx_L1_error));

  /* "cuda/ccuda.pyx":971
 * 
 * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphDestroyNode(hNode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroyNode(__pyx_v_hNode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 971, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":970
 *     return ccuda._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies)
 * 
 * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDestroyNode(hNode)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphDestroyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":973
 *     return ccuda._cuGraphDestroyNode(hNode)
 * 
 * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphInstantiate(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphInstantiate", __pyx_f[0], 973, 1, __PYX_ERR(0, 973, __pyx_L1_error));

  /* "cuda/ccuda.pyx":974
 * 
 * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithFlags(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 974, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":973
 *     return ccuda._cuGraphDestroyNode(hNode)
 * 
 * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphInstantiate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":976
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)
 * 
 * cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphInstantiateWithParams(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS *__pyx_v_instantiateParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphInstantiateWithParams", __pyx_f[0], 976, 1, __PYX_ERR(0, 976, __pyx_L1_error));

  /* "cuda/ccuda.pyx":977
 * 
 * cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithParams(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_instantiateParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 977, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":976
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)
 * 
 * cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphInstantiateWithParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":979
 *     return ccuda._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams)
 * 
 * cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecGetFlags(hGraphExec, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecGetFlags(CUgraphExec __pyx_v_hGraphExec, cuuint64_t *__pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecGetFlags", __pyx_f[0], 979, 1, __PYX_ERR(0, 979, __pyx_L1_error));

  /* "cuda/ccuda.pyx":980
 * 
 * cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecGetFlags(hGraphExec, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecGetFlags(__pyx_v_hGraphExec, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 980, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":979
 *     return ccuda._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams)
 * 
 * cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecGetFlags(hGraphExec, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":982
 *     return ccuda._cuGraphExecGetFlags(hGraphExec, flags)
 * 
 * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecKernelNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecKernelNodeSetParams", __pyx_f[0], 982, 1, __PYX_ERR(0, 982, __pyx_L1_error));

  /* "cuda/ccuda.pyx":983
 * 
 * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams_v2(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 983, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":982
 *     return ccuda._cuGraphExecGetFlags(hGraphExec, flags)
 * 
 * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":985
 *     return ccuda._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecMemcpyNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecMemcpyNodeSetParams", __pyx_f[0], 985, 1, __PYX_ERR(0, 985, __pyx_L1_error));

  /* "cuda/ccuda.pyx":986
 * 
 * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemcpyNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_copyParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":985
 *     return ccuda._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":988
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)
 * 
 * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecMemsetNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecMemsetNodeSetParams", __pyx_f[0], 988, 1, __PYX_ERR(0, 988, __pyx_L1_error));

  /* "cuda/ccuda.pyx":989
 * 
 * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_memsetParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 989, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":988
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)
 * 
 * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":991
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)
 * 
 * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecHostNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecHostNodeSetParams", __pyx_f[0], 991, 1, __PYX_ERR(0, 991, __pyx_L1_error));

  /* "cuda/ccuda.pyx":992
 * 
 * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 992, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":991
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)
 * 
 * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":994
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecChildGraphNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraph __pyx_v_childGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecChildGraphNodeSetParams", __pyx_f[0], 994, 1, __PYX_ERR(0, 994, __pyx_L1_error));

  /* "cuda/ccuda.pyx":995
 * 
 * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecChildGraphNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_childGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 995, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":994
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":997
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
 * 
 * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecEventRecordNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecEventRecordNodeSetEvent", __pyx_f[0], 997, 1, __PYX_ERR(0, 997, __pyx_L1_error));

  /* "cuda/ccuda.pyx":998
 * 
 * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 998, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":997
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
 * 
 * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1000
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
 * 
 * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecEventWaitNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecEventWaitNodeSetEvent", __pyx_f[0], 1000, 1, __PYX_ERR(0, 1000, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1001
 * 
 * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1001, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1000
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
 * 
 * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1003
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_f[0], 1003, 1, __PYX_ERR(0, 1003, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1004
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1004, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1003
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1006
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_f[0], 1006, 1, __PYX_ERR(0, 1006, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1007
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1007, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1006
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1009
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeSetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int __pyx_v_isEnabled) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeSetEnabled", __pyx_f[0], 1009, 1, __PYX_ERR(0, 1009, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1010
 * 
 * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1010, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1009
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1012
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
 * 
 * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeGetEnabled", __pyx_f[0], 1012, 1, __PYX_ERR(0, 1012, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1013
 * 
 * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1013, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1012
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
 * 
 * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1015
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
 * 
 * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphUpload(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphUpload", __pyx_f[0], 1015, 1, __PYX_ERR(0, 1015, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1016
 * 
 * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload(__pyx_v_hGraphExec, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1016, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1015
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
 * 
 * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1018
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)
 * 
 * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphLaunch(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphLaunch", __pyx_f[0], 1018, 1, __PYX_ERR(0, 1018, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1019
 * 
 * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch(__pyx_v_hGraphExec, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1019, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1018
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)
 * 
 * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1021
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)
 * 
 * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecDestroy(hGraphExec)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecDestroy(CUgraphExec __pyx_v_hGraphExec) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecDestroy", __pyx_f[0], 1021, 1, __PYX_ERR(0, 1021, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1022
 * 
 * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecDestroy(hGraphExec)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy(__pyx_v_hGraphExec); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1022, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1021
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)
 * 
 * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecDestroy(hGraphExec)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1024
 *     return ccuda._cuGraphExecDestroy(hGraphExec)
 * 
 * cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDestroy(hGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphDestroy(CUgraph __pyx_v_hGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphDestroy", __pyx_f[0], 1024, 1, __PYX_ERR(0, 1024, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1025
 * 
 * cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphDestroy(hGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy(__pyx_v_hGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1025, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1024
 *     return ccuda._cuGraphExecDestroy(hGraphExec)
 * 
 * cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDestroy(hGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1027
 *     return ccuda._cuGraphDestroy(hGraph)
 * 
 * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecUpdate(CUgraphExec __pyx_v_hGraphExec, CUgraph __pyx_v_hGraph, CUgraphExecUpdateResultInfo *__pyx_v_resultInfo) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecUpdate", __pyx_f[0], 1027, 1, __PYX_ERR(0, 1027, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1028
 * 
 * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate_v2(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_resultInfo); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1028, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1027
 *     return ccuda._cuGraphDestroy(hGraph)
 * 
 * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1030
 *     return ccuda._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo)
 * 
 * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeCopyAttributes(CUgraphNode __pyx_v_dst, CUgraphNode __pyx_v_src) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphKernelNodeCopyAttributes", __pyx_f[0], 1030, 1, __PYX_ERR(0, 1030, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1031
 * 
 * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1031, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1030
 *     return ccuda._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo)
 * 
 * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1033
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)
 * 
 * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue *__pyx_v_value_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphKernelNodeGetAttribute", __pyx_f[0], 1033, 1, __PYX_ERR(0, 1033, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1034
 * 
 * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1034, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1033
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)
 * 
 * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1036
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)
 * 
 * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue const *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphKernelNodeSetAttribute", __pyx_f[0], 1036, 1, __PYX_ERR(0, 1036, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1037
 * 
 * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1037, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1036
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)
 * 
 * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1039
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)
 * 
 * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphDebugDotPrint(CUgraph __pyx_v_hGraph, char const *__pyx_v_path, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphDebugDotPrint", __pyx_f[0], 1039, 1, __PYX_ERR(0, 1039, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1040
 * 
 * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint(__pyx_v_hGraph, __pyx_v_path, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1040, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1039
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)
 * 
 * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1042
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)
 * 
 * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuUserObjectCreate(CUuserObject *__pyx_v_object_out, void *__pyx_v_ptr, CUhostFn __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuUserObjectCreate", __pyx_f[0], 1042, 1, __PYX_ERR(0, 1042, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1043
 * 
 * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectCreate(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1043, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1042
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)
 * 
 * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1045
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
 * 
 * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectRetain(object, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuUserObjectRetain(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuUserObjectRetain", __pyx_f[0], 1045, 1, __PYX_ERR(0, 1045, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1046
 * 
 * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuUserObjectRetain(object, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRetain(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1046, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1045
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
 * 
 * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectRetain(object, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1048
 *     return ccuda._cuUserObjectRetain(object, count)
 * 
 * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectRelease(object, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuUserObjectRelease(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuUserObjectRelease", __pyx_f[0], 1048, 1, __PYX_ERR(0, 1048, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1049
 * 
 * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuUserObjectRelease(object, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1049, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1048
 *     return ccuda._cuUserObjectRetain(object, count)
 * 
 * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectRelease(object, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1051
 *     return ccuda._cuUserObjectRelease(object, count)
 * 
 * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphRetainUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphRetainUserObject", __pyx_f[0], 1051, 1, __PYX_ERR(0, 1051, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1052
 * 
 * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1052, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1051
 *     return ccuda._cuUserObjectRelease(object, count)
 * 
 * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1054
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)
 * 
 * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphReleaseUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphReleaseUserObject", __pyx_f[0], 1054, 1, __PYX_ERR(0, 1054, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1055
 * 
 * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphReleaseUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1055, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1054
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)
 * 
 * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1057
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)
 * 
 * cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraphNodeParams *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddNode", __pyx_f[0], 1057, 1, __PYX_ERR(0, 1057, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1058
 * 
 * cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1058, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1057
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)
 * 
 * cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1060
 *     return ccuda._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddNode_v2(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, CUgraphNodeParams *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphAddNode_v2", __pyx_f[0], 1060, 1, __PYX_ERR(0, 1060, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1061
 * 
 * cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddNode_v2(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1061, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1060
 *     return ccuda._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphAddNode_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1063
 *     return ccuda._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeSetParams(CUgraphNode __pyx_v_hNode, CUgraphNodeParams *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphNodeSetParams", __pyx_f[0], 1063, 1, __PYX_ERR(0, 1063, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1064
 * 
 * cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1064, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1063
 *     return ccuda._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1066
 *     return ccuda._cuGraphNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraphNodeParams *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphExecNodeSetParams", __pyx_f[0], 1066, 1, __PYX_ERR(0, 1066, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1067
 * 
 * cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1067, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1066
 *     return ccuda._cuGraphNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphExecNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1069
 *     return ccuda._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphConditionalHandleCreate(CUgraphConditionalHandle *__pyx_v_pHandle_out, CUgraph __pyx_v_hGraph, CUcontext __pyx_v_ctx, unsigned int __pyx_v_defaultLaunchValue, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphConditionalHandleCreate", __pyx_f[0], 1069, 1, __PYX_ERR(0, 1069, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1070
 * 
 * cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphConditionalHandleCreate(__pyx_v_pHandle_out, __pyx_v_hGraph, __pyx_v_ctx, __pyx_v_defaultLaunchValue, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1070, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1069
 *     return ccuda._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphConditionalHandleCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1072
 *     return ccuda._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags)
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_f[0], 1072, 1, __PYX_ERR(0, 1072, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1073
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1073, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1072
 *     return ccuda._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags)
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1075
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_f[0], 1075, 1, __PYX_ERR(0, 1075, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1076
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1076, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1075
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1078
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSize(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuOccupancyMaxPotentialBlockSize", __pyx_f[0], 1078, 1, __PYX_ERR(0, 1078, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1079
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSize(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1078
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxPotentialBlockSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1081
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSizeWithFlags(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_f[0], 1081, 1, __PYX_ERR(0, 1081, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1082
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSizeWithFlags(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1082, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1081
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1084
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 * 
 * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, CUfunction __pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuOccupancyAvailableDynamicSMemPerBlock", __pyx_f[0], 1084, 1, __PYX_ERR(0, 1084, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1085
 * 
 * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyAvailableDynamicSMemPerBlock(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1085, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1084
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 * 
 * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1087
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
 * 
 * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialClusterSize(int *__pyx_v_clusterSize, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuOccupancyMaxPotentialClusterSize", __pyx_f[0], 1087, 1, __PYX_ERR(0, 1087, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1088
 * 
 * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialClusterSize(__pyx_v_clusterSize, __pyx_v_func, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1088, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1087
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
 * 
 * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxPotentialClusterSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1090
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)
 * 
 * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveClusters(int *__pyx_v_numClusters, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuOccupancyMaxActiveClusters", __pyx_f[0], 1090, 1, __PYX_ERR(0, 1090, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1091
 * 
 * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveClusters(__pyx_v_numClusters, __pyx_v_func, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1091, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1090
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)
 * 
 * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxActiveClusters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1093
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)
 * 
 * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetArray(CUtexref __pyx_v_hTexRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetArray", __pyx_f[0], 1093, 1, __PYX_ERR(0, 1093, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1094
 * 
 * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray(__pyx_v_hTexRef, __pyx_v_hArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1094, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1093
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)
 * 
 * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1096
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)
 * 
 * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMipmappedArray(CUtexref __pyx_v_hTexRef, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetMipmappedArray", __pyx_f[0], 1096, 1, __PYX_ERR(0, 1096, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1097
 * 
 * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray(__pyx_v_hTexRef, __pyx_v_hMipmappedArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1097, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1096
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)
 * 
 * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1099
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)
 * 
 * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetAddress(size_t *__pyx_v_ByteOffset, CUtexref __pyx_v_hTexRef, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_numbytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetAddress", __pyx_f[0], 1099, 1, __PYX_ERR(0, 1099, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1100
 * 
 * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress_v2(__pyx_v_ByteOffset, __pyx_v_hTexRef, __pyx_v_dptr, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1100, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1099
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)
 * 
 * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1102
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)
 * 
 * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetAddress2D(CUtexref __pyx_v_hTexRef, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_desc, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_Pitch) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetAddress2D", __pyx_f[0], 1102, 1, __PYX_ERR(0, 1102, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1103
 * 
 * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress2D_v3(__pyx_v_hTexRef, __pyx_v_desc, __pyx_v_dptr, __pyx_v_Pitch); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1103, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1102
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)
 * 
 * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetAddress2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1105
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)
 * 
 * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetFormat(CUtexref __pyx_v_hTexRef, CUarray_format __pyx_v_fmt, int __pyx_v_NumPackedComponents) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetFormat", __pyx_f[0], 1105, 1, __PYX_ERR(0, 1105, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1106
 * 
 * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat(__pyx_v_hTexRef, __pyx_v_fmt, __pyx_v_NumPackedComponents); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1106, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1105
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)
 * 
 * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1108
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)
 * 
 * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetAddressMode(CUtexref __pyx_v_hTexRef, int __pyx_v_dim, CUaddress_mode __pyx_v_am) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetAddressMode", __pyx_f[0], 1108, 1, __PYX_ERR(0, 1108, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1109
 * 
 * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode(__pyx_v_hTexRef, __pyx_v_dim, __pyx_v_am); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1109, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1108
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)
 * 
 * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1111
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)
 * 
 * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetFilterMode", __pyx_f[0], 1111, 1, __PYX_ERR(0, 1111, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1112
 * 
 * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode(__pyx_v_hTexRef, __pyx_v_fm); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1112, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1111
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)
 * 
 * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1114
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)
 * 
 * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetMipmapFilterMode", __pyx_f[0], 1114, 1, __PYX_ERR(0, 1114, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1115
 * 
 * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode(__pyx_v_hTexRef, __pyx_v_fm); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1115, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1114
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)
 * 
 * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1117
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)
 * 
 * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelBias(CUtexref __pyx_v_hTexRef, float __pyx_v_bias) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetMipmapLevelBias", __pyx_f[0], 1117, 1, __PYX_ERR(0, 1117, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1118
 * 
 * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias(__pyx_v_hTexRef, __pyx_v_bias); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1118, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1117
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)
 * 
 * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1120
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)
 * 
 * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelClamp(CUtexref __pyx_v_hTexRef, float __pyx_v_minMipmapLevelClamp, float __pyx_v_maxMipmapLevelClamp) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetMipmapLevelClamp", __pyx_f[0], 1120, 1, __PYX_ERR(0, 1120, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1121
 * 
 * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp(__pyx_v_hTexRef, __pyx_v_minMipmapLevelClamp, __pyx_v_maxMipmapLevelClamp); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1121, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1120
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)
 * 
 * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1123
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 * 
 * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMaxAnisotropy(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_maxAniso) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetMaxAnisotropy", __pyx_f[0], 1123, 1, __PYX_ERR(0, 1123, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1124
 * 
 * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy(__pyx_v_hTexRef, __pyx_v_maxAniso); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1124, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1123
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 * 
 * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1126
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)
 * 
 * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetBorderColor(CUtexref __pyx_v_hTexRef, float *__pyx_v_pBorderColor) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetBorderColor", __pyx_f[0], 1126, 1, __PYX_ERR(0, 1126, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1127
 * 
 * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor(__pyx_v_hTexRef, __pyx_v_pBorderColor); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1127, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1126
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)
 * 
 * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1129
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)
 * 
 * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetFlags(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefSetFlags", __pyx_f[0], 1129, 1, __PYX_ERR(0, 1129, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1130
 * 
 * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags(__pyx_v_hTexRef, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1130, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1129
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)
 * 
 * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1132
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)
 * 
 * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetAddress(CUdeviceptr *__pyx_v_pdptr, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetAddress", __pyx_f[0], 1132, 1, __PYX_ERR(0, 1132, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1133
 * 
 * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddress_v2(__pyx_v_pdptr, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1133, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1132
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)
 * 
 * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1135
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)
 * 
 * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetArray(CUarray *__pyx_v_phArray, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetArray", __pyx_f[0], 1135, 1, __PYX_ERR(0, 1135, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1136
 * 
 * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray(__pyx_v_phArray, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1136, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1135
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)
 * 
 * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1138
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMipmappedArray(CUmipmappedArray *__pyx_v_phMipmappedArray, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetMipmappedArray", __pyx_f[0], 1138, 1, __PYX_ERR(0, 1138, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1139
 * 
 * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray(__pyx_v_phMipmappedArray, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1139, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1138
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1141
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)
 * 
 * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetAddressMode(CUaddress_mode *__pyx_v_pam, CUtexref __pyx_v_hTexRef, int __pyx_v_dim) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetAddressMode", __pyx_f[0], 1141, 1, __PYX_ERR(0, 1141, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1142
 * 
 * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode(__pyx_v_pam, __pyx_v_hTexRef, __pyx_v_dim); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1142, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1141
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)
 * 
 * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1144
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)
 * 
 * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetFilterMode", __pyx_f[0], 1144, 1, __PYX_ERR(0, 1144, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1145
 * 
 * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode(__pyx_v_pfm, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1145, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1144
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)
 * 
 * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1147
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)
 * 
 * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetFormat(CUarray_format *__pyx_v_pFormat, int *__pyx_v_pNumChannels, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetFormat", __pyx_f[0], 1147, 1, __PYX_ERR(0, 1147, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1148
 * 
 * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat(__pyx_v_pFormat, __pyx_v_pNumChannels, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1148, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1147
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)
 * 
 * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1150
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetMipmapFilterMode", __pyx_f[0], 1150, 1, __PYX_ERR(0, 1150, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1151
 * 
 * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode(__pyx_v_pfm, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1151, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1150
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1153
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelBias(float *__pyx_v_pbias, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetMipmapLevelBias", __pyx_f[0], 1153, 1, __PYX_ERR(0, 1153, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1154
 * 
 * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias(__pyx_v_pbias, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1154, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1153
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1156
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelClamp(float *__pyx_v_pminMipmapLevelClamp, float *__pyx_v_pmaxMipmapLevelClamp, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetMipmapLevelClamp", __pyx_f[0], 1156, 1, __PYX_ERR(0, 1156, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1157
 * 
 * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp(__pyx_v_pminMipmapLevelClamp, __pyx_v_pmaxMipmapLevelClamp, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1157, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1156
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1159
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMaxAnisotropy(int *__pyx_v_pmaxAniso, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetMaxAnisotropy", __pyx_f[0], 1159, 1, __PYX_ERR(0, 1159, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1160
 * 
 * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy(__pyx_v_pmaxAniso, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1160, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1159
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1162
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)
 * 
 * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetBorderColor(float *__pyx_v_pBorderColor, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetBorderColor", __pyx_f[0], 1162, 1, __PYX_ERR(0, 1162, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1163
 * 
 * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor(__pyx_v_pBorderColor, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1163, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1162
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)
 * 
 * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1165
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)
 * 
 * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetFlags(unsigned int *__pyx_v_pFlags, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefGetFlags", __pyx_f[0], 1165, 1, __PYX_ERR(0, 1165, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1166
 * 
 * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags(__pyx_v_pFlags, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1166, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1165
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)
 * 
 * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1168
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)
 * 
 * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefCreate(pTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefCreate(CUtexref *__pyx_v_pTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefCreate", __pyx_f[0], 1168, 1, __PYX_ERR(0, 1168, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1169
 * 
 * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefCreate(pTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate(__pyx_v_pTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1169, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1168
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)
 * 
 * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefCreate(pTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1171
 *     return ccuda._cuTexRefCreate(pTexRef)
 * 
 * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefDestroy(hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefDestroy(CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexRefDestroy", __pyx_f[0], 1171, 1, __PYX_ERR(0, 1171, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1172
 * 
 * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexRefDestroy(hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy(__pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1172, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1171
 *     return ccuda._cuTexRefCreate(pTexRef)
 * 
 * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefDestroy(hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexRefDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1174
 *     return ccuda._cuTexRefDestroy(hTexRef)
 * 
 * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfRefSetArray(CUsurfref __pyx_v_hSurfRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuSurfRefSetArray", __pyx_f[0], 1174, 1, __PYX_ERR(0, 1174, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1175
 * 
 * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray(__pyx_v_hSurfRef, __pyx_v_hArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1175, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1174
 *     return ccuda._cuTexRefDestroy(hTexRef)
 * 
 * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuSurfRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1177
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)
 * 
 * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfRefGetArray(CUarray *__pyx_v_phArray, CUsurfref __pyx_v_hSurfRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuSurfRefGetArray", __pyx_f[0], 1177, 1, __PYX_ERR(0, 1177, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1178
 * 
 * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray(__pyx_v_phArray, __pyx_v_hSurfRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1178, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1177
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)
 * 
 * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuSurfRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1180
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)
 * 
 * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectCreate(CUtexObject *__pyx_v_pTexObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc, CUDA_TEXTURE_DESC const *__pyx_v_pTexDesc, CUDA_RESOURCE_VIEW_DESC const *__pyx_v_pResViewDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexObjectCreate", __pyx_f[0], 1180, 1, __PYX_ERR(0, 1180, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1181
 * 
 * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1180
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)
 * 
 * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1183
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 * 
 * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectDestroy(texObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectDestroy(CUtexObject __pyx_v_texObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexObjectDestroy", __pyx_f[0], 1183, 1, __PYX_ERR(0, 1183, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1184
 * 
 * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexObjectDestroy(texObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectDestroy(__pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1184, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1183
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 * 
 * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectDestroy(texObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1186
 *     return ccuda._cuTexObjectDestroy(texObject)
 * 
 * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexObjectGetResourceDesc", __pyx_f[0], 1186, 1, __PYX_ERR(0, 1186, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1187
 * 
 * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc(__pyx_v_pResDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1187, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1186
 *     return ccuda._cuTexObjectDestroy(texObject)
 * 
 * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1189
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)
 * 
 * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC *__pyx_v_pTexDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexObjectGetTextureDesc", __pyx_f[0], 1189, 1, __PYX_ERR(0, 1189, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1190
 * 
 * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc(__pyx_v_pTexDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1190, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1189
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)
 * 
 * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexObjectGetTextureDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1192
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)
 * 
 * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTexObjectGetResourceViewDesc", __pyx_f[0], 1192, 1, __PYX_ERR(0, 1192, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1193
 * 
 * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc(__pyx_v_pResViewDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1193, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1192
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)
 * 
 * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTexObjectGetResourceViewDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1195
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)
 * 
 * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfObjectCreate(CUsurfObject *__pyx_v_pSurfObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuSurfObjectCreate", __pyx_f[0], 1195, 1, __PYX_ERR(0, 1195, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1196
 * 
 * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate(__pyx_v_pSurfObject, __pyx_v_pResDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1196, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1195
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)
 * 
 * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuSurfObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1198
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)
 * 
 * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectDestroy(surfObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfObjectDestroy(CUsurfObject __pyx_v_surfObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuSurfObjectDestroy", __pyx_f[0], 1198, 1, __PYX_ERR(0, 1198, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1199
 * 
 * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuSurfObjectDestroy(surfObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectDestroy(__pyx_v_surfObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1199, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1198
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)
 * 
 * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectDestroy(surfObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuSurfObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1201
 *     return ccuda._cuSurfObjectDestroy(surfObject)
 * 
 * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUsurfObject __pyx_v_surfObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuSurfObjectGetResourceDesc", __pyx_f[0], 1201, 1, __PYX_ERR(0, 1201, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1202
 * 
 * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const cuuint32_t* boxDim, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc(__pyx_v_pResDesc, __pyx_v_surfObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1201
 *     return ccuda._cuSurfObjectDestroy(surfObject)
 * 
 * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuSurfObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1204
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)
 * 
 * cdef CUresult cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const cuuint32_t* boxDim, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTensorMapEncodeTiled(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, cuuint32_t const *__pyx_v_boxDim, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTensorMapEncodeTiled", __pyx_f[0], 1204, 1, __PYX_ERR(0, 1204, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1205
 * 
 * cdef CUresult cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const cuuint32_t* boxDim, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapEncodeTiled(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_boxDim, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1205, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1204
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)
 * 
 * cdef CUresult cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const cuuint32_t* boxDim, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTensorMapEncodeTiled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1207
 *     return ccuda._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 * 
 * cdef CUresult cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTensorMapEncodeIm2col(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, int const *__pyx_v_pixelBoxLowerCorner, int const *__pyx_v_pixelBoxUpperCorner, cuuint32_t __pyx_v_channelsPerPixel, cuuint32_t __pyx_v_pixelsPerColumn, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTensorMapEncodeIm2col", __pyx_f[0], 1207, 1, __PYX_ERR(0, 1207, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1208
 * 
 * cdef CUresult cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapEncodeIm2col(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_pixelBoxLowerCorner, __pyx_v_pixelBoxUpperCorner, __pyx_v_channelsPerPixel, __pyx_v_pixelsPerColumn, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1208, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1207
 *     return ccuda._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 * 
 * cdef CUresult cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTensorMapEncodeIm2col", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1210
 *     return ccuda._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 * 
 * cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTensorMapReplaceAddress(tensorMap, globalAddress)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTensorMapReplaceAddress(CUtensorMap *__pyx_v_tensorMap, void *__pyx_v_globalAddress) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuTensorMapReplaceAddress", __pyx_f[0], 1210, 1, __PYX_ERR(0, 1210, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1211
 * 
 * cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuTensorMapReplaceAddress(tensorMap, globalAddress)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapReplaceAddress(__pyx_v_tensorMap, __pyx_v_globalAddress); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1211, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1210
 *     return ccuda._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 * 
 * cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTensorMapReplaceAddress(tensorMap, globalAddress)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuTensorMapReplaceAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1213
 *     return ccuda._cuTensorMapReplaceAddress(tensorMap, globalAddress)
 * 
 * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, CUdevice __pyx_v_dev, CUdevice __pyx_v_peerDev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDeviceCanAccessPeer", __pyx_f[0], 1213, 1, __PYX_ERR(0, 1213, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1214
 * 
 * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer(__pyx_v_canAccessPeer, __pyx_v_dev, __pyx_v_peerDev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1214, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1213
 *     return ccuda._cuTensorMapReplaceAddress(tensorMap, globalAddress)
 * 
 * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1216
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)
 * 
 * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxEnablePeerAccess(CUcontext __pyx_v_peerContext, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCtxEnablePeerAccess", __pyx_f[0], 1216, 1, __PYX_ERR(0, 1216, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1217
 * 
 * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess(__pyx_v_peerContext, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1217, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1216
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)
 * 
 * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuCtxEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1219
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)
 * 
 * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxDisablePeerAccess(CUcontext __pyx_v_peerContext) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCtxDisablePeerAccess", __pyx_f[0], 1219, 1, __PYX_ERR(0, 1219, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1220
 * 
 * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess(__pyx_v_peerContext); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1220, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1219
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)
 * 
 * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuCtxDisablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1222
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)
 * 
 * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetP2PAttribute(int *__pyx_v_value, CUdevice_P2PAttribute __pyx_v_attrib, CUdevice __pyx_v_srcDevice, CUdevice __pyx_v_dstDevice) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDeviceGetP2PAttribute", __pyx_f[0], 1222, 1, __PYX_ERR(0, 1222, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1223
 * 
 * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute(__pyx_v_value, __pyx_v_attrib, __pyx_v_srcDevice, __pyx_v_dstDevice); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1223, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1222
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)
 * 
 * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1225
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)
 * 
 * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsUnregisterResource(resource)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsUnregisterResource(CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsUnregisterResource", __pyx_f[0], 1225, 1, __PYX_ERR(0, 1225, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1226
 * 
 * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsUnregisterResource(resource)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource(__pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1226, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1225
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)
 * 
 * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsUnregisterResource(resource)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsUnregisterResource", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1228
 *     return ccuda._cuGraphicsUnregisterResource(resource)
 * 
 * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsSubResourceGetMappedArray(CUarray *__pyx_v_pArray, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsSubResourceGetMappedArray", __pyx_f[0], 1228, 1, __PYX_ERR(0, 1228, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1229
 * 
 * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray(__pyx_v_pArray, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1229, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1228
 *     return ccuda._cuGraphicsUnregisterResource(resource)
 * 
 * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1231
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_pMipmappedArray, CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsResourceGetMappedMipmappedArray", __pyx_f[0], 1231, 1, __PYX_ERR(0, 1231, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1232
 * 
 * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedMipmappedArray(__pyx_v_pMipmappedArray, __pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1232, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1231
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsResourceGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1234
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedPointer(CUdeviceptr *__pyx_v_pDevPtr, size_t *__pyx_v_pSize, CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsResourceGetMappedPointer", __pyx_f[0], 1234, 1, __PYX_ERR(0, 1234, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1235
 * 
 * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2(__pyx_v_pDevPtr, __pyx_v_pSize, __pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1235, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1234
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsResourceGetMappedPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1237
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)
 * 
 * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsResourceSetMapFlags(CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsResourceSetMapFlags", __pyx_f[0], 1237, 1, __PYX_ERR(0, 1237, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1238
 * 
 * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2(__pyx_v_resource, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1238, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1237
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)
 * 
 * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsResourceSetMapFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1240
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)
 * 
 * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsMapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsMapResources", __pyx_f[0], 1240, 1, __PYX_ERR(0, 1240, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1241
 * 
 * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1241, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1240
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)
 * 
 * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1243
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)
 * 
 * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsUnmapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsUnmapResources", __pyx_f[0], 1243, 1, __PYX_ERR(0, 1243, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1244
 * 
 * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1244, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1243
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)
 * 
 * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1246
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)
 * 
 * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGetProcAddress(char const *__pyx_v_symbol, void **__pyx_v_pfn, int __pyx_v_cudaVersion, cuuint64_t __pyx_v_flags, CUdriverProcAddressQueryResult *__pyx_v_symbolStatus) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGetProcAddress", __pyx_f[0], 1246, 1, __PYX_ERR(0, 1246, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1247
 * 
 * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress_v2(__pyx_v_symbol, __pyx_v_pfn, __pyx_v_cudaVersion, __pyx_v_flags, __pyx_v_symbolStatus); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1247, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1246
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)
 * 
 * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGetProcAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1249
 *     return ccuda._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus)
 * 
 * cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCoredumpGetAttribute(attrib, value, size)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCoredumpGetAttribute(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCoredumpGetAttribute", __pyx_f[0], 1249, 1, __PYX_ERR(0, 1249, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1250
 * 
 * cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCoredumpGetAttribute(attrib, value, size)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpGetAttribute(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1250, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1249
 *     return ccuda._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus)
 * 
 * cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCoredumpGetAttribute(attrib, value, size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuCoredumpGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1252
 *     return ccuda._cuCoredumpGetAttribute(attrib, value, size)
 * 
 * cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCoredumpGetAttributeGlobal(attrib, value, size)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCoredumpGetAttributeGlobal(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCoredumpGetAttributeGlobal", __pyx_f[0], 1252, 1, __PYX_ERR(0, 1252, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1253
 * 
 * cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCoredumpGetAttributeGlobal(attrib, value, size)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpGetAttributeGlobal(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1253, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1252
 *     return ccuda._cuCoredumpGetAttribute(attrib, value, size)
 * 
 * cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCoredumpGetAttributeGlobal(attrib, value, size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuCoredumpGetAttributeGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1255
 *     return ccuda._cuCoredumpGetAttributeGlobal(attrib, value, size)
 * 
 * cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCoredumpSetAttribute(attrib, value, size)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCoredumpSetAttribute(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCoredumpSetAttribute", __pyx_f[0], 1255, 1, __PYX_ERR(0, 1255, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1256
 * 
 * cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCoredumpSetAttribute(attrib, value, size)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpSetAttribute(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1256, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1255
 *     return ccuda._cuCoredumpGetAttributeGlobal(attrib, value, size)
 * 
 * cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCoredumpSetAttribute(attrib, value, size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuCoredumpSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1258
 *     return ccuda._cuCoredumpSetAttribute(attrib, value, size)
 * 
 * cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCoredumpSetAttributeGlobal(attrib, value, size)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCoredumpSetAttributeGlobal(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCoredumpSetAttributeGlobal", __pyx_f[0], 1258, 1, __PYX_ERR(0, 1258, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1259
 * 
 * cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCoredumpSetAttributeGlobal(attrib, value, size)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpSetAttributeGlobal(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1259, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1258
 *     return ccuda._cuCoredumpSetAttribute(attrib, value, size)
 * 
 * cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCoredumpSetAttributeGlobal(attrib, value, size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuCoredumpSetAttributeGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1261
 *     return ccuda._cuCoredumpSetAttributeGlobal(attrib, value, size)
 * 
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGetExportTable(void const **__pyx_v_ppExportTable, CUuuid const *__pyx_v_pExportTableId) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGetExportTable", __pyx_f[0], 1261, 1, __PYX_ERR(0, 1261, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1262
 * 
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable(__pyx_v_ppExportTable, __pyx_v_pExportTableId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1262, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1261
 *     return ccuda._cuCoredumpSetAttributeGlobal(attrib, value, size)
 * 
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGetExportTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1264
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)
 * 
 * cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxCreate(phCtx, desc, dev, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGreenCtxCreate(CUgreenCtx *__pyx_v_phCtx, CUdevResourceDesc __pyx_v_desc, CUdevice __pyx_v_dev, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGreenCtxCreate", __pyx_f[0], 1264, 1, __PYX_ERR(0, 1264, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1265
 * 
 * cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGreenCtxCreate(phCtx, desc, dev, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxCreate(__pyx_v_phCtx, __pyx_v_desc, __pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1265, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1264
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)
 * 
 * cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxCreate(phCtx, desc, dev, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGreenCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1267
 *     return ccuda._cuGreenCtxCreate(phCtx, desc, dev, flags)
 * 
 * cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxDestroy(hCtx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGreenCtxDestroy(CUgreenCtx __pyx_v_hCtx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGreenCtxDestroy", __pyx_f[0], 1267, 1, __PYX_ERR(0, 1267, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1268
 * 
 * cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGreenCtxDestroy(hCtx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxDestroy(__pyx_v_hCtx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1268, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1267
 *     return ccuda._cuGreenCtxCreate(phCtx, desc, dev, flags)
 * 
 * cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxDestroy(hCtx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGreenCtxDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1270
 *     return ccuda._cuGreenCtxDestroy(hCtx)
 * 
 * cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxFromGreenCtx(pContext, hCtx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxFromGreenCtx(CUcontext *__pyx_v_pContext, CUgreenCtx __pyx_v_hCtx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCtxFromGreenCtx", __pyx_f[0], 1270, 1, __PYX_ERR(0, 1270, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1271
 * 
 * cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCtxFromGreenCtx(pContext, hCtx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxFromGreenCtx(__pyx_v_pContext, __pyx_v_hCtx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1271, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1270
 *     return ccuda._cuGreenCtxDestroy(hCtx)
 * 
 * cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxFromGreenCtx(pContext, hCtx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuCtxFromGreenCtx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1273
 *     return ccuda._cuCtxFromGreenCtx(pContext, hCtx)
 * 
 * cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetDevResource(device, resource, typename)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetDevResource(CUdevice __pyx_v_device, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDeviceGetDevResource", __pyx_f[0], 1273, 1, __PYX_ERR(0, 1273, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1274
 * 
 * cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDeviceGetDevResource(device, resource, typename)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDevResource(__pyx_v_device, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1274, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1273
 *     return ccuda._cuCtxFromGreenCtx(pContext, hCtx)
 * 
 * cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetDevResource(device, resource, typename)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1276
 *     return ccuda._cuDeviceGetDevResource(device, resource, typename)
 * 
 * cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetDevResource(hCtx, resource, typename)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetDevResource(CUcontext __pyx_v_hCtx, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuCtxGetDevResource", __pyx_f[0], 1276, 1, __PYX_ERR(0, 1276, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1277
 * 
 * cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuCtxGetDevResource(hCtx, resource, typename)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevResource(__pyx_v_hCtx, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1277, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1276
 *     return ccuda._cuDeviceGetDevResource(device, resource, typename)
 * 
 * cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetDevResource(hCtx, resource, typename)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuCtxGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1279
 *     return ccuda._cuCtxGetDevResource(hCtx, resource, typename)
 * 
 * cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxGetDevResource(hCtx, resource, typename)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGreenCtxGetDevResource(CUgreenCtx __pyx_v_hCtx, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGreenCtxGetDevResource", __pyx_f[0], 1279, 1, __PYX_ERR(0, 1279, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1280
 * 
 * cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGreenCtxGetDevResource(hCtx, resource, typename)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxGetDevResource(__pyx_v_hCtx, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1280, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1279
 *     return ccuda._cuCtxGetDevResource(hCtx, resource, typename)
 * 
 * cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxGetDevResource(hCtx, resource, typename)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGreenCtxGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1282
 *     return ccuda._cuGreenCtxGetDevResource(hCtx, resource, typename)
 * 
 * cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDevSmResourceSplitByCount(CUdevResource *__pyx_v_result, unsigned int *__pyx_v_nbGroups, CUdevResource const *__pyx_v_input, CUdevResource *__pyx_v_remaining, unsigned int __pyx_v_useFlags, unsigned int __pyx_v_minCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDevSmResourceSplitByCount", __pyx_f[0], 1282, 1, __PYX_ERR(0, 1282, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1283
 * 
 * cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevSmResourceSplitByCount(__pyx_v_result, __pyx_v_nbGroups, __pyx_v_input, __pyx_v_remaining, __pyx_v_useFlags, __pyx_v_minCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1283, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1282
 *     return ccuda._cuGreenCtxGetDevResource(hCtx, resource, typename)
 * 
 * cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuDevSmResourceSplitByCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1285
 *     return ccuda._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount)
 * 
 * cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevResourceGenerateDesc(phDesc, resources, nbResources)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDevResourceGenerateDesc(CUdevResourceDesc *__pyx_v_phDesc, CUdevResource *__pyx_v_resources, unsigned int __pyx_v_nbResources) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuDevResourceGenerateDesc", __pyx_f[0], 1285, 1, __PYX_ERR(0, 1285, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1286
 * 
 * cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuDevResourceGenerateDesc(phDesc, resources, nbResources)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevResourceGenerateDesc(__pyx_v_phDesc, __pyx_v_resources, __pyx_v_nbResources); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1286, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1285
 *     return ccuda._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount)
 * 
 * cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevResourceGenerateDesc(phDesc, resources, nbResources)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuDevResourceGenerateDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1288
 *     return ccuda._cuDevResourceGenerateDesc(phDesc, resources, nbResources)
 * 
 * cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxRecordEvent(hCtx, hEvent)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGreenCtxRecordEvent(CUgreenCtx __pyx_v_hCtx, CUevent __pyx_v_hEvent) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGreenCtxRecordEvent", __pyx_f[0], 1288, 1, __PYX_ERR(0, 1288, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1289
 * 
 * cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGreenCtxRecordEvent(hCtx, hEvent)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxRecordEvent(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1289, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1288
 *     return ccuda._cuDevResourceGenerateDesc(phDesc, resources, nbResources)
 * 
 * cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxRecordEvent(hCtx, hEvent)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGreenCtxRecordEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1291
 *     return ccuda._cuGreenCtxRecordEvent(hCtx, hEvent)
 * 
 * cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxWaitEvent(hCtx, hEvent)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGreenCtxWaitEvent(CUgreenCtx __pyx_v_hCtx, CUevent __pyx_v_hEvent) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGreenCtxWaitEvent", __pyx_f[0], 1291, 1, __PYX_ERR(0, 1291, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1292
 * 
 * cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGreenCtxWaitEvent(hCtx, hEvent)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxWaitEvent(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1292, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1291
 *     return ccuda._cuGreenCtxRecordEvent(hCtx, hEvent)
 * 
 * cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGreenCtxWaitEvent(hCtx, hEvent)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGreenCtxWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1294
 *     return ccuda._cuGreenCtxWaitEvent(hCtx, hEvent)
 * 
 * cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetGreenCtx(hStream, phCtx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetGreenCtx(CUstream __pyx_v_hStream, CUgreenCtx *__pyx_v_phCtx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuStreamGetGreenCtx", __pyx_f[0], 1294, 1, __PYX_ERR(0, 1294, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1295
 * 
 * cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuStreamGetGreenCtx(hStream, phCtx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetGreenCtx(__pyx_v_hStream, __pyx_v_phCtx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1295, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1294
 *     return ccuda._cuGreenCtxWaitEvent(hCtx, hEvent)
 * 
 * cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetGreenCtx(hStream, phCtx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuStreamGetGreenCtx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1297
 *     return ccuda._cuStreamGetGreenCtx(hStream, phCtx)
 * 
 * cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerStart()
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuProfilerStart(void) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuProfilerStart", __pyx_f[0], 1297, 1, __PYX_ERR(0, 1297, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1298
 * 
 * cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuProfilerStart()             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1298, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1297
 *     return ccuda._cuStreamGetGreenCtx(hStream, phCtx)
 * 
 * cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerStart()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuProfilerStart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1300
 *     return ccuda._cuProfilerStart()
 * 
 * cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerStop()
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuProfilerStop(void) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuProfilerStop", __pyx_f[0], 1300, 1, __PYX_ERR(0, 1300, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1301
 * 
 * cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuProfilerStop()             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1301, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1300
 *     return ccuda._cuProfilerStart()
 * 
 * cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerStop()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuProfilerStop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1303
 *     return ccuda._cuProfilerStop()
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsEGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_EGLImageKHR __pyx_v_image, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsEGLRegisterImage", __pyx_f[0], 1303, 1, __PYX_ERR(0, 1303, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1304
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsEGLRegisterImage(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1304, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1303
 *     return ccuda._cuProfilerStop()
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1306
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)
 * 
 * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamConsumerConnect", __pyx_f[0], 1306, 1, __PYX_ERR(0, 1306, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1307
 * 
 * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnect(__pyx_v_conn, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1307, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1306
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)
 * 
 * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1309
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)
 * 
 * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnectWithFlags(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamConsumerConnectWithFlags", __pyx_f[0], 1309, 1, __PYX_ERR(0, 1309, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1310
 * 
 * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnectWithFlags(__pyx_v_conn, __pyx_v_stream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1310, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1309
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)
 * 
 * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1312
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)
 * 
 * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerDisconnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamConsumerDisconnect", __pyx_f[0], 1312, 1, __PYX_ERR(0, 1312, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1313
 * 
 * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerDisconnect(__pyx_v_conn); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1313, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1312
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)
 * 
 * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1315
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)
 * 
 * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerAcquireFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource *__pyx_v_pCudaResource, CUstream *__pyx_v_pStream, unsigned int __pyx_v_timeout) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamConsumerAcquireFrame", __pyx_f[0], 1315, 1, __PYX_ERR(0, 1315, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1316
 * 
 * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerAcquireFrame(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream, __pyx_v_timeout); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1316, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1315
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)
 * 
 * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1318
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
 * 
 * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerReleaseFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource __pyx_v_pCudaResource, CUstream *__pyx_v_pStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamConsumerReleaseFrame", __pyx_f[0], 1318, 1, __PYX_ERR(0, 1318, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1319
 * 
 * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1319, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1318
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
 * 
 * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1321
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
 * 
 * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamProducerConnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream, __pyx_t_4cuda_5ccuda_EGLint __pyx_v_width, __pyx_t_4cuda_5ccuda_EGLint __pyx_v_height) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamProducerConnect", __pyx_f[0], 1321, 1, __PYX_ERR(0, 1321, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1322
 * 
 * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerConnect(__pyx_v_conn, __pyx_v_stream, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1322, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1321
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
 * 
 * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1324
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)
 * 
 * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamProducerDisconnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamProducerDisconnect", __pyx_f[0], 1324, 1, __PYX_ERR(0, 1324, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1325
 * 
 * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerDisconnect(__pyx_v_conn); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1325, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1324
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)
 * 
 * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamProducerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1327
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)
 * 
 * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamProducerPresentFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUeglFrame __pyx_v_eglframe, CUstream *__pyx_v_pStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamProducerPresentFrame", __pyx_f[0], 1327, 1, __PYX_ERR(0, 1327, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1328
 * 
 * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerPresentFrame(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1328, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1327
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)
 * 
 * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1330
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)
 * 
 * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamProducerReturnFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_eglframe, CUstream *__pyx_v_pStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEGLStreamProducerReturnFrame", __pyx_f[0], 1330, 1, __PYX_ERR(0, 1330, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1331
 * 
 * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1331, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1330
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)
 * 
 * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1333
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedEglFrame(__pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_eglFrame, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsResourceGetMappedEglFrame", __pyx_f[0], 1333, 1, __PYX_ERR(0, 1333, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1334
 * 
 * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame(__pyx_v_eglFrame, __pyx_v_resource, __pyx_v_index, __pyx_v_mipLevel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1334, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1333
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1336
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
 * 
 * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventCreateFromEGLSync(CUevent *__pyx_v_phEvent, __pyx_t_4cuda_5ccuda_EGLSyncKHR __pyx_v_eglSync, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuEventCreateFromEGLSync", __pyx_f[0], 1336, 1, __PYX_ERR(0, 1336, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1337
 * 
 * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventCreateFromEGLSync(__pyx_v_phEvent, __pyx_v_eglSync, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1337, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1336
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
 * 
 * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1339
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterBuffer(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_GLuint __pyx_v_buffer, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsGLRegisterBuffer", __pyx_f[0], 1339, 1, __PYX_ERR(0, 1339, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1340
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterBuffer(__pyx_v_pCudaResource, __pyx_v_buffer, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1340, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1339
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1342
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)
 * 
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_GLuint __pyx_v_image, __pyx_t_4cuda_5ccuda_GLenum __pyx_v_target, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsGLRegisterImage", __pyx_f[0], 1342, 1, __PYX_ERR(0, 1342, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1343
 * 
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterImage(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_target, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1343, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1342
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)
 * 
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1345
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGLGetDevices(unsigned int *__pyx_v_pCudaDeviceCount, CUdevice *__pyx_v_pCudaDevices, unsigned int __pyx_v_cudaDeviceCount, __pyx_t_4cuda_5ccuda_CUGLDeviceList __pyx_v_deviceList) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGLGetDevices", __pyx_f[0], 1345, 1, __PYX_ERR(0, 1345, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1346
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGLGetDevices_v2(__pyx_v_pCudaDeviceCount, __pyx_v_pCudaDevices, __pyx_v_cudaDeviceCount, __pyx_v_deviceList); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1346, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1345
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGLGetDevices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1348
 *     return ccuda._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuVDPAUGetDevice(CUdevice *__pyx_v_pDevice, __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuVDPAUGetDevice", __pyx_f[0], 1348, 1, __PYX_ERR(0, 1348, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1349
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice(__pyx_v_pDevice, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1349, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1348
 *     return ccuda._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1351
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)
 * 
 * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuVDPAUCtxCreate(CUcontext *__pyx_v_pCtx, unsigned int __pyx_v_flags, CUdevice __pyx_v_device, __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuVDPAUCtxCreate", __pyx_f[0], 1351, 1, __PYX_ERR(0, 1351, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1352
 * 
 * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUCtxCreate_v2(__pyx_v_pCtx, __pyx_v_flags, __pyx_v_device, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1352, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1351
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)
 * 
 * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuVDPAUCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1354
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 * 
 * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_VdpVideoSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsVDPAURegisterVideoSurface", __pyx_f[0], 1354, 1, __PYX_ERR(0, 1354, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1355
 * 
 * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterVideoSurface(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1355, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1354
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 * 
 * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1357
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)
 * 
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_VdpOutputSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_TraceCall("cuGraphicsVDPAURegisterOutputSurface", __pyx_f[0], 1357, 1, __PYX_ERR(0, 1357, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1358
 * 
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     return ccuda._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterOutputSurface(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1358, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1357
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)
 * 
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)
 */

  /* function exit code */
  __pyx_L1_error:;
  #ifdef WITH_THREAD
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_AddTraceback("cuda.ccuda.cuGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#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
/* #### Code section: pystring_table ### */

static int __Pyx_CreateStringTabAndInitStrings(void) {
  __Pyx_StringTabEntry __pyx_string_tab[] = {
    {&__pyx_n_s_, __pyx_k_, sizeof(__pyx_k_), 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_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
    {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
    {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0}
  };
  return __Pyx_InitStrings(__pyx_string_tab);
}
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  return 0;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  __Pyx_RefNannyFinishContext();
  return 0;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  return 0;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("cuGetErrorString", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGetErrorString, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGetErrorName", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGetErrorName, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuInit", (void (*)(void))__pyx_f_4cuda_5ccuda_cuInit, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDriverGetVersion", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGet", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGet, "CUresult (CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetCount", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetName", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetName, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetUuid", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetUuid, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetUuid_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetUuid_v2, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetLuid", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceTotalMem", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceTotalMem, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetTexture1DLinearMaxWidth, "CUresult (size_t *, CUarray_format, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetAttribute, "CUresult (int *, CUdevice_attribute, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetNvSciSyncAttributes, "CUresult (void *, CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceSetMemPool, "CUresult (CUdevice, CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetDefaultMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetExecAffinitySupport", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFlushGPUDirectRDMAWrites, "CUresult (CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetProperties", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetProperties, "CUresult (CUdevprop *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceComputeCapability", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceComputeCapability, "CUresult (int *, int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxRetain", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxRelease", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRelease, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxSetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxSetFlags, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxGetState", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxReset", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxReset, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxCreate, "CUresult (CUcontext *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxCreate_v3", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxCreate_v3, "CUresult (CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxDestroy, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxPushCurrent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxPushCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxPopCurrent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxPopCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetCurrent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetCurrent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetDevice", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetFlags, "CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetFlags, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetId", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetId, "CUresult (CUcontext, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSynchronize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetLimit", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetLimit, "CUresult (CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetLimit", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetLimit, "CUresult (size_t *, CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetCacheConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetCacheConfig, "CUresult (CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetCacheConfig, "CUresult (CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetApiVersion", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetApiVersion, "CUresult (CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetStreamPriorityRange, "CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetExecAffinity", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetExecAffinity, "CUresult (CUexecAffinityParam *, CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxAttach", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxAttach, "CUresult (CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxDetach", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleLoad", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleLoad, "CUresult (CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleLoadData", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleLoadData, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleLoadDataEx", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleLoadDataEx, "CUresult (CUmodule *, void const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleLoadFatBinary", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleLoadFatBinary, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleUnload", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetLoadingMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetFunction", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetFunctionCount", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetFunctionCount, "CUresult (unsigned int *, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleEnumerateFunctions", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleEnumerateFunctions, "CUresult (CUfunction *, unsigned int, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetGlobal", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkCreate, "CUresult (unsigned int, CUjit_option *, void **, CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkAddData", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkAddData, "CUresult (CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkAddFile", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkAddFile, "CUresult (CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkComplete", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkComplete, "CUresult (CUlinkState, void **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetTexRef", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetTexRef, "CUresult (CUtexref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetSurfRef", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryLoadData", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryLoadData, "CUresult (CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryLoadFromFile", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryLoadFromFile, "CUresult (CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryUnload", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryUnload, "CUresult (CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryGetKernel", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryGetKernel, "CUresult (CUkernel *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryGetKernelCount", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryGetKernelCount, "CUresult (unsigned int *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryEnumerateKernels", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryEnumerateKernels, "CUresult (CUkernel *, unsigned int, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryGetModule", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryGetModule, "CUresult (CUmodule *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuKernelGetFunction", (void (*)(void))__pyx_f_4cuda_5ccuda_cuKernelGetFunction, "CUresult (CUfunction *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryGetGlobal", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryGetManaged", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryGetManaged, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLibraryGetUnifiedFunction", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLibraryGetUnifiedFunction, "CUresult (void **, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuKernelGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuKernelGetAttribute, "CUresult (int *, CUfunction_attribute, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuKernelSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuKernelSetAttribute, "CUresult (CUfunction_attribute, int, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuKernelSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuKernelSetCacheConfig, "CUresult (CUkernel, CUfunc_cache, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuKernelGetName", (void (*)(void))__pyx_f_4cuda_5ccuda_cuKernelGetName, "CUresult (char const **, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuKernelGetParamInfo", (void (*)(void))__pyx_f_4cuda_5ccuda_cuKernelGetParamInfo, "CUresult (CUkernel, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetInfo", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetInfo, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAlloc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAlloc, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocPitch", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocPitch, "CUresult (CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemFree", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemFree, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetAddressRange", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetAddressRange, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocHost", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocHost, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemFreeHost", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostAlloc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostGetDevicePointer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostGetDevicePointer, "CUresult (CUdeviceptr *, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostGetFlags, "CUresult (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocManaged", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocManaged, "CUresult (CUdeviceptr *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceRegisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceRegisterAsyncNotification, "CUresult (CUdevice, CUasyncCallback, void *, CUasyncCallbackHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceUnregisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceUnregisterAsyncNotification, "CUresult (CUdevice, CUasyncCallbackHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetByPCIBusId", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetByPCIBusId, "CUresult (CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetPCIBusId, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcGetEventHandle, "CUresult (CUipcEventHandle *, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcOpenEventHandle, "CUresult (CUevent *, CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcOpenMemHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcOpenMemHandle, "CUresult (CUdeviceptr *, CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostRegister", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostRegister, "CUresult (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostUnregister", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyPeer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyHtoD", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyHtoD, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoH", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoH, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoD", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoD, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoA", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoA, "CUresult (CUarray, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAtoD", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAtoD, "CUresult (CUdeviceptr, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyHtoA", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyHtoA, "CUresult (CUarray, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAtoH", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAtoH, "CUresult (void *, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAtoA", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAtoA, "CUresult (CUarray, size_t, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy2D", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy2D, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy2DUnaligned", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy2DUnaligned, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy3D", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy3D, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy3DPeer, "CUresult (CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyPeerAsync, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyHtoDAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyHtoDAsync, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoHAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoHAsync, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoDAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoDAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyHtoAAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyHtoAAsync, "CUresult (CUarray, size_t, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAtoHAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAtoHAsync, "CUresult (void *, CUarray, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy2DAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy2DAsync, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy3DAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy3DAsync, "CUresult (CUDA_MEMCPY3D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD8", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD8, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD16", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD16, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD32", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD32, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D8", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D8, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D16", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D16, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D32", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D32, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD8Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD8Async, "CUresult (CUdeviceptr, unsigned char, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD16Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD16Async, "CUresult (CUdeviceptr, unsigned short, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD32Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD32Async, "CUresult (CUdeviceptr, unsigned int, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D8Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D8Async, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D16Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D16Async, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D32Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D32Async, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayCreate, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayGetDescriptor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayGetDescriptor, "CUresult (CUDA_ARRAY_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayGetPlane", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayGetPlane, "CUresult (CUarray *, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArray3DCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArray3DCreate, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArray3DGetDescriptor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArray3DGetDescriptor, "CUresult (CUDA_ARRAY3D_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayCreate, "CUresult (CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayGetLevel", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetLevel, "CUresult (CUarray *, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetHandleForAddressRange", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetHandleForAddressRange, "CUresult (void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAddressReserve", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAddressReserve, "CUresult (CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAddressFree", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAddressFree, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemCreate, "CUresult (CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemRelease", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemMap", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemMap, "CUresult (CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemMapArrayAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemMapArrayAsync, "CUresult (CUarrayMapInfo *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemUnmap", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemUnmap, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemSetAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemSetAccess, "CUresult (CUdeviceptr, size_t, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetAccess, "CUresult (unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemExportToShareableHandle, "CUresult (void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemImportFromShareableHandle, "CUresult (CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetAllocationGranularity", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetAllocationGranularity, "CUresult (size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetAllocationPropertiesFromHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetAllocationPropertiesFromHandle, "CUresult (CUmemAllocationProp *, CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemRetainAllocationHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemRetainAllocationHandle, "CUresult (CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemFreeAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemFreeAsync, "CUresult (CUdeviceptr, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocAsync, "CUresult (CUdeviceptr *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolTrimTo, "CUresult (CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolSetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolGetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolSetAccess, "CUresult (CUmemoryPool, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolGetAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolGetAccess, "CUresult (CUmemAccess_flags *, CUmemoryPool, CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolCreate, "CUresult (CUmemoryPool *, CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocFromPoolAsync, "CUresult (CUdeviceptr *, size_t, CUmemoryPool, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolExportToShareableHandle, "CUresult (void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolImportFromShareableHandle, "CUresult (CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolExportPointer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolExportPointer, "CUresult (CUmemPoolPtrExportData *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolImportPointer, "CUresult (CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMulticastCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMulticastCreate, "CUresult (CUmemGenericAllocationHandle *, CUmulticastObjectProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMulticastAddDevice", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMulticastAddDevice, "CUresult (CUmemGenericAllocationHandle, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMulticastBindMem", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMulticastBindMem, "CUresult (CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMulticastBindAddr", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMulticastBindAddr, "CUresult (CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMulticastUnbind", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMulticastUnbind, "CUresult (CUmemGenericAllocationHandle, CUdevice, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMulticastGetGranularity", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMulticastGetGranularity, "CUresult (size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuPointerGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuPointerGetAttribute, "CUresult (void *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPrefetchAsync, "CUresult (CUdeviceptr, size_t, CUdevice, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPrefetchAsync_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPrefetchAsync_v2, "CUresult (CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAdvise", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAdvise, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAdvise_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAdvise_v2, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUmemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemRangeGetAttribute, "CUresult (void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemRangeGetAttributes, "CUresult (void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuPointerSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuPointerSetAttribute, "CUresult (void const *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuPointerGetAttributes, "CUresult (unsigned int, CUpointer_attribute *, void **, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamCreate, "CUresult (CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamCreateWithPriority, "CUresult (CUstream *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetPriority", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetPriority, "CUresult (CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetFlags, "CUresult (CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetId", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetId, "CUresult (CUstream, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetCtx", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetCtx, "CUresult (CUstream, CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWaitEvent, "CUresult (CUstream, CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamAddCallback", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamBeginCapture", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamBeginCapture, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamBeginCaptureToGraph", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamBeginCaptureToGraph, "CUresult (CUstream, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamEndCapture", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamEndCapture, "CUresult (CUstream, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamIsCapturing, "CUresult (CUstream, CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetCaptureInfo", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetCaptureInfo_v3", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo_v3, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, CUgraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamUpdateCaptureDependencies", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamUpdateCaptureDependencies, "CUresult (CUstream, CUgraphNode *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamUpdateCaptureDependencies_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamUpdateCaptureDependencies_v2, "CUresult (CUstream, CUgraphNode *, CUgraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamAttachMemAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamAttachMemAsync, "CUresult (CUstream, CUdeviceptr, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamQuery", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamSynchronize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamDestroy, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamCopyAttributes, "CUresult (CUstream, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamSetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventCreate, "CUresult (CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventRecord", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventRecord, "CUresult (CUevent, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventRecordWithFlags, "CUresult (CUevent, CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventQuery", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventSynchronize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventDestroy, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventElapsedTime", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventElapsedTime, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuImportExternalMemory", (void (*)(void))__pyx_f_4cuda_5ccuda_cuImportExternalMemory, "CUresult (CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuExternalMemoryGetMappedBuffer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedBuffer, "CUresult (CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuExternalMemoryGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDestroyExternalMemory", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_5ccuda_cuImportExternalSemaphore, "CUresult (CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSignalExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSignalExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuWaitExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuWaitExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWaitValue32", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWaitValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWaitValue64", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWaitValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWriteValue32", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWriteValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWriteValue64", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWriteValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamBatchMemOp", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamBatchMemOp, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncGetAttribute, "CUresult (int *, CUfunction_attribute, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetAttribute, "CUresult (CUfunction, CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetCacheConfig, "CUresult (CUfunction, CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncGetModule", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncGetModule, "CUresult (CUmodule *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncGetName", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncGetName, "CUresult (char const **, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncGetParamInfo", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncGetParamInfo, "CUresult (CUfunction, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncIsLoaded", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncIsLoaded, "CUresult (CUfunctionLoadingState *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncLoad", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncLoad, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchKernel", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchKernelEx", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchKernelEx, "CUresult (CUlaunchConfig const *, CUfunction, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchCooperativeKernel", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchCooperativeKernelMultiDevice", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernelMultiDevice, "CUresult (CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchHostFunc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchHostFunc, "CUresult (CUstream, CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetBlockShape", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetBlockShape, "CUresult (CUfunction, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetSharedSize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetSharedSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSetSize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSetSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSeti", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSeti, "CUresult (CUfunction, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSetf", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSetf, "CUresult (CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSetv", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSetv, "CUresult (CUfunction, int, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunch", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchGrid", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchGrid, "CUresult (CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchGridAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchGridAsync, "CUresult (CUfunction, int, int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSetTexRef", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSetTexRef, "CUresult (CUfunction, int, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetSharedMemConfig, "CUresult (CUfunction, CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphCreate, "CUresult (CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddKernelNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddKernelNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddMemcpyNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddMemcpyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddMemsetNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemsetNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemsetNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddHostNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddHostNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphHostNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphHostNodeGetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphHostNodeSetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddChildGraphNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddChildGraphNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphChildGraphNodeGetGraph, "CUresult (CUgraphNode, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddEmptyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddEventRecordNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddEventRecordNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddEventWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresSignalNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExternalSemaphoresSignalNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddExternalSemaphoresWaitNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExternalSemaphoresWaitNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddBatchMemOpNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddBatchMemOpNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphBatchMemOpNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeGetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeSetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecBatchMemOpNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddMemAllocNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemAllocNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemAllocNodeGetParams, "CUresult (CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddMemFreeNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddMemFreeNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemFreeNodeGetParams, "CUresult (CUgraphNode, CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceSetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphClone", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphClone, "CUresult (CUgraph *, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeFindInClone, "CUresult (CUgraphNode *, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetType, "CUresult (CUgraphNode, CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphGetNodes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphGetNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphGetRootNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphGetEdges", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphGetEdges, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphGetEdges_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphGetEdges_v2, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetDependencies, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetDependencies_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetDependencies_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetDependentNodes, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetDependentNodes_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetDependentNodes_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddDependencies_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphRemoveDependencies", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphRemoveDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphRemoveDependencies_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphRemoveDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphDestroyNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphInstantiate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphInstantiate, "CUresult (CUgraphExec *, CUgraph, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphInstantiateWithParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphInstantiateWithParams, "CUresult (CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecGetFlags, "CUresult (CUgraphExec, cuuint64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecKernelNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecMemcpyNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecMemsetNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecHostNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecChildGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecChildGraphNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecEventRecordNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecEventWaitNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeSetEnabled", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeSetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphUpload", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphUpload, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphLaunch", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphLaunch, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecUpdate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecUpdate, "CUresult (CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeCopyAttributes, "CUresult (CUgraphNode, CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphDebugDotPrint, "CUresult (CUgraph, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuUserObjectCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuUserObjectCreate, "CUresult (CUuserObject *, void *, CUhostFn, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuUserObjectRetain", (void (*)(void))__pyx_f_4cuda_5ccuda_cuUserObjectRetain, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuUserObjectRelease", (void (*)(void))__pyx_f_4cuda_5ccuda_cuUserObjectRelease, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphRetainUserObject, "CUresult (CUgraph, CUuserObject, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphReleaseUserObject", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphReleaseUserObject, "CUresult (CUgraph, CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddNode_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeSetParams, "CUresult (CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphConditionalHandleCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphConditionalHandleCreate, "CUresult (CUgraphConditionalHandle *, CUgraph, CUcontext, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessor, "CUresult (int *, CUfunction, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "CUresult (int *, CUfunction, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxPotentialBlockSize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSize, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxPotentialBlockSizeWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSizeWithFlags, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyAvailableDynamicSMemPerBlock", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyAvailableDynamicSMemPerBlock, "CUresult (size_t *, CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxPotentialClusterSize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialClusterSize, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxActiveClusters", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveClusters, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetArray, "CUresult (CUtexref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMipmappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetAddress", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetAddress, "CUresult (size_t *, CUtexref, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetAddress2D", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetAddress2D, "CUresult (CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetFormat", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetFormat, "CUresult (CUtexref, CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetAddressMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetAddressMode, "CUresult (CUtexref, int, CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetFilterMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelBias, "CUresult (CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelClamp, "CUresult (CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMaxAnisotropy, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetBorderColor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetBorderColor, "CUresult (CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetAddress", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetAddress, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetArray, "CUresult (CUarray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMipmappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMipmappedArray, "CUresult (CUmipmappedArray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetAddressMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetAddressMode, "CUresult (CUaddress_mode *, CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetFilterMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetFormat", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetFormat, "CUresult (CUarray_format *, int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelBias, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelClamp, "CUresult (float *, float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMaxAnisotropy, "CUresult (int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetBorderColor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetBorderColor, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetFlags, "CUresult (unsigned int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfRefSetArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfRefSetArray, "CUresult (CUsurfref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfRefGetArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfRefGetArray, "CUresult (CUarray *, CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectCreate, "CUresult (CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectGetTextureDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectGetTextureDesc, "CUresult (CUDA_TEXTURE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectGetResourceViewDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectGetResourceViewDesc, "CUresult (CUDA_RESOURCE_VIEW_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfObjectCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfObjectCreate, "CUresult (CUsurfObject *, CUDA_RESOURCE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfObjectDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTensorMapEncodeTiled", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTensorMapEncodeTiled, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTensorMapEncodeIm2col", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTensorMapEncodeIm2col, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTensorMapReplaceAddress", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTensorMapReplaceAddress, "CUresult (CUtensorMap *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceCanAccessPeer, "CUresult (int *, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxEnablePeerAccess, "CUresult (CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetP2PAttribute, "CUresult (int *, CUdevice_P2PAttribute, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsSubResourceGetMappedArray, "CUresult (CUarray *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedPointer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedPointer, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsResourceSetMapFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsResourceSetMapFlags, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsMapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsUnmapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGetProcAddress", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGetProcAddress, "CUresult (char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCoredumpGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCoredumpGetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCoredumpGetAttributeGlobal", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCoredumpGetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCoredumpSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCoredumpSetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCoredumpSetAttributeGlobal", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCoredumpSetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGetExportTable", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGetExportTable, "CUresult (void const **, CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGreenCtxCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGreenCtxCreate, "CUresult (CUgreenCtx *, CUdevResourceDesc, CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGreenCtxDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGreenCtxDestroy, "CUresult (CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxFromGreenCtx", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxFromGreenCtx, "CUresult (CUcontext *, CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetDevResource", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetDevResource, "CUresult (CUdevice, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetDevResource", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetDevResource, "CUresult (CUcontext, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGreenCtxGetDevResource", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGreenCtxGetDevResource, "CUresult (CUgreenCtx, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevSmResourceSplitByCount", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevSmResourceSplitByCount, "CUresult (CUdevResource *, unsigned int *, CUdevResource const *, CUdevResource *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevResourceGenerateDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevResourceGenerateDesc, "CUresult (CUdevResourceDesc *, CUdevResource *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGreenCtxRecordEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGreenCtxRecordEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGreenCtxWaitEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGreenCtxWaitEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetGreenCtx", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetGreenCtx, "CUresult (CUstream, CUgreenCtx *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuProfilerStart", (void (*)(void))__pyx_f_4cuda_5ccuda_cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuProfilerStop", (void (*)(void))__pyx_f_4cuda_5ccuda_cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsEGLRegisterImage", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerConnect", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerConnectWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerDisconnect", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerAcquireFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerReleaseFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamProducerConnect", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, __pyx_t_4cuda_5ccuda_EGLint, __pyx_t_4cuda_5ccuda_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamProducerDisconnect", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamProducerPresentFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamProducerReturnFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedEglFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventCreateFromEGLSync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_5ccuda_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsGLRegisterBuffer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsGLRegisterImage", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, __pyx_t_4cuda_5ccuda_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGLGetDevices", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGLGetDevices, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_5ccuda_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuVDPAUGetDevice", (void (*)(void))__pyx_f_4cuda_5ccuda_cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuVDPAUCtxCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuVDPAUCtxCreate, "CUresult (CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsVDPAURegisterVideoSurface", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsVDPAURegisterOutputSurface", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("cuda._cuda.ccuda"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGetErrorString", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorString, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGetErrorName", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorName, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuInit", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuInit, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDriverGetVersion", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGet", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet, "CUresult (CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetCount", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetName", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetUuid", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetUuid_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid_v2, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetLuid", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceTotalMem_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetTexture1DLinearMaxWidth", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetTexture1DLinearMaxWidth, "CUresult (size_t *, CUarray_format, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute, "CUresult (int *, CUdevice_attribute, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetNvSciSyncAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetNvSciSyncAttributes, "CUresult (void *, CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceSetMemPool", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetMemPool, "CUresult (CUdevice, CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetMemPool", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetDefaultMemPool", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDefaultMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetExecAffinitySupport", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFlushGPUDirectRDMAWrites", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFlushGPUDirectRDMAWrites, "CUresult (CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetProperties", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetProperties, "CUresult (CUdevprop *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceComputeCapability", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceComputeCapability, "CUresult (int *, int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDevicePrimaryCtxRetain", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDevicePrimaryCtxRelease_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRelease_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDevicePrimaryCtxSetFlags_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxSetFlags_v2, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDevicePrimaryCtxGetState", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDevicePrimaryCtxReset_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxReset_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxCreate_v3", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v3, "CUresult (CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxDestroy_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDestroy_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxPushCurrent_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPushCurrent_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxPopCurrent_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPopCurrent_v2, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxSetCurrent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetCurrent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetDevice", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetFlags, "CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxSetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetFlags, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetId", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetId, "CUresult (CUcontext, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxSynchronize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxSetLimit", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetLimit, "CUresult (CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetLimit", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetLimit, "CUresult (size_t *, CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetCacheConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCacheConfig, "CUresult (CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCacheConfig, "CUresult (CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetApiVersion", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetApiVersion, "CUresult (CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetStreamPriorityRange", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetStreamPriorityRange, "CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxResetPersistingL2Cache", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetExecAffinity", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetExecAffinity, "CUresult (CUexecAffinityParam *, CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxAttach", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxAttach, "CUresult (CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxDetach", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleLoad", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoad, "CUresult (CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleLoadData", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadData, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleLoadDataEx", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadDataEx, "CUresult (CUmodule *, void const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleLoadFatBinary", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadFatBinary, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleUnload", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleGetLoadingMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleGetFunction", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleGetFunctionCount", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunctionCount, "CUresult (unsigned int *, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleEnumerateFunctions", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleEnumerateFunctions, "CUresult (CUfunction *, unsigned int, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleGetGlobal_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetGlobal_v2, "CUresult (CUdeviceptr *, size_t *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLinkCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkCreate_v2, "CUresult (unsigned int, CUjit_option *, void **, CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLinkAddData_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddData_v2, "CUresult (CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLinkAddFile_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddFile_v2, "CUresult (CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLinkComplete", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkComplete, "CUresult (CUlinkState, void **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLinkDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleGetTexRef", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetTexRef, "CUresult (CUtexref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuModuleGetSurfRef", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryLoadData", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryLoadData, "CUresult (CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryLoadFromFile", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryLoadFromFile, "CUresult (CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryUnload", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryUnload, "CUresult (CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryGetKernel", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetKernel, "CUresult (CUkernel *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryGetKernelCount", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetKernelCount, "CUresult (unsigned int *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryEnumerateKernels", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryEnumerateKernels, "CUresult (CUkernel *, unsigned int, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryGetModule", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetModule, "CUresult (CUmodule *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuKernelGetFunction", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetFunction, "CUresult (CUfunction *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryGetGlobal", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryGetManaged", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetManaged, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLibraryGetUnifiedFunction", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetUnifiedFunction, "CUresult (void **, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuKernelGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetAttribute, "CUresult (int *, CUfunction_attribute, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuKernelSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuKernelSetAttribute, "CUresult (CUfunction_attribute, int, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuKernelSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuKernelSetCacheConfig, "CUresult (CUkernel, CUfunc_cache, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuKernelGetName", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetName, "CUresult (char const **, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuKernelGetParamInfo", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetParamInfo, "CUresult (CUkernel, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemGetInfo_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetInfo_v2, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAlloc_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAlloc_v2, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAllocPitch_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2, "CUresult (CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemFree_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemFree_v2, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemGetAddressRange_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAddressRange_v2, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAllocHost_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocHost_v2, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemFreeHost", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemHostAlloc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemHostGetDevicePointer_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetDevicePointer_v2, "CUresult (CUdeviceptr *, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemHostGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetFlags, "CUresult (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAllocManaged", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocManaged, "CUresult (CUdeviceptr *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceRegisterAsyncNotification", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceRegisterAsyncNotification, "CUresult (CUdevice, CUasyncCallback, void *, CUasyncCallbackHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceUnregisterAsyncNotification", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceUnregisterAsyncNotification, "CUresult (CUdevice, CUasyncCallbackHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetByPCIBusId", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetByPCIBusId, "CUresult (CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetPCIBusId", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetPCIBusId, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuIpcGetEventHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetEventHandle, "CUresult (CUipcEventHandle *, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuIpcOpenEventHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenEventHandle, "CUresult (CUevent *, CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuIpcGetMemHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuIpcOpenMemHandle_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenMemHandle_v2, "CUresult (CUdeviceptr *, CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuIpcCloseMemHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemHostRegister_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostRegister_v2, "CUresult (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemHostUnregister", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyPeer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyHtoD_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyDtoH_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyDtoD_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyDtoA_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoA_v2, "CUresult (CUarray, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyAtoD_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoD_v2, "CUresult (CUdeviceptr, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyHtoA_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoA_v2, "CUresult (CUarray, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyAtoH_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoH_v2, "CUresult (void *, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyAtoA_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoA_v2, "CUresult (CUarray, size_t, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpy2D_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2D_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpy2DUnaligned_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpy3D_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpy3DPeer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer, "CUresult (CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyPeerAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeerAsync, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyHtoDAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyDtoHAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyDtoDAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyHtoAAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoAAsync_v2, "CUresult (CUarray, size_t, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpyAtoHAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoHAsync_v2, "CUresult (void *, CUarray, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpy2DAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpy3DAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2, "CUresult (CUDA_MEMCPY3D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemcpy3DPeerAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD8_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD16_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16_v2, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD32_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32_v2, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD2D8_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD2D16_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16_v2, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD2D32_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32_v2, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD8Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async, "CUresult (CUdeviceptr, unsigned char, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD16Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16Async, "CUresult (CUdeviceptr, unsigned short, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD32Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32Async, "CUresult (CUdeviceptr, unsigned int, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD2D8Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD2D16Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16Async, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemsetD2D32Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32Async, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuArrayCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayCreate_v2, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuArrayGetDescriptor_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetDescriptor_v2, "CUresult (CUDA_ARRAY_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMipmappedArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMipmappedArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuArrayGetPlane", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetPlane, "CUresult (CUarray *, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuArrayDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuArray3DCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuArray3DGetDescriptor_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2, "CUresult (CUDA_ARRAY3D_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMipmappedArrayCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate, "CUresult (CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMipmappedArrayGetLevel", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel, "CUresult (CUarray *, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMipmappedArrayDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemGetHandleForAddressRange", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetHandleForAddressRange, "CUresult (void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAddressReserve", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressReserve, "CUresult (CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAddressFree", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressFree, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemCreate, "CUresult (CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemRelease", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemMap", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemMap, "CUresult (CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemMapArrayAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemMapArrayAsync, "CUresult (CUarrayMapInfo *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemUnmap", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemSetAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess, "CUresult (CUdeviceptr, size_t, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemGetAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAccess, "CUresult (unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemExportToShareableHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle, "CUresult (void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemImportFromShareableHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemImportFromShareableHandle, "CUresult (CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemGetAllocationGranularity", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity, "CUresult (size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemGetAllocationPropertiesFromHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle, "CUresult (CUmemAllocationProp *, CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemRetainAllocationHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle, "CUresult (CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemFreeAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync, "CUresult (CUdeviceptr, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAllocAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync, "CUresult (CUdeviceptr *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolTrimTo", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo, "CUresult (CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolSetAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess, "CUresult (CUmemoryPool, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolGetAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAccess, "CUresult (CUmemAccess_flags *, CUmemoryPool, CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate, "CUresult (CUmemoryPool *, CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAllocFromPoolAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync, "CUresult (CUdeviceptr *, size_t, CUmemoryPool, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolExportToShareableHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle, "CUresult (void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolImportFromShareableHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportFromShareableHandle, "CUresult (CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolExportPointer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportPointer, "CUresult (CUmemPoolPtrExportData *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPoolImportPointer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer, "CUresult (CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMulticastCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastCreate, "CUresult (CUmemGenericAllocationHandle *, CUmulticastObjectProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMulticastAddDevice", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastAddDevice, "CUresult (CUmemGenericAllocationHandle, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMulticastBindMem", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastBindMem, "CUresult (CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMulticastBindAddr", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastBindAddr, "CUresult (CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMulticastUnbind", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastUnbind, "CUresult (CUmemGenericAllocationHandle, CUdevice, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMulticastGetGranularity", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastGetGranularity, "CUresult (size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuPointerGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute, "CUresult (void *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPrefetchAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync, "CUresult (CUdeviceptr, size_t, CUdevice, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemPrefetchAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync_v2, "CUresult (CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAdvise", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemAdvise_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise_v2, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUmemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemRangeGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute, "CUresult (void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuMemRangeGetAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes, "CUresult (void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuPointerSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute, "CUresult (void const *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuPointerGetAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes, "CUresult (unsigned int, CUpointer_attribute *, void **, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate, "CUresult (CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamCreateWithPriority", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority, "CUresult (CUstream *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamGetPriority", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetPriority, "CUresult (CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags, "CUresult (CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamGetId", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetId, "CUresult (CUstream, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamGetCtx", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx, "CUresult (CUstream, CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamWaitEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent, "CUresult (CUstream, CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamAddCallback", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamBeginCapture_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCapture_v2, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamBeginCaptureToGraph", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCaptureToGraph, "CUresult (CUstream, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuThreadExchangeStreamCaptureMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamEndCapture", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture, "CUresult (CUstream, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamIsCapturing", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing, "CUresult (CUstream, CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamGetCaptureInfo_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamGetCaptureInfo_v3", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v3, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, CUgraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamUpdateCaptureDependencies", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies, "CUresult (CUstream, CUgraphNode *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamUpdateCaptureDependencies_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies_v2, "CUresult (CUstream, CUgraphNode *, CUgraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamAttachMemAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAttachMemAsync, "CUresult (CUstream, CUdeviceptr, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamQuery", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamSynchronize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamDestroy_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamCopyAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes, "CUresult (CUstream, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEventCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate, "CUresult (CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEventRecord", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord, "CUresult (CUevent, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEventRecordWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags, "CUresult (CUevent, CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEventQuery", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEventSynchronize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEventDestroy_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEventElapsedTime", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuImportExternalMemory", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory, "CUresult (CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuExternalMemoryGetMappedBuffer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedBuffer, "CUresult (CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuExternalMemoryGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDestroyExternalMemory", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuImportExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore, "CUresult (CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuSignalExternalSemaphoresAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSignalExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuWaitExternalSemaphoresAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDestroyExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamWaitValue32_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamWaitValue64_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamWriteValue32_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamWriteValue64_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamBatchMemOp_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp_v2, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute, "CUresult (int *, CUfunction_attribute, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute, "CUresult (CUfunction, CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig, "CUresult (CUfunction, CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncGetModule", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule, "CUresult (CUmodule *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncGetName", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetName, "CUresult (char const **, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncGetParamInfo", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetParamInfo, "CUresult (CUfunction, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncIsLoaded", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncIsLoaded, "CUresult (CUfunctionLoadingState *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncLoad", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncLoad, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLaunchKernel", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLaunchKernelEx", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernelEx, "CUresult (CUlaunchConfig const *, CUfunction, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLaunchCooperativeKernel", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLaunchCooperativeKernelMultiDevice", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice, "CUresult (CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLaunchHostFunc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchHostFunc, "CUresult (CUstream, CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncSetBlockShape", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape, "CUresult (CUfunction, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncSetSharedSize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuParamSetSize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuParamSeti", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti, "CUresult (CUfunction, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuParamSetf", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetf, "CUresult (CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuParamSetv", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv, "CUresult (CUfunction, int, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLaunch", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLaunchGrid", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid, "CUresult (CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuLaunchGridAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync, "CUresult (CUfunction, int, int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuParamSetTexRef", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef, "CUresult (CUfunction, int, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuFuncSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig, "CUresult (CUfunction, CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate, "CUresult (CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddKernelNode_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphKernelNodeGetParams_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams_v2, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphKernelNodeSetParams_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams_v2, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddMemcpyNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemcpyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphMemcpyNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddMemsetNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphMemsetNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddHostNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddHostNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphHostNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeGetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeSetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddChildGraphNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddChildGraphNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphChildGraphNodeGetGraph", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph, "CUresult (CUgraphNode, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddEmptyNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddEventRecordNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventRecordNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphEventRecordNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddEventWaitNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphEventWaitNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddExternalSemaphoresSignalNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExternalSemaphoresSignalNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddExternalSemaphoresWaitNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExternalSemaphoresWaitNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddBatchMemOpNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddBatchMemOpNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphBatchMemOpNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeGetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphBatchMemOpNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeSetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecBatchMemOpNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecBatchMemOpNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddMemAllocNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphMemAllocNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemAllocNodeGetParams, "CUresult (CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddMemFreeNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemFreeNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphMemFreeNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams, "CUresult (CUgraphNode, CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGraphMemTrim", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceSetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphClone", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone, "CUresult (CUgraph *, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeFindInClone", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone, "CUresult (CUgraphNode *, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeGetType", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType, "CUresult (CUgraphNode, CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphGetNodes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphGetRootNodes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphGetEdges", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphGetEdges_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges_v2, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeGetDependencies", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeGetDependencies_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeGetDependentNodes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeGetDependentNodes_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddDependencies", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddDependencies_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphRemoveDependencies", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphRemoveDependencies_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphDestroyNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphInstantiateWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithFlags, "CUresult (CUgraphExec *, CUgraph, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphInstantiateWithParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithParams, "CUresult (CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecGetFlags, "CUresult (CUgraphExec, cuuint64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecKernelNodeSetParams_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams_v2, "CUresult (CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemcpyNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecChildGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecChildGraphNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeSetEnabled", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeGetEnabled", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphUpload", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphLaunch", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecUpdate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate_v2, "CUresult (CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphKernelNodeCopyAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes, "CUresult (CUgraphNode, CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphKernelNodeGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphKernelNodeSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphDebugDotPrint", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint, "CUresult (CUgraph, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuUserObjectCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectCreate, "CUresult (CUuserObject *, void *, CUhostFn, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuUserObjectRetain", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRetain, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuUserObjectRelease", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphRetainUserObject", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject, "CUresult (CUgraph, CUuserObject, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphReleaseUserObject", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphReleaseUserObject, "CUresult (CUgraph, CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphAddNode_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetParams, "CUresult (CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphExecNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphConditionalHandleCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphConditionalHandleCreate, "CUresult (CUgraphConditionalHandle *, CUgraph, CUcontext, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor, "CUresult (int *, CUfunction, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "CUresult (int *, CUfunction, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuOccupancyMaxPotentialBlockSize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSize, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuOccupancyMaxPotentialBlockSizeWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSizeWithFlags, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuOccupancyAvailableDynamicSMemPerBlock", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyAvailableDynamicSMemPerBlock, "CUresult (size_t *, CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuOccupancyMaxPotentialClusterSize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialClusterSize, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuOccupancyMaxActiveClusters", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveClusters, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray, "CUresult (CUtexref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetAddress_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress_v2, "CUresult (size_t *, CUtexref, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetAddress2D_v3", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress2D_v3, "CUresult (CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetFormat", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat, "CUresult (CUtexref, CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetAddressMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode, "CUresult (CUtexref, int, CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetFilterMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetMipmapFilterMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetMipmapLevelBias", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias, "CUresult (CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetMipmapLevelClamp", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp, "CUresult (CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetMaxAnisotropy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetBorderColor", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor, "CUresult (CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefSetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetAddress_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddress_v2, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray, "CUresult (CUarray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray, "CUresult (CUmipmappedArray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetAddressMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode, "CUresult (CUaddress_mode *, CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetFilterMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetFormat", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat, "CUresult (CUarray_format *, int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetMipmapFilterMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetMipmapLevelBias", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetMipmapLevelClamp", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp, "CUresult (float *, float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetMaxAnisotropy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy, "CUresult (int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetBorderColor", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags, "CUresult (unsigned int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexRefDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuSurfRefSetArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray, "CUresult (CUsurfref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuSurfRefGetArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray, "CUresult (CUarray *, CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexObjectCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate, "CUresult (CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexObjectDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexObjectGetResourceDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexObjectGetTextureDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc, "CUresult (CUDA_TEXTURE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTexObjectGetResourceViewDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc, "CUresult (CUDA_RESOURCE_VIEW_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuSurfObjectCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate, "CUresult (CUsurfObject *, CUDA_RESOURCE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuSurfObjectDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuSurfObjectGetResourceDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTensorMapEncodeTiled", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapEncodeTiled, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTensorMapEncodeIm2col", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapEncodeIm2col, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuTensorMapReplaceAddress", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapReplaceAddress, "CUresult (CUtensorMap *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceCanAccessPeer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer, "CUresult (int *, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxEnablePeerAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess, "CUresult (CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxDisablePeerAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetP2PAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute, "CUresult (int *, CUdevice_P2PAttribute, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsUnregisterResource", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsSubResourceGetMappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray, "CUresult (CUarray *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsResourceGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsResourceGetMappedPointer_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsResourceSetMapFlags_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsMapResources", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsUnmapResources", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGetProcAddress_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress_v2, "CUresult (char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCoredumpGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpGetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCoredumpGetAttributeGlobal", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpGetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCoredumpSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpSetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCoredumpSetAttributeGlobal", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpSetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGetExportTable", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable, "CUresult (void const **, CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGreenCtxCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxCreate, "CUresult (CUgreenCtx *, CUdevResourceDesc, CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGreenCtxDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxDestroy, "CUresult (CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxFromGreenCtx", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxFromGreenCtx, "CUresult (CUcontext *, CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDeviceGetDevResource", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDevResource, "CUresult (CUdevice, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuCtxGetDevResource", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevResource, "CUresult (CUcontext, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGreenCtxGetDevResource", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxGetDevResource, "CUresult (CUgreenCtx, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDevSmResourceSplitByCount", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevSmResourceSplitByCount, "CUresult (CUdevResource *, unsigned int *, CUdevResource const *, CUdevResource *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuDevResourceGenerateDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevResourceGenerateDesc, "CUresult (CUdevResourceDesc *, CUdevResource *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGreenCtxRecordEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxRecordEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGreenCtxWaitEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGreenCtxWaitEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuStreamGetGreenCtx", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetGreenCtx, "CUresult (CUstream, CUgreenCtx *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuProfilerStart", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuProfilerStop", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsEGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamConsumerConnect", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamConsumerConnectWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamConsumerDisconnect", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamConsumerAcquireFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamConsumerReleaseFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamProducerConnect", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, __pyx_t_4cuda_5ccuda_EGLint, __pyx_t_4cuda_5ccuda_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamProducerDisconnect", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamProducerPresentFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEGLStreamProducerReturnFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsResourceGetMappedEglFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuEventCreateFromEGLSync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_5ccuda_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsGLRegisterBuffer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, __pyx_t_4cuda_5ccuda_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGLGetDevices_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGLGetDevices_v2, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_5ccuda_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuVDPAUGetDevice", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuVDPAUCtxCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsVDPAURegisterVideoSurface", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_cuGraphicsVDPAURegisterOutputSurface", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __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;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_ccuda(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_ccuda},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "ccuda",
      0, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* 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
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initccuda(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initccuda(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_ccuda(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
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)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        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, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    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;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_ccuda(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'ccuda' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("ccuda", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #elif CYTHON_USE_MODULE_STATE
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "ccuda" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)", 0);
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 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(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 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
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_cuda__ccuda) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "cuda.ccuda")) {
      if (unlikely((PyDict_SetItemString(modules, "cuda.ccuda", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely((__Pyx_modinit_function_export_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_init_code();
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1
 * # Copyright 2021-2024 NVIDIA Corporation.  All rights reserved.             # <<<<<<<<<<<<<<
 * #
 * # Please refer to the NVIDIA end user license agreement (EULA) associated
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init cuda.ccuda", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cuda.ccuda");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    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);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *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
}
#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

/* ErrOccurredWithGIL */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) {
  int err;
  #ifdef WITH_THREAD
  PyGILState_STATE _save = PyGILState_Ensure();
  #endif
  err = !!PyErr_Occurred();
  #ifdef WITH_THREAD
  PyGILState_Release(_save);
  #endif
  return err;
}

/* 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

/* 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) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#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

/* PyObjectGetAttrStrNoError */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#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;
#endif
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    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_GetAttrStrNoError(__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 */
#if !CYTHON_COMPILING_IN_LIMITED_API
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);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result;
        result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    #if __PYX_LIMITED_VERSION_HEX < 0x030780000
    {
        PyObject *compiled = NULL, *result = NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
        compiled = Py_CompileString(
            "out = type(code)(\n"
            "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
            "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
            "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
            "  code.co_lnotab)\n", "<dummy>", Py_file_input);
        if (!compiled) return NULL;
        result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
        Py_DECREF(compiled);
        if (!result) PyErr_Print();
        Py_DECREF(result);
        result = PyDict_GetItemString(scratch_dict, "out");
        if (result) Py_INCREF(result);
        return result;
    }
    #else
    return NULL;
    #endif
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        (void) __pyx_cfilenm;
        (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
    if (unlikely(!code_object)) goto bad;
    py_py_line = PyLong_FromLong(py_line);
    if (unlikely(!py_py_line)) goto bad;
    py_funcname = PyUnicode_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    dict = PyDict_New();
    if (unlikely(!dict)) goto bad;
    {
        PyObject *old_code_object = code_object;
        code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
        Py_DECREF(old_code_object);
    }
    if (unlikely(!code_object)) goto bad;
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
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,
        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);
}
#endif

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XDECREF(name);
        name = __Pyx_NewRef(__pyx_n_s_);
    }
    return name;
}
#endif

/* 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;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    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 && PY_VERSION_HEX < 0x030C00A7
            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
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    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
            }
        }
        {
            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 ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (long) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (long) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (long) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (long) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (long) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((long) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((long) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            if (unlikely(__Pyx_PyLong_IsNeg(x))) {
                goto raise_neg_overflow;
            } else if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_DigitCount(x)) {
                    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 && PY_VERSION_HEX < 0x030C00A7
            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
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
            } else {
                const digit* digits = __Pyx_PyLong_Digits(x);
                assert(__Pyx_PyLong_DigitCount(x) > 1);
                switch (__Pyx_PyLong_SignedDigitCount(x)) {
                    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
            }
        }
        {
            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 ret = -1;
#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                ret = _PyLong_AsByteArray((PyLongObject *)v,
                                           bytes, sizeof(val),
                                           is_little, !is_unsigned);
#else
                PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
                int bits, remaining_bits, is_negative = 0;
                long idigit;
                int chunk_size = (sizeof(long) < 8) ? 30 : 62;
                if (unlikely(!PyLong_CheckExact(v))) {
                    PyObject *tmp = v;
                    v = PyNumber_Long(v);
                    assert(PyLong_CheckExact(v));
                    Py_DECREF(tmp);
                    if (unlikely(!v)) return (int) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (int) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (int) -1;
                    is_negative = result == 1;
                }
#endif
                if (is_unsigned && unlikely(is_negative)) {
                    goto raise_neg_overflow;
                } else if (is_negative) {
                    stepval = PyNumber_Invert(v);
                    if (unlikely(!stepval))
                        return (int) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (int) 0;
                mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
                shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
                for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
                    PyObject *tmp, *digit;
                    digit = PyNumber_And(stepval, mask);
                    if (unlikely(!digit)) goto done;
                    idigit = PyLong_AsLong(digit);
                    Py_DECREF(digit);
                    if (unlikely(idigit < 0)) goto done;
                    tmp = PyNumber_Rshift(stepval, shift);
                    if (unlikely(!tmp)) goto done;
                    Py_DECREF(stepval); stepval = tmp;
                    val |= ((int) idigit) << bits;
                    #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                    if (Py_SIZE(stepval) == 0)
                        goto unpacking_done;
                    #endif
                }
                idigit = PyLong_AsLong(stepval);
                if (unlikely(idigit < 0)) goto done;
                remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((int) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                        goto raise_overflow;
                    if (is_negative)
                        val = ~val;
                }
                ret = 0;
            done:
                Py_XDECREF(shift);
                Py_XDECREF(mask);
                Py_XDECREF(stepval);
#endif
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        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);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, 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) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
    return Py_Version & ~0xFFUL;
#else
    const char* rt_version = Py_GetVersion();
    unsigned long version = 0;
    unsigned long factor = 0x01000000UL;
    unsigned int digit = 0;
    int i = 0;
    while (factor) {
        while ('0' <= rt_version[i] && rt_version[i] <= '9') {
            digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
            ++i;
        }
        version += factor * digit;
        if (rt_version[i] != '.')
            break;
        digit = 0;
        factor >>= 8;
        ++i;
    }
    return version;
#endif
}
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* FunctionExport */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
    cobj = PyCapsule_New(tmp.p, sig, 0);
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction_3_0_7
#define __PYX_HAVE_RT_ImportFunction_3_0_7
static int __Pyx_ImportFunction_3_0_7(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 (!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);
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        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);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
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 && !CYTHON_COMPILING_IN_LIMITED_API) || (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) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_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
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      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);
}


/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
