/* Generated by Cython 0.29.26 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "cuda"
        ],
        "extra_compile_args": [
            "-std=c++14"
        ],
        "include_dirs": [
            "./cuda",
            "cuda",
            "/home/conda/feedstock_root/build_artifacts/cuda-python_1641445722738/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include"
        ],
        "language": "c++",
        "library_dirs": [
            "/home/conda/feedstock_root/build_artifacts/cuda-python_1641445722738/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.10/site-packages",
            "/home/conda/feedstock_root/build_artifacts/cuda-python_1641445722738/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib"
        ],
        "name": "cuda.tests.test_ccudart",
        "sources": [
            "cuda/tests/test_ccudart.pyx"
        ]
    },
    "module_name": "cuda.tests.test_ccudart"
}
END: Cython Metadata */

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

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

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

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

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

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

#define __PYX_HAVE__cuda__tests__test_ccudart
#define __PYX_HAVE_API__cuda__tests__test_ccudart
/* Early includes */
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

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


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

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


static const char *__pyx_f[] = {
  "cuda/tests/test_ccudart.pyx",
};

/* "cuda/ccudart.pxd":1051
 *     cudaFormatModeAuto = 1
 * 
 * ctypedef unsigned long long cudaSurfaceObject_t             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaTextureAddressMode:
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_7ccudart_cudaSurfaceObject_t;

/* "cuda/ccudart.pxd":1081
 *     int disableTrilinearOptimization
 * 
 * ctypedef unsigned long long cudaTextureObject_t             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaDataType_t:
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_7ccudart_cudaTextureObject_t;

/*--- Type declarations ---*/
struct __pyx_t_4cuda_7ccudart_dim3;
struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc;
struct __pyx_t_4cuda_7ccudart__cudaArraySparseProperties_tileExtent_s;
struct __pyx_t_4cuda_7ccudart_cudaArraySparseProperties;
struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr;
struct __pyx_t_4cuda_7ccudart_cudaExtent;
struct __pyx_t_4cuda_7ccudart_cudaPos;
struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms;
struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DPeerParms;
struct __pyx_t_4cuda_7ccudart_cudaMemsetParams;
struct __pyx_t_4cuda_7ccudart_cudaAccessPolicyWindow;
struct __pyx_t_4cuda_7ccudart_cudaHostNodeParams;
union __pyx_t_4cuda_7ccudart_cudaStreamAttrValue;
union __pyx_t_4cuda_7ccudart_cudaKernelNodeAttrValue;
struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_array_s;
struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_mipmap_s;
struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_linear_s;
struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_pitch2D_s;
union __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_u;
struct __pyx_t_4cuda_7ccudart_cudaResourceDesc;
struct __pyx_t_4cuda_7ccudart_cudaResourceViewDesc;
struct __pyx_t_4cuda_7ccudart_cudaPointerAttributes;
struct __pyx_t_4cuda_7ccudart_cudaFuncAttributes;
struct __pyx_t_4cuda_7ccudart_cudaMemLocation;
struct __pyx_t_4cuda_7ccudart_cudaMemAccessDesc;
struct __pyx_t_4cuda_7ccudart_cudaMemPoolProps;
struct __pyx_t_4cuda_7ccudart_cudaMemPoolPtrExportData;
struct __pyx_t_4cuda_7ccudart_cudaMemAllocNodeParams;
struct __pyx_t_4cuda_7ccudart_CUuuid_st;
struct __pyx_t_4cuda_7ccudart_cudaDeviceProp;
struct __pyx_t_4cuda_7ccudart_cudaIpcEventHandle_st;
struct __pyx_t_4cuda_7ccudart_cudaIpcMemHandle_st;
struct __pyx_t_4cuda_7ccudart__cudaExternalMemoryHandleDesc_handle_handle_win32_s;
union __pyx_t_4cuda_7ccudart__cudaExternalMemoryHandleDesc_handle_u;
struct __pyx_t_4cuda_7ccudart_cudaExternalMemoryHandleDesc;
struct __pyx_t_4cuda_7ccudart_cudaExternalMemoryBufferDesc;
struct __pyx_t_4cuda_7ccudart_cudaExternalMemoryMipmappedArrayDesc;
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreHandleDesc_handle_handle_win32_s;
union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreHandleDesc_handle_u;
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreHandleDesc;
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_fence_s;
union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_nvSciSync_u;
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_keyedMutex_s;
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_s;
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreSignalParams;
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_fence_s;
union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_nvSciSync_u;
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_keyedMutex_s;
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_s;
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreWaitParams;
struct __pyx_t_4cuda_7ccudart_cudaKernelNodeParams;
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreSignalNodeParams;
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreWaitNodeParams;
struct __pyx_t_4cuda_7ccudart_cudaTextureDesc;

/* "cuda/ccudart.pxd":9
 * # is strictly prohibited.
 * 
 * cdef enum cudaRoundMode:             # <<<<<<<<<<<<<<
 *     cudaRoundNearest
 *     cudaRoundZero
 */
enum __pyx_t_4cuda_7ccudart_cudaRoundMode {
  __pyx_e_4cuda_7ccudart_cudaRoundNearest,
  __pyx_e_4cuda_7ccudart_cudaRoundZero,
  __pyx_e_4cuda_7ccudart_cudaRoundPosInf,
  __pyx_e_4cuda_7ccudart_cudaRoundMinInf
};

/* "cuda/ccudart.pxd":20
 *     unsigned int z
 * 
 * cdef enum cudaError:             # <<<<<<<<<<<<<<
 *     cudaSuccess = 0
 *     cudaErrorInvalidValue = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaError {
  __pyx_e_4cuda_7ccudart_cudaSuccess = 0,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue = 1,
  __pyx_e_4cuda_7ccudart_cudaErrorMemoryAllocation = 2,
  __pyx_e_4cuda_7ccudart_cudaErrorInitializationError = 3,
  __pyx_e_4cuda_7ccudart_cudaErrorCudartUnloading = 4,
  __pyx_e_4cuda_7ccudart_cudaErrorProfilerDisabled = 5,
  __pyx_e_4cuda_7ccudart_cudaErrorProfilerNotInitialized = 6,
  __pyx_e_4cuda_7ccudart_cudaErrorProfilerAlreadyStarted = 7,
  __pyx_e_4cuda_7ccudart_cudaErrorProfilerAlreadyStopped = 8,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidConfiguration = 9,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue = 12,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidSymbol = 13,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidHostPointer = 16,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidDevicePointer = 17,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidTexture = 18,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidTextureBinding = 19,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor = 20,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection = 21,
  __pyx_e_4cuda_7ccudart_cudaErrorAddressOfConstant = 22,
  __pyx_e_4cuda_7ccudart_cudaErrorTextureFetchFailed = 23,
  __pyx_e_4cuda_7ccudart_cudaErrorTextureNotBound = 24,
  __pyx_e_4cuda_7ccudart_cudaErrorSynchronizationError = 25,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidFilterSetting = 26,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidNormSetting = 27,
  __pyx_e_4cuda_7ccudart_cudaErrorMixedDeviceExecution = 28,
  __pyx_e_4cuda_7ccudart_cudaErrorNotYetImplemented = 31,
  __pyx_e_4cuda_7ccudart_cudaErrorMemoryValueTooLarge = 32,
  __pyx_e_4cuda_7ccudart_cudaErrorStubLibrary = 34,
  __pyx_e_4cuda_7ccudart_cudaErrorInsufficientDriver = 35,
  __pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver = 36,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidSurface = 37,
  __pyx_e_4cuda_7ccudart_cudaErrorDuplicateVariableName = 43,
  __pyx_e_4cuda_7ccudart_cudaErrorDuplicateTextureName = 44,
  __pyx_e_4cuda_7ccudart_cudaErrorDuplicateSurfaceName = 45,
  __pyx_e_4cuda_7ccudart_cudaErrorDevicesUnavailable = 46,
  __pyx_e_4cuda_7ccudart_cudaErrorIncompatibleDriverContext = 49,
  __pyx_e_4cuda_7ccudart_cudaErrorMissingConfiguration = 52,
  __pyx_e_4cuda_7ccudart_cudaErrorPriorLaunchFailure = 53,
  __pyx_e_4cuda_7ccudart_cudaErrorLaunchMaxDepthExceeded = 65,
  __pyx_e_4cuda_7ccudart_cudaErrorLaunchFileScopedTex = 66,
  __pyx_e_4cuda_7ccudart_cudaErrorLaunchFileScopedSurf = 67,
  __pyx_e_4cuda_7ccudart_cudaErrorSyncDepthExceeded = 68,
  __pyx_e_4cuda_7ccudart_cudaErrorLaunchPendingCountExceeded = 69,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidDeviceFunction = 98,
  __pyx_e_4cuda_7ccudart_cudaErrorNoDevice = 0x64,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidDevice = 0x65,
  __pyx_e_4cuda_7ccudart_cudaErrorDeviceNotLicensed = 0x66,
  __pyx_e_4cuda_7ccudart_cudaErrorSoftwareValidityNotEstablished = 0x67,
  __pyx_e_4cuda_7ccudart_cudaErrorStartupFailure = 0x7F,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidKernelImage = 0xC8,
  __pyx_e_4cuda_7ccudart_cudaErrorDeviceUninitialized = 0xC9,
  __pyx_e_4cuda_7ccudart_cudaErrorMapBufferObjectFailed = 0xCD,
  __pyx_e_4cuda_7ccudart_cudaErrorUnmapBufferObjectFailed = 0xCE,
  __pyx_e_4cuda_7ccudart_cudaErrorArrayIsMapped = 0xCF,
  __pyx_e_4cuda_7ccudart_cudaErrorAlreadyMapped = 0xD0,
  __pyx_e_4cuda_7ccudart_cudaErrorNoKernelImageForDevice = 0xD1,
  __pyx_e_4cuda_7ccudart_cudaErrorAlreadyAcquired = 0xD2,
  __pyx_e_4cuda_7ccudart_cudaErrorNotMapped = 0xD3,
  __pyx_e_4cuda_7ccudart_cudaErrorNotMappedAsArray = 0xD4,
  __pyx_e_4cuda_7ccudart_cudaErrorNotMappedAsPointer = 0xD5,
  __pyx_e_4cuda_7ccudart_cudaErrorECCUncorrectable = 0xD6,
  __pyx_e_4cuda_7ccudart_cudaErrorUnsupportedLimit = 0xD7,
  __pyx_e_4cuda_7ccudart_cudaErrorDeviceAlreadyInUse = 0xD8,
  __pyx_e_4cuda_7ccudart_cudaErrorPeerAccessUnsupported = 0xD9,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidPtx = 0xDA,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidGraphicsContext = 0xDB,
  __pyx_e_4cuda_7ccudart_cudaErrorNvlinkUncorrectable = 0xDC,
  __pyx_e_4cuda_7ccudart_cudaErrorJitCompilerNotFound = 0xDD,
  __pyx_e_4cuda_7ccudart_cudaErrorUnsupportedPtxVersion = 0xDE,
  __pyx_e_4cuda_7ccudart_cudaErrorJitCompilationDisabled = 0xDF,
  __pyx_e_4cuda_7ccudart_cudaErrorUnsupportedExecAffinity = 0xE0,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidSource = 0x12C,
  __pyx_e_4cuda_7ccudart_cudaErrorFileNotFound = 0x12D,
  __pyx_e_4cuda_7ccudart_cudaErrorSharedObjectSymbolNotFound = 0x12E,
  __pyx_e_4cuda_7ccudart_cudaErrorSharedObjectInitFailed = 0x12F,
  __pyx_e_4cuda_7ccudart_cudaErrorOperatingSystem = 0x130,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidResourceHandle = 0x190,
  __pyx_e_4cuda_7ccudart_cudaErrorIllegalState = 0x191,
  __pyx_e_4cuda_7ccudart_cudaErrorSymbolNotFound = 0x1F4,
  __pyx_e_4cuda_7ccudart_cudaErrorNotReady = 0x258,
  __pyx_e_4cuda_7ccudart_cudaErrorIllegalAddress = 0x2BC,
  __pyx_e_4cuda_7ccudart_cudaErrorLaunchOutOfResources = 0x2BD,
  __pyx_e_4cuda_7ccudart_cudaErrorLaunchTimeout = 0x2BE,
  __pyx_e_4cuda_7ccudart_cudaErrorLaunchIncompatibleTexturing = 0x2BF,
  __pyx_e_4cuda_7ccudart_cudaErrorPeerAccessAlreadyEnabled = 0x2C0,
  __pyx_e_4cuda_7ccudart_cudaErrorPeerAccessNotEnabled = 0x2C1,
  __pyx_e_4cuda_7ccudart_cudaErrorSetOnActiveProcess = 0x2C4,
  __pyx_e_4cuda_7ccudart_cudaErrorContextIsDestroyed = 0x2C5,
  __pyx_e_4cuda_7ccudart_cudaErrorAssert = 0x2C6,
  __pyx_e_4cuda_7ccudart_cudaErrorTooManyPeers = 0x2C7,
  __pyx_e_4cuda_7ccudart_cudaErrorHostMemoryAlreadyRegistered = 0x2C8,
  __pyx_e_4cuda_7ccudart_cudaErrorHostMemoryNotRegistered = 0x2C9,
  __pyx_e_4cuda_7ccudart_cudaErrorHardwareStackError = 0x2CA,
  __pyx_e_4cuda_7ccudart_cudaErrorIllegalInstruction = 0x2CB,
  __pyx_e_4cuda_7ccudart_cudaErrorMisalignedAddress = 0x2CC,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidAddressSpace = 0x2CD,
  __pyx_e_4cuda_7ccudart_cudaErrorInvalidPc = 0x2CE,
  __pyx_e_4cuda_7ccudart_cudaErrorLaunchFailure = 0x2CF,
  __pyx_e_4cuda_7ccudart_cudaErrorCooperativeLaunchTooLarge = 0x2D0,
  __pyx_e_4cuda_7ccudart_cudaErrorNotPermitted = 0x320,
  __pyx_e_4cuda_7ccudart_cudaErrorNotSupported = 0x321,
  __pyx_e_4cuda_7ccudart_cudaErrorSystemNotReady = 0x322,
  __pyx_e_4cuda_7ccudart_cudaErrorSystemDriverMismatch = 0x323,
  __pyx_e_4cuda_7ccudart_cudaErrorCompatNotSupportedOnDevice = 0x324,
  __pyx_e_4cuda_7ccudart_cudaErrorMpsConnectionFailed = 0x325,
  __pyx_e_4cuda_7ccudart_cudaErrorMpsRpcFailure = 0x326,
  __pyx_e_4cuda_7ccudart_cudaErrorMpsServerNotReady = 0x327,
  __pyx_e_4cuda_7ccudart_cudaErrorMpsMaxClientsReached = 0x328,
  __pyx_e_4cuda_7ccudart_cudaErrorMpsMaxConnectionsReached = 0x329,
  __pyx_e_4cuda_7ccudart_cudaErrorStreamCaptureUnsupported = 0x384,
  __pyx_e_4cuda_7ccudart_cudaErrorStreamCaptureInvalidated = 0x385,
  __pyx_e_4cuda_7ccudart_cudaErrorStreamCaptureMerge = 0x386,
  __pyx_e_4cuda_7ccudart_cudaErrorStreamCaptureUnmatched = 0x387,
  __pyx_e_4cuda_7ccudart_cudaErrorStreamCaptureUnjoined = 0x388,
  __pyx_e_4cuda_7ccudart_cudaErrorStreamCaptureIsolation = 0x389,
  __pyx_e_4cuda_7ccudart_cudaErrorStreamCaptureImplicit = 0x38A,
  __pyx_e_4cuda_7ccudart_cudaErrorCapturedEvent = 0x38B,
  __pyx_e_4cuda_7ccudart_cudaErrorStreamCaptureWrongThread = 0x38C,
  __pyx_e_4cuda_7ccudart_cudaErrorTimeout = 0x38D,
  __pyx_e_4cuda_7ccudart_cudaErrorGraphExecUpdateFailure = 0x38E,
  __pyx_e_4cuda_7ccudart_cudaErrorExternalDevice = 0x38F,
  __pyx_e_4cuda_7ccudart_cudaErrorUnknown = 0x3E7,
  __pyx_e_4cuda_7ccudart_cudaErrorApiFailureBase = 0x2710
};

/* "cuda/ccudart.pxd":145
 *     cudaErrorApiFailureBase = 10000
 * 
 * cdef enum cudaChannelFormatKind:             # <<<<<<<<<<<<<<
 *     cudaChannelFormatKindSigned = 0
 *     cudaChannelFormatKindUnsigned = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaChannelFormatKind {
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned = 0,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned = 1,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat = 2,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindNone = 3,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindNV12 = 4,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X1 = 5,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X2 = 6,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X4 = 7,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X1 = 8,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X2 = 9,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X4 = 10,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X1 = 11,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X2 = 12,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X4 = 13,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X1 = 14,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X2 = 15,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X4 = 16,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed1 = 17,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed1SRGB = 18,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed2 = 19,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed2SRGB = 20,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed3 = 21,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed3SRGB = 22,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed4 = 23,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed4 = 24,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed5 = 25,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed5 = 26,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed6H = 27,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed6H = 28,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed7 = 29,
  __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30
};

/* "cuda/ccudart.pxd":219
 *     unsigned int reserved[4]
 * 
 * cdef enum cudaMemoryType:             # <<<<<<<<<<<<<<
 *     cudaMemoryTypeUnregistered = 0
 *     cudaMemoryTypeHost = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaMemoryType {
  __pyx_e_4cuda_7ccudart_cudaMemoryTypeUnregistered = 0,
  __pyx_e_4cuda_7ccudart_cudaMemoryTypeHost = 1,
  __pyx_e_4cuda_7ccudart_cudaMemoryTypeDevice = 2,
  __pyx_e_4cuda_7ccudart_cudaMemoryTypeManaged = 3
};

/* "cuda/ccudart.pxd":225
 *     cudaMemoryTypeManaged = 3
 * 
 * cdef enum cudaMemcpyKind:             # <<<<<<<<<<<<<<
 *     cudaMemcpyHostToHost = 0
 *     cudaMemcpyHostToDevice = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind {
  __pyx_e_4cuda_7ccudart_cudaMemcpyHostToHost = 0,
  __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice = 1,
  __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost = 2,
  __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice = 3,
  __pyx_e_4cuda_7ccudart_cudaMemcpyDefault = 4
};

/* "cuda/ccudart.pxd":277
 *     size_t height
 * 
 * cdef enum cudaAccessProperty:             # <<<<<<<<<<<<<<
 *     cudaAccessPropertyNormal = 0
 *     cudaAccessPropertyStreaming = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaAccessProperty {
  __pyx_e_4cuda_7ccudart_cudaAccessPropertyNormal = 0,
  __pyx_e_4cuda_7ccudart_cudaAccessPropertyStreaming = 1,
  __pyx_e_4cuda_7ccudart_cudaAccessPropertyPersisting = 2
};

/* "cuda/ccudart.pxd":295
 *     void* userData
 * 
 * cdef enum cudaStreamCaptureStatus:             # <<<<<<<<<<<<<<
 *     cudaStreamCaptureStatusNone = 0
 *     cudaStreamCaptureStatusActive = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaStreamCaptureStatus {
  __pyx_e_4cuda_7ccudart_cudaStreamCaptureStatusNone = 0,
  __pyx_e_4cuda_7ccudart_cudaStreamCaptureStatusActive = 1,
  __pyx_e_4cuda_7ccudart_cudaStreamCaptureStatusInvalidated = 2
};

/* "cuda/ccudart.pxd":300
 *     cudaStreamCaptureStatusInvalidated = 2
 * 
 * cdef enum cudaStreamCaptureMode:             # <<<<<<<<<<<<<<
 *     cudaStreamCaptureModeGlobal = 0
 *     cudaStreamCaptureModeThreadLocal = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaStreamCaptureMode {
  __pyx_e_4cuda_7ccudart_cudaStreamCaptureModeGlobal = 0,
  __pyx_e_4cuda_7ccudart_cudaStreamCaptureModeThreadLocal = 1,
  __pyx_e_4cuda_7ccudart_cudaStreamCaptureModeRelaxed = 2
};

/* "cuda/ccudart.pxd":305
 *     cudaStreamCaptureModeRelaxed = 2
 * 
 * cdef enum cudaSynchronizationPolicy:             # <<<<<<<<<<<<<<
 *     cudaSyncPolicyAuto = 1
 *     cudaSyncPolicySpin = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaSynchronizationPolicy {
  __pyx_e_4cuda_7ccudart_cudaSyncPolicyAuto = 1,
  __pyx_e_4cuda_7ccudart_cudaSyncPolicySpin = 2,
  __pyx_e_4cuda_7ccudart_cudaSyncPolicyYield = 3,
  __pyx_e_4cuda_7ccudart_cudaSyncPolicyBlockingSync = 4
};

/* "cuda/ccudart.pxd":311
 *     cudaSyncPolicyBlockingSync = 4
 * 
 * cdef enum cudaStreamAttrID:             # <<<<<<<<<<<<<<
 *     cudaStreamAttributeAccessPolicyWindow = 1
 *     cudaStreamAttributeSynchronizationPolicy = 3
 */
enum __pyx_t_4cuda_7ccudart_cudaStreamAttrID {
  __pyx_e_4cuda_7ccudart_cudaStreamAttributeAccessPolicyWindow = 1,
  __pyx_e_4cuda_7ccudart_cudaStreamAttributeSynchronizationPolicy = 3
};

/* "cuda/ccudart.pxd":319
 *     cudaSynchronizationPolicy syncPolicy
 * 
 * cdef enum cudaStreamUpdateCaptureDependenciesFlags:             # <<<<<<<<<<<<<<
 *     cudaStreamAddCaptureDependencies = 0x0
 *     cudaStreamSetCaptureDependencies = 0x1
 */
enum __pyx_t_4cuda_7ccudart_cudaStreamUpdateCaptureDependenciesFlags {
  __pyx_e_4cuda_7ccudart_cudaStreamAddCaptureDependencies = 0x0,
  __pyx_e_4cuda_7ccudart_cudaStreamSetCaptureDependencies = 0x1
};

/* "cuda/ccudart.pxd":323
 *     cudaStreamSetCaptureDependencies = 0x1
 * 
 * cdef enum cudaUserObjectFlags:             # <<<<<<<<<<<<<<
 *     cudaUserObjectNoDestructorSync = 0x1
 * 
 */
enum __pyx_t_4cuda_7ccudart_cudaUserObjectFlags {
  __pyx_e_4cuda_7ccudart_cudaUserObjectNoDestructorSync = 0x1
};

/* "cuda/ccudart.pxd":326
 *     cudaUserObjectNoDestructorSync = 0x1
 * 
 * cdef enum cudaUserObjectRetainFlags:             # <<<<<<<<<<<<<<
 *     cudaGraphUserObjectMove = 0x1
 * 
 */
enum __pyx_t_4cuda_7ccudart_cudaUserObjectRetainFlags {
  __pyx_e_4cuda_7ccudart_cudaGraphUserObjectMove = 0x1
};

/* "cuda/ccudart.pxd":330
 * 
 * 
 * cdef enum cudaGraphicsRegisterFlags:             # <<<<<<<<<<<<<<
 *     cudaGraphicsRegisterFlagsNone = 0
 *     cudaGraphicsRegisterFlagsReadOnly = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphicsRegisterFlags {
  __pyx_e_4cuda_7ccudart_cudaGraphicsRegisterFlagsNone = 0,
  __pyx_e_4cuda_7ccudart_cudaGraphicsRegisterFlagsReadOnly = 1,
  __pyx_e_4cuda_7ccudart_cudaGraphicsRegisterFlagsWriteDiscard = 2,
  __pyx_e_4cuda_7ccudart_cudaGraphicsRegisterFlagsSurfaceLoadStore = 4,
  __pyx_e_4cuda_7ccudart_cudaGraphicsRegisterFlagsTextureGather = 8
};

/* "cuda/ccudart.pxd":337
 *     cudaGraphicsRegisterFlagsTextureGather = 8
 * 
 * cdef enum cudaGraphicsMapFlags:             # <<<<<<<<<<<<<<
 *     cudaGraphicsMapFlagsNone = 0
 *     cudaGraphicsMapFlagsReadOnly = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphicsMapFlags {
  __pyx_e_4cuda_7ccudart_cudaGraphicsMapFlagsNone = 0,
  __pyx_e_4cuda_7ccudart_cudaGraphicsMapFlagsReadOnly = 1,
  __pyx_e_4cuda_7ccudart_cudaGraphicsMapFlagsWriteDiscard = 2
};

/* "cuda/ccudart.pxd":342
 *     cudaGraphicsMapFlagsWriteDiscard = 2
 * 
 * cdef enum cudaGraphicsCubeFace:             # <<<<<<<<<<<<<<
 *     cudaGraphicsCubeFacePositiveX = 0x00
 *     cudaGraphicsCubeFaceNegativeX = 0x01
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphicsCubeFace {
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFacePositiveX = 0x00,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFaceNegativeX = 0x01,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFacePositiveY = 0x02,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFaceNegativeY = 0x03,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFacePositiveZ = 0x04,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFaceNegativeZ = 0x05
};

/* "cuda/ccudart.pxd":350
 *     cudaGraphicsCubeFaceNegativeZ = 0x05
 * 
 * cdef enum cudaKernelNodeAttrID:             # <<<<<<<<<<<<<<
 *     cudaKernelNodeAttributeAccessPolicyWindow = 1
 *     cudaKernelNodeAttributeCooperative = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaKernelNodeAttrID {
  __pyx_e_4cuda_7ccudart_cudaKernelNodeAttributeAccessPolicyWindow = 1,
  __pyx_e_4cuda_7ccudart_cudaKernelNodeAttributeCooperative = 2
};

/* "cuda/ccudart.pxd":358
 *     int cooperative
 * 
 * cdef enum cudaResourceType:             # <<<<<<<<<<<<<<
 *     cudaResourceTypeArray = 0x00
 *     cudaResourceTypeMipmappedArray = 0x01
 */
enum __pyx_t_4cuda_7ccudart_cudaResourceType {
  __pyx_e_4cuda_7ccudart_cudaResourceTypeArray = 0x00,
  __pyx_e_4cuda_7ccudart_cudaResourceTypeMipmappedArray = 0x01,
  __pyx_e_4cuda_7ccudart_cudaResourceTypeLinear = 0x02,
  __pyx_e_4cuda_7ccudart_cudaResourceTypePitch2D = 0x03
};

/* "cuda/ccudart.pxd":364
 *     cudaResourceTypePitch2D = 0x03
 * 
 * cdef enum cudaResourceViewFormat:             # <<<<<<<<<<<<<<
 *     cudaResViewFormatNone = 0x00
 *     cudaResViewFormatUnsignedChar1 = 0x01
 */
enum __pyx_t_4cuda_7ccudart_cudaResourceViewFormat {
  __pyx_e_4cuda_7ccudart_cudaResViewFormatNone = 0x00,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedChar1 = 0x01,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedChar2 = 0x02,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedChar4 = 0x03,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedChar1 = 0x04,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedChar2 = 0x05,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedChar4 = 0x06,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedShort1 = 0x07,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedShort2 = 0x08,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedShort4 = 0x09,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedShort1 = 0x0a,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedShort2 = 0x0b,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedShort4 = 0x0c,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedInt1 = 0x0d,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedInt2 = 0x0e,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedInt4 = 0x0f,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedInt1 = 0x10,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedInt2 = 0x11,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedInt4 = 0x12,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatHalf1 = 0x13,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatHalf2 = 0x14,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatHalf4 = 0x15,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatFloat1 = 0x16,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatFloat2 = 0x17,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatFloat4 = 0x18,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed1 = 0x19,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed2 = 0x1a,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed3 = 0x1b,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed4 = 0x1c,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedBlockCompressed4 = 0x1d,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed5 = 0x1e,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedBlockCompressed5 = 0x1f,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed6H = 0x20,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedBlockCompressed6H = 0x21,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed7 = 0x22
};

/* "cuda/ccudart.pxd":457
 *     int preferredShmemCarveout
 * 
 * cdef enum cudaFuncAttribute:             # <<<<<<<<<<<<<<
 *     cudaFuncAttributeMaxDynamicSharedMemorySize = 8
 *     cudaFuncAttributePreferredSharedMemoryCarveout = 9
 */
enum __pyx_t_4cuda_7ccudart_cudaFuncAttribute {
  __pyx_e_4cuda_7ccudart_cudaFuncAttributeMaxDynamicSharedMemorySize = 8,
  __pyx_e_4cuda_7ccudart_cudaFuncAttributePreferredSharedMemoryCarveout = 9,
  __pyx_e_4cuda_7ccudart_cudaFuncAttributeMax
};

/* "cuda/ccudart.pxd":462
 *     cudaFuncAttributeMax
 * 
 * cdef enum cudaFuncCache:             # <<<<<<<<<<<<<<
 *     cudaFuncCachePreferNone = 0
 *     cudaFuncCachePreferShared = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaFuncCache {
  __pyx_e_4cuda_7ccudart_cudaFuncCachePreferNone = 0,
  __pyx_e_4cuda_7ccudart_cudaFuncCachePreferShared = 1,
  __pyx_e_4cuda_7ccudart_cudaFuncCachePreferL1 = 2,
  __pyx_e_4cuda_7ccudart_cudaFuncCachePreferEqual = 3
};

/* "cuda/ccudart.pxd":468
 *     cudaFuncCachePreferEqual = 3
 * 
 * cdef enum cudaSharedMemConfig:             # <<<<<<<<<<<<<<
 *     cudaSharedMemBankSizeDefault = 0
 *     cudaSharedMemBankSizeFourByte = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaSharedMemConfig {
  __pyx_e_4cuda_7ccudart_cudaSharedMemBankSizeDefault = 0,
  __pyx_e_4cuda_7ccudart_cudaSharedMemBankSizeFourByte = 1,
  __pyx_e_4cuda_7ccudart_cudaSharedMemBankSizeEightByte = 2
};

/* "cuda/ccudart.pxd":473
 *     cudaSharedMemBankSizeEightByte = 2
 * 
 * cdef enum cudaSharedCarveout:             # <<<<<<<<<<<<<<
 *     cudaSharedmemCarveoutDefault = -1
 *     cudaSharedmemCarveoutMaxShared = 100
 */
enum __pyx_t_4cuda_7ccudart_cudaSharedCarveout {
  __pyx_e_4cuda_7ccudart_cudaSharedmemCarveoutDefault = -1L,
  __pyx_e_4cuda_7ccudart_cudaSharedmemCarveoutMaxShared = 0x64,
  __pyx_e_4cuda_7ccudart_cudaSharedmemCarveoutMaxL1 = 0
};

/* "cuda/ccudart.pxd":478
 *     cudaSharedmemCarveoutMaxL1 = 0
 * 
 * cdef enum cudaComputeMode:             # <<<<<<<<<<<<<<
 *     cudaComputeModeDefault = 0
 *     cudaComputeModeExclusive = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaComputeMode {
  __pyx_e_4cuda_7ccudart_cudaComputeModeDefault = 0,
  __pyx_e_4cuda_7ccudart_cudaComputeModeExclusive = 1,
  __pyx_e_4cuda_7ccudart_cudaComputeModeProhibited = 2,
  __pyx_e_4cuda_7ccudart_cudaComputeModeExclusiveProcess = 3
};

/* "cuda/ccudart.pxd":484
 *     cudaComputeModeExclusiveProcess = 3
 * 
 * cdef enum cudaLimit:             # <<<<<<<<<<<<<<
 *     cudaLimitStackSize = 0x00
 *     cudaLimitPrintfFifoSize = 0x01
 */
enum __pyx_t_4cuda_7ccudart_cudaLimit {
  __pyx_e_4cuda_7ccudart_cudaLimitStackSize = 0x00,
  __pyx_e_4cuda_7ccudart_cudaLimitPrintfFifoSize = 0x01,
  __pyx_e_4cuda_7ccudart_cudaLimitMallocHeapSize = 0x02,
  __pyx_e_4cuda_7ccudart_cudaLimitDevRuntimeSyncDepth = 0x03,
  __pyx_e_4cuda_7ccudart_cudaLimitDevRuntimePendingLaunchCount = 0x04,
  __pyx_e_4cuda_7ccudart_cudaLimitMaxL2FetchGranularity = 0x05,
  __pyx_e_4cuda_7ccudart_cudaLimitPersistingL2CacheSize = 0x06
};

/* "cuda/ccudart.pxd":493
 *     cudaLimitPersistingL2CacheSize = 0x06
 * 
 * cdef enum cudaMemoryAdvise:             # <<<<<<<<<<<<<<
 *     cudaMemAdviseSetReadMostly = 1
 *     cudaMemAdviseUnsetReadMostly = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaMemoryAdvise {
  __pyx_e_4cuda_7ccudart_cudaMemAdviseSetReadMostly = 1,
  __pyx_e_4cuda_7ccudart_cudaMemAdviseUnsetReadMostly = 2,
  __pyx_e_4cuda_7ccudart_cudaMemAdviseSetPreferredLocation = 3,
  __pyx_e_4cuda_7ccudart_cudaMemAdviseUnsetPreferredLocation = 4,
  __pyx_e_4cuda_7ccudart_cudaMemAdviseSetAccessedBy = 5,
  __pyx_e_4cuda_7ccudart_cudaMemAdviseUnsetAccessedBy = 6
};

/* "cuda/ccudart.pxd":501
 *     cudaMemAdviseUnsetAccessedBy = 6
 * 
 * cdef enum cudaMemRangeAttribute:             # <<<<<<<<<<<<<<
 *     cudaMemRangeAttributeReadMostly = 1
 *     cudaMemRangeAttributePreferredLocation = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaMemRangeAttribute {
  __pyx_e_4cuda_7ccudart_cudaMemRangeAttributeReadMostly = 1,
  __pyx_e_4cuda_7ccudart_cudaMemRangeAttributePreferredLocation = 2,
  __pyx_e_4cuda_7ccudart_cudaMemRangeAttributeAccessedBy = 3,
  __pyx_e_4cuda_7ccudart_cudaMemRangeAttributeLastPrefetchLocation = 4
};

/* "cuda/ccudart.pxd":507
 *     cudaMemRangeAttributeLastPrefetchLocation = 4
 * 
 * cdef enum cudaOutputMode:             # <<<<<<<<<<<<<<
 *     cudaKeyValuePair = 0x00
 *     cudaCSV = 0x01
 */
enum __pyx_t_4cuda_7ccudart_cudaOutputMode {
  __pyx_e_4cuda_7ccudart_cudaKeyValuePair = 0x00,
  __pyx_e_4cuda_7ccudart_cudaCSV = 0x01
};

/* "cuda/ccudart.pxd":511
 *     cudaCSV = 0x01
 * 
 * cdef enum cudaFlushGPUDirectRDMAWritesOptions:             # <<<<<<<<<<<<<<
 *     cudaFlushGPUDirectRDMAWritesOptionHost = 1<<0
 *     cudaFlushGPUDirectRDMAWritesOptionMemOps = 1<<1
 */
enum __pyx_t_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesOptions {

  /* "cuda/ccudart.pxd":513
 * cdef enum cudaFlushGPUDirectRDMAWritesOptions:
 *     cudaFlushGPUDirectRDMAWritesOptionHost = 1<<0
 *     cudaFlushGPUDirectRDMAWritesOptionMemOps = 1<<1             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaGPUDirectRDMAWritesOrdering:
 */
  __pyx_e_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesOptionHost = (1 << 0),
  __pyx_e_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesOptionMemOps = (1 << 1)
};

/* "cuda/ccudart.pxd":515
 *     cudaFlushGPUDirectRDMAWritesOptionMemOps = 1<<1
 * 
 * cdef enum cudaGPUDirectRDMAWritesOrdering:             # <<<<<<<<<<<<<<
 *     cudaGPUDirectRDMAWritesOrderingNone = 0
 *     cudaGPUDirectRDMAWritesOrderingOwner = 100
 */
enum __pyx_t_4cuda_7ccudart_cudaGPUDirectRDMAWritesOrdering {
  __pyx_e_4cuda_7ccudart_cudaGPUDirectRDMAWritesOrderingNone = 0,
  __pyx_e_4cuda_7ccudart_cudaGPUDirectRDMAWritesOrderingOwner = 0x64,
  __pyx_e_4cuda_7ccudart_cudaGPUDirectRDMAWritesOrderingAllDevices = 0xC8
};

/* "cuda/ccudart.pxd":520
 *     cudaGPUDirectRDMAWritesOrderingAllDevices = 200
 * 
 * cdef enum cudaFlushGPUDirectRDMAWritesScope:             # <<<<<<<<<<<<<<
 *     cudaFlushGPUDirectRDMAWritesToOwner = 100
 *     cudaFlushGPUDirectRDMAWritesToAllDevices = 200
 */
enum __pyx_t_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesScope {
  __pyx_e_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesToOwner = 0x64,
  __pyx_e_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesToAllDevices = 0xC8
};

/* "cuda/ccudart.pxd":524
 *     cudaFlushGPUDirectRDMAWritesToAllDevices = 200
 * 
 * cdef enum cudaFlushGPUDirectRDMAWritesTarget:             # <<<<<<<<<<<<<<
 *     cudaFlushGPUDirectRDMAWritesTargetCurrentDevice
 * 
 */
enum __pyx_t_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesTarget {
  __pyx_e_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesTargetCurrentDevice
};

/* "cuda/ccudart.pxd":527
 *     cudaFlushGPUDirectRDMAWritesTargetCurrentDevice
 * 
 * cdef enum cudaDeviceAttr:             # <<<<<<<<<<<<<<
 *     cudaDevAttrMaxThreadsPerBlock = 1
 *     cudaDevAttrMaxBlockDimX = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaDeviceAttr {
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxThreadsPerBlock = 1,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxBlockDimX = 2,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxBlockDimY = 3,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxBlockDimZ = 4,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxGridDimX = 5,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxGridDimY = 6,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxGridDimZ = 7,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSharedMemoryPerBlock = 8,
  __pyx_e_4cuda_7ccudart_cudaDevAttrTotalConstantMemory = 9,
  __pyx_e_4cuda_7ccudart_cudaDevAttrWarpSize = 10,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxPitch = 11,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxRegistersPerBlock = 12,
  __pyx_e_4cuda_7ccudart_cudaDevAttrClockRate = 13,
  __pyx_e_4cuda_7ccudart_cudaDevAttrTextureAlignment = 14,
  __pyx_e_4cuda_7ccudart_cudaDevAttrGpuOverlap = 15,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMultiProcessorCount = 16,
  __pyx_e_4cuda_7ccudart_cudaDevAttrKernelExecTimeout = 17,
  __pyx_e_4cuda_7ccudart_cudaDevAttrIntegrated = 18,
  __pyx_e_4cuda_7ccudart_cudaDevAttrCanMapHostMemory = 19,
  __pyx_e_4cuda_7ccudart_cudaDevAttrComputeMode = 20,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture1DWidth = 21,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DWidth = 22,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DHeight = 23,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture3DWidth = 24,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture3DHeight = 25,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture3DDepth = 26,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DLayeredWidth = 27,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DLayeredHeight = 28,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DLayeredLayers = 29,
  __pyx_e_4cuda_7ccudart_cudaDevAttrSurfaceAlignment = 30,
  __pyx_e_4cuda_7ccudart_cudaDevAttrConcurrentKernels = 31,
  __pyx_e_4cuda_7ccudart_cudaDevAttrEccEnabled = 32,
  __pyx_e_4cuda_7ccudart_cudaDevAttrPciBusId = 33,
  __pyx_e_4cuda_7ccudart_cudaDevAttrPciDeviceId = 34,
  __pyx_e_4cuda_7ccudart_cudaDevAttrTccDriver = 35,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMemoryClockRate = 36,
  __pyx_e_4cuda_7ccudart_cudaDevAttrGlobalMemoryBusWidth = 37,
  __pyx_e_4cuda_7ccudart_cudaDevAttrL2CacheSize = 38,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxThreadsPerMultiProcessor = 39,
  __pyx_e_4cuda_7ccudart_cudaDevAttrAsyncEngineCount = 40,
  __pyx_e_4cuda_7ccudart_cudaDevAttrUnifiedAddressing = 41,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture1DLayeredWidth = 42,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture1DLayeredLayers = 43,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DGatherWidth = 45,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DGatherHeight = 46,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture3DWidthAlt = 47,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture3DHeightAlt = 48,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture3DDepthAlt = 49,
  __pyx_e_4cuda_7ccudart_cudaDevAttrPciDomainId = 50,
  __pyx_e_4cuda_7ccudart_cudaDevAttrTexturePitchAlignment = 51,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTextureCubemapWidth = 52,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTextureCubemapLayeredWidth = 53,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTextureCubemapLayeredLayers = 54,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface1DWidth = 55,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface2DWidth = 56,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface2DHeight = 57,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface3DWidth = 58,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface3DHeight = 59,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface3DDepth = 60,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface1DLayeredWidth = 61,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface1DLayeredLayers = 62,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface2DLayeredWidth = 63,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface2DLayeredHeight = 64,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurface2DLayeredLayers = 65,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurfaceCubemapWidth = 66,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture1DLinearWidth = 69,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DLinearWidth = 70,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DLinearHeight = 71,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DLinearPitch = 72,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DMipmappedWidth = 73,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture2DMipmappedHeight = 74,
  __pyx_e_4cuda_7ccudart_cudaDevAttrComputeCapabilityMajor = 75,
  __pyx_e_4cuda_7ccudart_cudaDevAttrComputeCapabilityMinor = 76,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTexture1DMipmappedWidth = 77,
  __pyx_e_4cuda_7ccudart_cudaDevAttrStreamPrioritiesSupported = 78,
  __pyx_e_4cuda_7ccudart_cudaDevAttrGlobalL1CacheSupported = 79,
  __pyx_e_4cuda_7ccudart_cudaDevAttrLocalL1CacheSupported = 80,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxRegistersPerMultiprocessor = 82,
  __pyx_e_4cuda_7ccudart_cudaDevAttrManagedMemory = 83,
  __pyx_e_4cuda_7ccudart_cudaDevAttrIsMultiGpuBoard = 84,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMultiGpuBoardGroupID = 85,
  __pyx_e_4cuda_7ccudart_cudaDevAttrHostNativeAtomicSupported = 86,
  __pyx_e_4cuda_7ccudart_cudaDevAttrSingleToDoublePrecisionPerfRatio = 87,
  __pyx_e_4cuda_7ccudart_cudaDevAttrPageableMemoryAccess = 88,
  __pyx_e_4cuda_7ccudart_cudaDevAttrConcurrentManagedAccess = 89,
  __pyx_e_4cuda_7ccudart_cudaDevAttrComputePreemptionSupported = 90,
  __pyx_e_4cuda_7ccudart_cudaDevAttrCanUseHostPointerForRegisteredMem = 91,
  __pyx_e_4cuda_7ccudart_cudaDevAttrReserved92 = 92,
  __pyx_e_4cuda_7ccudart_cudaDevAttrReserved93 = 93,
  __pyx_e_4cuda_7ccudart_cudaDevAttrReserved94 = 94,
  __pyx_e_4cuda_7ccudart_cudaDevAttrCooperativeLaunch = 95,
  __pyx_e_4cuda_7ccudart_cudaDevAttrCooperativeMultiDeviceLaunch = 96,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxSharedMemoryPerBlockOptin = 97,
  __pyx_e_4cuda_7ccudart_cudaDevAttrCanFlushRemoteWrites = 98,
  __pyx_e_4cuda_7ccudart_cudaDevAttrHostRegisterSupported = 99,
  __pyx_e_4cuda_7ccudart_cudaDevAttrPageableMemoryAccessUsesHostPageTables = 0x64,
  __pyx_e_4cuda_7ccudart_cudaDevAttrDirectManagedMemAccessFromHost = 0x65,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxBlocksPerMultiprocessor = 0x6A,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxPersistingL2CacheSize = 0x6C,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxAccessPolicyWindowSize = 0x6D,
  __pyx_e_4cuda_7ccudart_cudaDevAttrReservedSharedMemoryPerBlock = 0x6F,
  __pyx_e_4cuda_7ccudart_cudaDevAttrSparseCudaArraySupported = 0x70,
  __pyx_e_4cuda_7ccudart_cudaDevAttrHostRegisterReadOnlySupported = 0x71,
  __pyx_e_4cuda_7ccudart_cudaDevAttrTimelineSemaphoreInteropSupported = 0x72,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMaxTimelineSemaphoreInteropSupported = 0x72,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMemoryPoolsSupported = 0x73,
  __pyx_e_4cuda_7ccudart_cudaDevAttrGPUDirectRDMASupported = 0x74,
  __pyx_e_4cuda_7ccudart_cudaDevAttrGPUDirectRDMAFlushWritesOptions = 0x75,
  __pyx_e_4cuda_7ccudart_cudaDevAttrGPUDirectRDMAWritesOrdering = 0x76,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMemoryPoolSupportedHandleTypes = 0x77,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMax
};

/* "cuda/ccudart.pxd":643
 *     cudaDevAttrMax
 * 
 * cdef enum cudaMemPoolAttr:             # <<<<<<<<<<<<<<
 *     cudaMemPoolReuseFollowEventDependencies = 0x1
 *     cudaMemPoolReuseAllowOpportunistic = 0x2
 */
enum __pyx_t_4cuda_7ccudart_cudaMemPoolAttr {
  __pyx_e_4cuda_7ccudart_cudaMemPoolReuseFollowEventDependencies = 0x1,
  __pyx_e_4cuda_7ccudart_cudaMemPoolReuseAllowOpportunistic = 0x2,
  __pyx_e_4cuda_7ccudart_cudaMemPoolReuseAllowInternalDependencies = 0x3,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrReleaseThreshold = 0x4,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrReservedMemCurrent = 0x5,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrReservedMemHigh = 0x6,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrUsedMemCurrent = 0x7,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrUsedMemHigh = 0x8
};

/* "cuda/ccudart.pxd":653
 *     cudaMemPoolAttrUsedMemHigh = 0x8
 * 
 * cdef enum cudaMemLocationType:             # <<<<<<<<<<<<<<
 *     cudaMemLocationTypeInvalid = 0
 *     cudaMemLocationTypeDevice = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaMemLocationType {
  __pyx_e_4cuda_7ccudart_cudaMemLocationTypeInvalid = 0,
  __pyx_e_4cuda_7ccudart_cudaMemLocationTypeDevice = 1
};

/* "cuda/ccudart.pxd":661
 *     int id
 * 
 * cdef enum cudaMemAccessFlags:             # <<<<<<<<<<<<<<
 *     cudaMemAccessFlagsProtNone = 0
 *     cudaMemAccessFlagsProtRead = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaMemAccessFlags {
  __pyx_e_4cuda_7ccudart_cudaMemAccessFlagsProtNone = 0,
  __pyx_e_4cuda_7ccudart_cudaMemAccessFlagsProtRead = 1,
  __pyx_e_4cuda_7ccudart_cudaMemAccessFlagsProtReadWrite = 3
};

/* "cuda/ccudart.pxd":670
 *     cudaMemAccessFlags flags
 * 
 * cdef enum cudaMemAllocationType:             # <<<<<<<<<<<<<<
 *     cudaMemAllocationTypeInvalid = 0x0
 *     cudaMemAllocationTypePinned = 0x1
 */
enum __pyx_t_4cuda_7ccudart_cudaMemAllocationType {
  __pyx_e_4cuda_7ccudart_cudaMemAllocationTypeInvalid = 0x0,
  __pyx_e_4cuda_7ccudart_cudaMemAllocationTypePinned = 0x1,
  __pyx_e_4cuda_7ccudart_cudaMemAllocationTypeMax = 0x7FFFFFFF
};

/* "cuda/ccudart.pxd":675
 *     cudaMemAllocationTypeMax = 0x7FFFFFFF
 * 
 * cdef enum cudaMemAllocationHandleType:             # <<<<<<<<<<<<<<
 *     cudaMemHandleTypeNone = 0x0
 *     cudaMemHandleTypePosixFileDescriptor = 0x1
 */
enum __pyx_t_4cuda_7ccudart_cudaMemAllocationHandleType {
  __pyx_e_4cuda_7ccudart_cudaMemHandleTypeNone = 0x0,
  __pyx_e_4cuda_7ccudart_cudaMemHandleTypePosixFileDescriptor = 0x1,
  __pyx_e_4cuda_7ccudart_cudaMemHandleTypeWin32 = 0x2,
  __pyx_e_4cuda_7ccudart_cudaMemHandleTypeWin32Kmt = 0x4
};

/* "cuda/ccudart.pxd":698
 *     void* dptr
 * 
 * cdef enum cudaGraphMemAttributeType:             # <<<<<<<<<<<<<<
 *     cudaGraphMemAttrUsedMemCurrent = 0x1
 *     cudaGraphMemAttrUsedMemHigh = 0x2
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphMemAttributeType {
  __pyx_e_4cuda_7ccudart_cudaGraphMemAttrUsedMemCurrent = 0x1,
  __pyx_e_4cuda_7ccudart_cudaGraphMemAttrUsedMemHigh = 0x2,
  __pyx_e_4cuda_7ccudart_cudaGraphMemAttrReservedMemCurrent = 0x3,
  __pyx_e_4cuda_7ccudart_cudaGraphMemAttrReservedMemHigh = 0x4
};

/* "cuda/ccudart.pxd":704
 *     cudaGraphMemAttrReservedMemHigh = 0x4
 * 
 * cdef enum cudaDeviceP2PAttr:             # <<<<<<<<<<<<<<
 *     cudaDevP2PAttrPerformanceRank = 1
 *     cudaDevP2PAttrAccessSupported = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaDeviceP2PAttr {
  __pyx_e_4cuda_7ccudart_cudaDevP2PAttrPerformanceRank = 1,
  __pyx_e_4cuda_7ccudart_cudaDevP2PAttrAccessSupported = 2,
  __pyx_e_4cuda_7ccudart_cudaDevP2PAttrNativeAtomicSupported = 3,
  __pyx_e_4cuda_7ccudart_cudaDevP2PAttrCudaArrayAccessSupported = 4
};

/* "cuda/ccudart.pxd":809
 * ctypedef cudaIpcMemHandle_st cudaIpcMemHandle_t
 * 
 * cdef enum cudaExternalMemoryHandleType:             # <<<<<<<<<<<<<<
 *     cudaExternalMemoryHandleTypeOpaqueFd = 1
 *     cudaExternalMemoryHandleTypeOpaqueWin32 = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaExternalMemoryHandleType {
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryHandleTypeOpaqueFd = 1,
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryHandleTypeOpaqueWin32 = 2,
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3,
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryHandleTypeD3D12Heap = 4,
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryHandleTypeD3D12Resource = 5,
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryHandleTypeD3D11Resource = 6,
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7,
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryHandleTypeNvSciBuf = 8
};

/* "cuda/ccudart.pxd":846
 *     unsigned int numLevels
 * 
 * cdef enum cudaExternalSemaphoreHandleType:             # <<<<<<<<<<<<<<
 *     cudaExternalSemaphoreHandleTypeOpaqueFd = 1
 *     cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreHandleType {
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeOpaqueFd = 1,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeD3D12Fence = 4,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeD3D11Fence = 5,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeNvSciSync = 6,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeKeyedMutex = 7,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9,
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10
};

/* "cuda/ccudart.pxd":969
 * ctypedef CUmemPoolHandle_st* cudaMemPool_t
 * 
 * cdef enum cudaCGScope:             # <<<<<<<<<<<<<<
 *     cudaCGScopeInvalid = 0
 *     cudaCGScopeGrid = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaCGScope {
  __pyx_e_4cuda_7ccudart_cudaCGScopeInvalid = 0,
  __pyx_e_4cuda_7ccudart_cudaCGScopeGrid = 1,
  __pyx_e_4cuda_7ccudart_cudaCGScopeMultiGrid = 2
};

/* "cuda/ccudart.pxd":992
 *     unsigned int numExtSems
 * 
 * cdef enum cudaGraphNodeType:             # <<<<<<<<<<<<<<
 *     cudaGraphNodeTypeKernel = 0x00
 *     cudaGraphNodeTypeMemcpy = 0x01
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphNodeType {
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeKernel = 0x00,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeMemcpy = 0x01,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeMemset = 0x02,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeHost = 0x03,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeGraph = 0x04,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeEmpty = 0x05,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeWaitEvent = 0x06,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeEventRecord = 0x07,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeExtSemaphoreSignal = 0x08,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeExtSemaphoreWait = 0x09,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeMemAlloc = 0x0a,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeMemFree = 0x0b,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeCount
};

/* "cuda/ccudart.pxd":1012
 * ctypedef CUgraphExec_st* cudaGraphExec_t
 * 
 * cdef enum cudaGraphExecUpdateResult:             # <<<<<<<<<<<<<<
 *     cudaGraphExecUpdateSuccess = 0x0
 *     cudaGraphExecUpdateError = 0x1
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphExecUpdateResult {
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateSuccess = 0x0,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateError = 0x1,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorTopologyChanged = 0x2,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorNodeTypeChanged = 0x3,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorFunctionChanged = 0x4,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorParametersChanged = 0x5,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorNotSupported = 0x6,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorUnsupportedFunctionChange = 0x7
};

/* "cuda/ccudart.pxd":1022
 *     cudaGraphExecUpdateErrorUnsupportedFunctionChange = 0x7
 * 
 * cdef enum cudaGetDriverEntryPointFlags:             # <<<<<<<<<<<<<<
 *     cudaEnableDefault = 0x0
 *     cudaEnableLegacyStream = 0x1
 */
enum __pyx_t_4cuda_7ccudart_cudaGetDriverEntryPointFlags {
  __pyx_e_4cuda_7ccudart_cudaEnableDefault = 0x0,
  __pyx_e_4cuda_7ccudart_cudaEnableLegacyStream = 0x1,
  __pyx_e_4cuda_7ccudart_cudaEnablePerThreadDefaultStream = 0x2
};

/* "cuda/ccudart.pxd":1027
 *     cudaEnablePerThreadDefaultStream = 0x2
 * 
 * cdef enum cudaGraphDebugDotFlags:             # <<<<<<<<<<<<<<
 *     cudaGraphDebugDotFlagsVerbose = 1<<0
 *     cudaGraphDebugDotFlagsKernelNodeParams = 1<<2
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphDebugDotFlags {

  /* "cuda/ccudart.pxd":1037
 *     cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 1<<8
 *     cudaGraphDebugDotFlagsKernelNodeAttributes = 1<<9
 *     cudaGraphDebugDotFlagsHandles = 1<<10             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaGraphInstantiateFlags:
 */
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsVerbose = (1 << 0),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsKernelNodeParams = (1 << 2),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsMemcpyNodeParams = (1 << 3),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsMemsetNodeParams = (1 << 4),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsHostNodeParams = (1 << 5),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsEventNodeParams = (1 << 6),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsExtSemasSignalNodeParams = (1 << 7),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsExtSemasWaitNodeParams = (1 << 8),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsKernelNodeAttributes = (1 << 9),
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsHandles = (1 << 10)
};

/* "cuda/ccudart.pxd":1039
 *     cudaGraphDebugDotFlagsHandles = 1<<10
 * 
 * cdef enum cudaGraphInstantiateFlags:             # <<<<<<<<<<<<<<
 *     cudaGraphInstantiateFlagAutoFreeOnLaunch = 1
 * 
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphInstantiateFlags {
  __pyx_e_4cuda_7ccudart_cudaGraphInstantiateFlagAutoFreeOnLaunch = 1
};

/* "cuda/ccudart.pxd":1042
 *     cudaGraphInstantiateFlagAutoFreeOnLaunch = 1
 * 
 * cdef enum cudaSurfaceBoundaryMode:             # <<<<<<<<<<<<<<
 *     cudaBoundaryModeZero = 0
 *     cudaBoundaryModeClamp = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaSurfaceBoundaryMode {
  __pyx_e_4cuda_7ccudart_cudaBoundaryModeZero = 0,
  __pyx_e_4cuda_7ccudart_cudaBoundaryModeClamp = 1,
  __pyx_e_4cuda_7ccudart_cudaBoundaryModeTrap = 2
};

/* "cuda/ccudart.pxd":1047
 *     cudaBoundaryModeTrap = 2
 * 
 * cdef enum cudaSurfaceFormatMode:             # <<<<<<<<<<<<<<
 *     cudaFormatModeForced = 0
 *     cudaFormatModeAuto = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaSurfaceFormatMode {
  __pyx_e_4cuda_7ccudart_cudaFormatModeForced = 0,
  __pyx_e_4cuda_7ccudart_cudaFormatModeAuto = 1
};

/* "cuda/ccudart.pxd":1053
 * ctypedef unsigned long long cudaSurfaceObject_t
 * 
 * cdef enum cudaTextureAddressMode:             # <<<<<<<<<<<<<<
 *     cudaAddressModeWrap = 0
 *     cudaAddressModeClamp = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaTextureAddressMode {
  __pyx_e_4cuda_7ccudart_cudaAddressModeWrap = 0,
  __pyx_e_4cuda_7ccudart_cudaAddressModeClamp = 1,
  __pyx_e_4cuda_7ccudart_cudaAddressModeMirror = 2,
  __pyx_e_4cuda_7ccudart_cudaAddressModeBorder = 3
};

/* "cuda/ccudart.pxd":1059
 *     cudaAddressModeBorder = 3
 * 
 * cdef enum cudaTextureFilterMode:             # <<<<<<<<<<<<<<
 *     cudaFilterModePoint = 0
 *     cudaFilterModeLinear = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaTextureFilterMode {
  __pyx_e_4cuda_7ccudart_cudaFilterModePoint = 0,
  __pyx_e_4cuda_7ccudart_cudaFilterModeLinear = 1
};

/* "cuda/ccudart.pxd":1063
 *     cudaFilterModeLinear = 1
 * 
 * cdef enum cudaTextureReadMode:             # <<<<<<<<<<<<<<
 *     cudaReadModeElementType = 0
 *     cudaReadModeNormalizedFloat = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaTextureReadMode {
  __pyx_e_4cuda_7ccudart_cudaReadModeElementType = 0,
  __pyx_e_4cuda_7ccudart_cudaReadModeNormalizedFloat = 1
};

/* "cuda/ccudart.pxd":1083
 * ctypedef unsigned long long cudaTextureObject_t
 * 
 * cdef enum cudaDataType_t:             # <<<<<<<<<<<<<<
 *     CUDA_R_16F = 2
 *     CUDA_C_16F = 6
 */
enum __pyx_t_4cuda_7ccudart_cudaDataType_t {
  __pyx_e_4cuda_7ccudart_CUDA_R_16F = 2,
  __pyx_e_4cuda_7ccudart_CUDA_C_16F = 6,
  __pyx_e_4cuda_7ccudart_CUDA_R_16BF = 14,
  __pyx_e_4cuda_7ccudart_CUDA_C_16BF = 15,
  __pyx_e_4cuda_7ccudart_CUDA_R_32F = 0,
  __pyx_e_4cuda_7ccudart_CUDA_C_32F = 4,
  __pyx_e_4cuda_7ccudart_CUDA_R_64F = 1,
  __pyx_e_4cuda_7ccudart_CUDA_C_64F = 5,
  __pyx_e_4cuda_7ccudart_CUDA_R_4I = 16,
  __pyx_e_4cuda_7ccudart_CUDA_C_4I = 17,
  __pyx_e_4cuda_7ccudart_CUDA_R_4U = 18,
  __pyx_e_4cuda_7ccudart_CUDA_C_4U = 19,
  __pyx_e_4cuda_7ccudart_CUDA_R_8I = 3,
  __pyx_e_4cuda_7ccudart_CUDA_C_8I = 7,
  __pyx_e_4cuda_7ccudart_CUDA_R_8U = 8,
  __pyx_e_4cuda_7ccudart_CUDA_C_8U = 9,
  __pyx_e_4cuda_7ccudart_CUDA_R_16I = 20,
  __pyx_e_4cuda_7ccudart_CUDA_C_16I = 21,
  __pyx_e_4cuda_7ccudart_CUDA_R_16U = 22,
  __pyx_e_4cuda_7ccudart_CUDA_C_16U = 23,
  __pyx_e_4cuda_7ccudart_CUDA_R_32I = 10,
  __pyx_e_4cuda_7ccudart_CUDA_C_32I = 11,
  __pyx_e_4cuda_7ccudart_CUDA_R_32U = 12,
  __pyx_e_4cuda_7ccudart_CUDA_C_32U = 13,
  __pyx_e_4cuda_7ccudart_CUDA_R_64I = 24,
  __pyx_e_4cuda_7ccudart_CUDA_C_64I = 25,
  __pyx_e_4cuda_7ccudart_CUDA_R_64U = 26,
  __pyx_e_4cuda_7ccudart_CUDA_C_64U = 27
};

/* "cuda/ccudart.pxd":1115
 * ctypedef cudaDataType_t cudaDataType
 * 
 * cdef enum libraryPropertyType_t:             # <<<<<<<<<<<<<<
 *     MAJOR_VERSION
 *     MINOR_VERSION
 */
enum __pyx_t_4cuda_7ccudart_libraryPropertyType_t {
  __pyx_e_4cuda_7ccudart_MAJOR_VERSION,
  __pyx_e_4cuda_7ccudart_MINOR_VERSION,
  __pyx_e_4cuda_7ccudart_PATCH_LEVEL
};

/* "cuda/ccudart.pxd":1640
 * cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) nogil
 * 
 * cdef enum: cudaHostAllocDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostAllocPortable = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostAllocDefault = 0x00
};

/* "cuda/ccudart.pxd":1642
 * cdef enum: cudaHostAllocDefault = 0x00
 * 
 * cdef enum: cudaHostAllocPortable = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostAllocMapped = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostAllocPortable = 0x01
};

/* "cuda/ccudart.pxd":1644
 * cdef enum: cudaHostAllocPortable = 0x01
 * 
 * cdef enum: cudaHostAllocMapped = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostAllocWriteCombined = 0x04
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostAllocMapped = 0x02
};

/* "cuda/ccudart.pxd":1646
 * cdef enum: cudaHostAllocMapped = 0x02
 * 
 * cdef enum: cudaHostAllocWriteCombined = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterDefault = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostAllocWriteCombined = 0x04
};

/* "cuda/ccudart.pxd":1648
 * cdef enum: cudaHostAllocWriteCombined = 0x04
 * 
 * cdef enum: cudaHostRegisterDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterPortable = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterDefault = 0x00
};

/* "cuda/ccudart.pxd":1650
 * cdef enum: cudaHostRegisterDefault = 0x00
 * 
 * cdef enum: cudaHostRegisterPortable = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterMapped = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterPortable = 0x01
};

/* "cuda/ccudart.pxd":1652
 * cdef enum: cudaHostRegisterPortable = 0x01
 * 
 * cdef enum: cudaHostRegisterMapped = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterIoMemory = 0x04
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterMapped = 0x02
};

/* "cuda/ccudart.pxd":1654
 * cdef enum: cudaHostRegisterMapped = 0x02
 * 
 * cdef enum: cudaHostRegisterIoMemory = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterReadOnly = 0x08
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterIoMemory = 0x04
};

/* "cuda/ccudart.pxd":1656
 * cdef enum: cudaHostRegisterIoMemory = 0x04
 * 
 * cdef enum: cudaHostRegisterReadOnly = 0x08             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaPeerAccessDefault = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterReadOnly = 0x08
};

/* "cuda/ccudart.pxd":1658
 * cdef enum: cudaHostRegisterReadOnly = 0x08
 * 
 * cdef enum: cudaPeerAccessDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaStreamDefault = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaPeerAccessDefault = 0x00
};

/* "cuda/ccudart.pxd":1660
 * cdef enum: cudaPeerAccessDefault = 0x00
 * 
 * cdef enum: cudaStreamDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaStreamNonBlocking = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaStreamDefault = 0x00
};

/* "cuda/ccudart.pxd":1662
 * cdef enum: cudaStreamDefault = 0x00
 * 
 * cdef enum: cudaStreamNonBlocking = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaStreamLegacy = 0x1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaStreamNonBlocking = 0x01
};

/* "cuda/ccudart.pxd":1664
 * cdef enum: cudaStreamNonBlocking = 0x01
 * 
 * cdef enum: cudaStreamLegacy = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaStreamPerThread = 0x2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaStreamLegacy = 0x1
};

/* "cuda/ccudart.pxd":1666
 * cdef enum: cudaStreamLegacy = 0x1
 * 
 * cdef enum: cudaStreamPerThread = 0x2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventDefault = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaStreamPerThread = 0x2
};

/* "cuda/ccudart.pxd":1668
 * cdef enum: cudaStreamPerThread = 0x2
 * 
 * cdef enum: cudaEventDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventBlockingSync = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventDefault = 0x00
};

/* "cuda/ccudart.pxd":1670
 * cdef enum: cudaEventDefault = 0x00
 * 
 * cdef enum: cudaEventBlockingSync = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventDisableTiming = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventBlockingSync = 0x01
};

/* "cuda/ccudart.pxd":1672
 * cdef enum: cudaEventBlockingSync = 0x01
 * 
 * cdef enum: cudaEventDisableTiming = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventInterprocess = 0x04
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventDisableTiming = 0x02
};

/* "cuda/ccudart.pxd":1674
 * cdef enum: cudaEventDisableTiming = 0x02
 * 
 * cdef enum: cudaEventInterprocess = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventRecordDefault = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventInterprocess = 0x04
};

/* "cuda/ccudart.pxd":1676
 * cdef enum: cudaEventInterprocess = 0x04
 * 
 * cdef enum: cudaEventRecordDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventRecordExternal = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventRecordDefault = 0x00
};

/* "cuda/ccudart.pxd":1678
 * cdef enum: cudaEventRecordDefault = 0x00
 * 
 * cdef enum: cudaEventRecordExternal = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventWaitDefault = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventRecordExternal = 0x01
};

/* "cuda/ccudart.pxd":1680
 * cdef enum: cudaEventRecordExternal = 0x01
 * 
 * cdef enum: cudaEventWaitDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventWaitExternal = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventWaitDefault = 0x00
};

/* "cuda/ccudart.pxd":1682
 * cdef enum: cudaEventWaitDefault = 0x00
 * 
 * cdef enum: cudaEventWaitExternal = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceScheduleAuto = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventWaitExternal = 0x01
};

/* "cuda/ccudart.pxd":1684
 * cdef enum: cudaEventWaitExternal = 0x01
 * 
 * cdef enum: cudaDeviceScheduleAuto = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceScheduleSpin = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleAuto = 0x00
};

/* "cuda/ccudart.pxd":1686
 * cdef enum: cudaDeviceScheduleAuto = 0x00
 * 
 * cdef enum: cudaDeviceScheduleSpin = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceScheduleYield = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleSpin = 0x01
};

/* "cuda/ccudart.pxd":1688
 * cdef enum: cudaDeviceScheduleSpin = 0x01
 * 
 * cdef enum: cudaDeviceScheduleYield = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceScheduleBlockingSync = 0x04
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleYield = 0x02
};

/* "cuda/ccudart.pxd":1690
 * cdef enum: cudaDeviceScheduleYield = 0x02
 * 
 * cdef enum: cudaDeviceScheduleBlockingSync = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceBlockingSync = 0x04
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleBlockingSync = 0x04
};

/* "cuda/ccudart.pxd":1692
 * cdef enum: cudaDeviceScheduleBlockingSync = 0x04
 * 
 * cdef enum: cudaDeviceBlockingSync = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceScheduleMask = 0x07
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceBlockingSync = 0x04
};

/* "cuda/ccudart.pxd":1694
 * cdef enum: cudaDeviceBlockingSync = 0x04
 * 
 * cdef enum: cudaDeviceScheduleMask = 0x07             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceMapHost = 0x08
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleMask = 0x07
};

/* "cuda/ccudart.pxd":1696
 * cdef enum: cudaDeviceScheduleMask = 0x07
 * 
 * cdef enum: cudaDeviceMapHost = 0x08             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceLmemResizeToMax = 0x10
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceMapHost = 0x08
};

/* "cuda/ccudart.pxd":1698
 * cdef enum: cudaDeviceMapHost = 0x08
 * 
 * cdef enum: cudaDeviceLmemResizeToMax = 0x10             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceMask = 0x1f
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceLmemResizeToMax = 0x10
};

/* "cuda/ccudart.pxd":1700
 * cdef enum: cudaDeviceLmemResizeToMax = 0x10
 * 
 * cdef enum: cudaDeviceMask = 0x1f             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayDefault = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceMask = 0x1f
};

/* "cuda/ccudart.pxd":1702
 * cdef enum: cudaDeviceMask = 0x1f
 * 
 * cdef enum: cudaArrayDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayLayered = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayDefault = 0x00
};

/* "cuda/ccudart.pxd":1704
 * cdef enum: cudaArrayDefault = 0x00
 * 
 * cdef enum: cudaArrayLayered = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArraySurfaceLoadStore = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayLayered = 0x01
};

/* "cuda/ccudart.pxd":1706
 * cdef enum: cudaArrayLayered = 0x01
 * 
 * cdef enum: cudaArraySurfaceLoadStore = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayCubemap = 0x04
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArraySurfaceLoadStore = 0x02
};

/* "cuda/ccudart.pxd":1708
 * cdef enum: cudaArraySurfaceLoadStore = 0x02
 * 
 * cdef enum: cudaArrayCubemap = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayTextureGather = 0x08
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayCubemap = 0x04
};

/* "cuda/ccudart.pxd":1710
 * cdef enum: cudaArrayCubemap = 0x04
 * 
 * cdef enum: cudaArrayTextureGather = 0x08             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayColorAttachment = 0x20
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayTextureGather = 0x08
};

/* "cuda/ccudart.pxd":1712
 * cdef enum: cudaArrayTextureGather = 0x08
 * 
 * cdef enum: cudaArrayColorAttachment = 0x20             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArraySparse = 0x40
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayColorAttachment = 0x20
};

/* "cuda/ccudart.pxd":1714
 * cdef enum: cudaArrayColorAttachment = 0x20
 * 
 * cdef enum: cudaArraySparse = 0x40             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaIpcMemLazyEnablePeerAccess = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArraySparse = 0x40
};

/* "cuda/ccudart.pxd":1716
 * cdef enum: cudaArraySparse = 0x40
 * 
 * cdef enum: cudaIpcMemLazyEnablePeerAccess = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaMemAttachGlobal = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaIpcMemLazyEnablePeerAccess = 0x01
};

/* "cuda/ccudart.pxd":1718
 * cdef enum: cudaIpcMemLazyEnablePeerAccess = 0x01
 * 
 * cdef enum: cudaMemAttachGlobal = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaMemAttachHost = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaMemAttachGlobal = 0x01
};

/* "cuda/ccudart.pxd":1720
 * cdef enum: cudaMemAttachGlobal = 0x01
 * 
 * cdef enum: cudaMemAttachHost = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaMemAttachSingle = 0x04
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaMemAttachHost = 0x02
};

/* "cuda/ccudart.pxd":1722
 * cdef enum: cudaMemAttachHost = 0x02
 * 
 * cdef enum: cudaMemAttachSingle = 0x04             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaOccupancyDefault = 0x00
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaMemAttachSingle = 0x04
};

/* "cuda/ccudart.pxd":1724
 * cdef enum: cudaMemAttachSingle = 0x04
 * 
 * cdef enum: cudaOccupancyDefault = 0x00             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaOccupancyDisableCachingOverride = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaOccupancyDefault = 0x00
};

/* "cuda/ccudart.pxd":1726
 * cdef enum: cudaOccupancyDefault = 0x00
 * 
 * cdef enum: cudaOccupancyDisableCachingOverride = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaCpuDeviceId = -1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaOccupancyDisableCachingOverride = 0x01
};

/* "cuda/ccudart.pxd":1728
 * cdef enum: cudaOccupancyDisableCachingOverride = 0x01
 * 
 * cdef enum: cudaCpuDeviceId = -1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaInvalidDeviceId = -2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaCpuDeviceId = -1L
};

/* "cuda/ccudart.pxd":1730
 * cdef enum: cudaCpuDeviceId = -1
 * 
 * cdef enum: cudaInvalidDeviceId = -2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaInvalidDeviceId = -2L
};

/* "cuda/ccudart.pxd":1732
 * cdef enum: cudaInvalidDeviceId = -2
 * 
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaCooperativeLaunchMultiDeviceNoPreSync = 0x01
};

/* "cuda/ccudart.pxd":1734
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 0x01
 * 
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArraySparsePropertiesSingleMipTail = 0x1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaCooperativeLaunchMultiDeviceNoPostSync = 0x02
};

/* "cuda/ccudart.pxd":1736
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 0x02
 * 
 * cdef enum: cudaArraySparsePropertiesSingleMipTail = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArraySparsePropertiesSingleMipTail = 0x1
};

/* "cuda/ccudart.pxd":1738
 * cdef enum: cudaArraySparsePropertiesSingleMipTail = 0x1
 * 
 * cdef enum: CUDA_IPC_HANDLE_SIZE = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaExternalMemoryDedicated = 0x1
 */
enum  {
  __pyx_e_4cuda_7ccudart_CUDA_IPC_HANDLE_SIZE = 64
};

/* "cuda/ccudart.pxd":1740
 * cdef enum: CUDA_IPC_HANDLE_SIZE = 64
 * 
 * cdef enum: cudaExternalMemoryDedicated = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryDedicated = 0x1
};

/* "cuda/ccudart.pxd":1742
 * cdef enum: cudaExternalMemoryDedicated = 0x1
 * 
 * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 0x01
};

/* "cuda/ccudart.pxd":1744
 * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 0x01
 * 
 * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaNvSciSyncAttrSignal = 0x1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 0x02
};

/* "cuda/ccudart.pxd":1746
 * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 0x02
 * 
 * cdef enum: cudaNvSciSyncAttrSignal = 0x1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaNvSciSyncAttrWait = 0x2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaNvSciSyncAttrSignal = 0x1
};

/* "cuda/ccudart.pxd":1748
 * cdef enum: cudaNvSciSyncAttrSignal = 0x1
 * 
 * cdef enum: cudaNvSciSyncAttrWait = 0x2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType1D = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaNvSciSyncAttrWait = 0x2
};

/* "cuda/ccudart.pxd":1750
 * cdef enum: cudaNvSciSyncAttrWait = 0x2
 * 
 * cdef enum: cudaSurfaceType1D = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType2D = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType1D = 0x01
};

/* "cuda/ccudart.pxd":1752
 * cdef enum: cudaSurfaceType1D = 0x01
 * 
 * cdef enum: cudaSurfaceType2D = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType3D = 0x03
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType2D = 0x02
};

/* "cuda/ccudart.pxd":1754
 * cdef enum: cudaSurfaceType2D = 0x02
 * 
 * cdef enum: cudaSurfaceType3D = 0x03             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceTypeCubemap = 0x0C
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType3D = 0x03
};

/* "cuda/ccudart.pxd":1756
 * cdef enum: cudaSurfaceType3D = 0x03
 * 
 * cdef enum: cudaSurfaceTypeCubemap = 0x0C             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType1DLayered = 0xF1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceTypeCubemap = 0x0C
};

/* "cuda/ccudart.pxd":1758
 * cdef enum: cudaSurfaceTypeCubemap = 0x0C
 * 
 * cdef enum: cudaSurfaceType1DLayered = 0xF1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType2DLayered = 0xF2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType1DLayered = 0xF1
};

/* "cuda/ccudart.pxd":1760
 * cdef enum: cudaSurfaceType1DLayered = 0xF1
 * 
 * cdef enum: cudaSurfaceType2DLayered = 0xF2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceTypeCubemapLayered = 0xFC
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType2DLayered = 0xF2
};

/* "cuda/ccudart.pxd":1762
 * cdef enum: cudaSurfaceType2DLayered = 0xF2
 * 
 * cdef enum: cudaSurfaceTypeCubemapLayered = 0xFC             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType1D = 0x01
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceTypeCubemapLayered = 0xFC
};

/* "cuda/ccudart.pxd":1764
 * cdef enum: cudaSurfaceTypeCubemapLayered = 0xFC
 * 
 * cdef enum: cudaTextureType1D = 0x01             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType2D = 0x02
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType1D = 0x01
};

/* "cuda/ccudart.pxd":1766
 * cdef enum: cudaTextureType1D = 0x01
 * 
 * cdef enum: cudaTextureType2D = 0x02             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType3D = 0x03
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType2D = 0x02
};

/* "cuda/ccudart.pxd":1768
 * cdef enum: cudaTextureType2D = 0x02
 * 
 * cdef enum: cudaTextureType3D = 0x03             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureTypeCubemap = 0x0C
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType3D = 0x03
};

/* "cuda/ccudart.pxd":1770
 * cdef enum: cudaTextureType3D = 0x03
 * 
 * cdef enum: cudaTextureTypeCubemap = 0x0C             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType1DLayered = 0xF1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureTypeCubemap = 0x0C
};

/* "cuda/ccudart.pxd":1772
 * cdef enum: cudaTextureTypeCubemap = 0x0C
 * 
 * cdef enum: cudaTextureType1DLayered = 0xF1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType2DLayered = 0xF2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType1DLayered = 0xF1
};

/* "cuda/ccudart.pxd":1774
 * cdef enum: cudaTextureType1DLayered = 0xF1
 * 
 * cdef enum: cudaTextureType2DLayered = 0xF2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureTypeCubemapLayered = 0xFC
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType2DLayered = 0xF2
};

/* "cuda/ccudart.pxd":1776
 * cdef enum: cudaTextureType2DLayered = 0xF2
 * 
 * cdef enum: cudaTextureTypeCubemapLayered = 0xFC             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDART_VERSION = 11050
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureTypeCubemapLayered = 0xFC
};

/* "cuda/ccudart.pxd":1778
 * cdef enum: cudaTextureTypeCubemapLayered = 0xFC
 * 
 * cdef enum: CUDART_VERSION = 11050             # <<<<<<<<<<<<<<
 */
enum  {
  __pyx_e_4cuda_7ccudart_CUDART_VERSION = 0x2B2A
};

/* "cuda/ccudart.pxd":15
 *     cudaRoundMinInf
 * 
 * cdef struct dim3:             # <<<<<<<<<<<<<<
 *     unsigned int x
 *     unsigned int y
 */
struct __pyx_t_4cuda_7ccudart_dim3 {
  unsigned int x;
  unsigned int y;
  unsigned int z;
};

/* "cuda/ccudart.pxd":178
 *     cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30
 * 
 * cdef struct cudaChannelFormatDesc:             # <<<<<<<<<<<<<<
 *     int x
 *     int y
 */
struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc {
  int x;
  int y;
  int z;
  int w;
  enum __pyx_t_4cuda_7ccudart_cudaChannelFormatKind f;
};

/* "cuda/ccudart.pxd":188
 *     cdef struct cudaArray:
 *         pass
 * ctypedef cudaArray* cudaArray_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct cudaArray *__pyx_t_4cuda_7ccudart_cudaArray_t;

/* "cuda/ccudart.pxd":193
 *     cdef struct cudaArray:
 *         pass
 * ctypedef cudaArray* cudaArray_const_t             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef struct cudaArray *__pyx_t_4cuda_7ccudart_cudaArray_const_t;

/* "cuda/ccudart.pxd":199
 *     cdef struct cudaMipmappedArray:
 *         pass
 * ctypedef cudaMipmappedArray* cudaMipmappedArray_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct cudaMipmappedArray *__pyx_t_4cuda_7ccudart_cudaMipmappedArray_t;

/* "cuda/ccudart.pxd":204
 *     cdef struct cudaMipmappedArray:
 *         pass
 * ctypedef cudaMipmappedArray* cudaMipmappedArray_const_t             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef struct cudaMipmappedArray *__pyx_t_4cuda_7ccudart_cudaMipmappedArray_const_t;

/* "cuda/ccudart.pxd":207
 * 
 * 
 * cdef struct _cudaArraySparseProperties_tileExtent_s:             # <<<<<<<<<<<<<<
 *     unsigned int width
 *     unsigned int height
 */
struct __pyx_t_4cuda_7ccudart__cudaArraySparseProperties_tileExtent_s {
  unsigned int width;
  unsigned int height;
  unsigned int depth;
};

/* "cuda/ccudart.pxd":212
 *     unsigned int depth
 * 
 * cdef struct cudaArraySparseProperties:             # <<<<<<<<<<<<<<
 *     _cudaArraySparseProperties_tileExtent_s tileExtent
 *     unsigned int miptailFirstLevel
 */
struct __pyx_t_4cuda_7ccudart_cudaArraySparseProperties {
  struct __pyx_t_4cuda_7ccudart__cudaArraySparseProperties_tileExtent_s tileExtent;
  unsigned int miptailFirstLevel;
  unsigned PY_LONG_LONG miptailSize;
  unsigned int flags;
  unsigned int reserved[4];
};

/* "cuda/ccudart.pxd":232
 *     cudaMemcpyDefault = 4
 * 
 * cdef struct cudaPitchedPtr:             # <<<<<<<<<<<<<<
 *     void* ptr
 *     size_t pitch
 */
struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr {
  void *ptr;
  size_t pitch;
  size_t xsize;
  size_t ysize;
};

/* "cuda/ccudart.pxd":238
 *     size_t ysize
 * 
 * cdef struct cudaExtent:             # <<<<<<<<<<<<<<
 *     size_t width
 *     size_t height
 */
struct __pyx_t_4cuda_7ccudart_cudaExtent {
  size_t width;
  size_t height;
  size_t depth;
};

/* "cuda/ccudart.pxd":243
 *     size_t depth
 * 
 * cdef struct cudaPos:             # <<<<<<<<<<<<<<
 *     size_t x
 *     size_t y
 */
struct __pyx_t_4cuda_7ccudart_cudaPos {
  size_t x;
  size_t y;
  size_t z;
};

/* "cuda/ccudart.pxd":248
 *     size_t z
 * 
 * cdef struct cudaMemcpy3DParms:             # <<<<<<<<<<<<<<
 *     cudaArray_t srcArray
 *     cudaPos srcPos
 */
struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms {
  __pyx_t_4cuda_7ccudart_cudaArray_t srcArray;
  struct __pyx_t_4cuda_7ccudart_cudaPos srcPos;
  struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr srcPtr;
  __pyx_t_4cuda_7ccudart_cudaArray_t dstArray;
  struct __pyx_t_4cuda_7ccudart_cudaPos dstPos;
  struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr dstPtr;
  struct __pyx_t_4cuda_7ccudart_cudaExtent extent;
  enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind kind;
};

/* "cuda/ccudart.pxd":258
 *     cudaMemcpyKind kind
 * 
 * cdef struct cudaMemcpy3DPeerParms:             # <<<<<<<<<<<<<<
 *     cudaArray_t srcArray
 *     cudaPos srcPos
 */
struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DPeerParms {
  __pyx_t_4cuda_7ccudart_cudaArray_t srcArray;
  struct __pyx_t_4cuda_7ccudart_cudaPos srcPos;
  struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr srcPtr;
  int srcDevice;
  __pyx_t_4cuda_7ccudart_cudaArray_t dstArray;
  struct __pyx_t_4cuda_7ccudart_cudaPos dstPos;
  struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr dstPtr;
  int dstDevice;
  struct __pyx_t_4cuda_7ccudart_cudaExtent extent;
};

/* "cuda/ccudart.pxd":269
 *     cudaExtent extent
 * 
 * cdef struct cudaMemsetParams:             # <<<<<<<<<<<<<<
 *     void* dst
 *     size_t pitch
 */
struct __pyx_t_4cuda_7ccudart_cudaMemsetParams {
  void *dst;
  size_t pitch;
  unsigned int value;
  unsigned int elementSize;
  size_t width;
  size_t height;
};

/* "cuda/ccudart.pxd":282
 *     cudaAccessPropertyPersisting = 2
 * 
 * cdef struct cudaAccessPolicyWindow:             # <<<<<<<<<<<<<<
 *     void* base_ptr
 *     size_t num_bytes
 */
struct __pyx_t_4cuda_7ccudart_cudaAccessPolicyWindow {
  void *base_ptr;
  size_t num_bytes;
  float hitRatio;
  enum __pyx_t_4cuda_7ccudart_cudaAccessProperty hitProp;
  enum __pyx_t_4cuda_7ccudart_cudaAccessProperty missProp;
};

/* "cuda/ccudart.pxd":289
 *     cudaAccessProperty missProp
 * 
 * ctypedef void (*cudaHostFn_t)(void* userData)             # <<<<<<<<<<<<<<
 * 
 * cdef struct cudaHostNodeParams:
 */
typedef void (*__pyx_t_4cuda_7ccudart_cudaHostFn_t)(void *);

/* "cuda/ccudart.pxd":291
 * ctypedef void (*cudaHostFn_t)(void* userData)
 * 
 * cdef struct cudaHostNodeParams:             # <<<<<<<<<<<<<<
 *     cudaHostFn_t fn
 *     void* userData
 */
struct __pyx_t_4cuda_7ccudart_cudaHostNodeParams {
  __pyx_t_4cuda_7ccudart_cudaHostFn_t fn;
  void *userData;
};

/* "cuda/ccudart.pxd":315
 *     cudaStreamAttributeSynchronizationPolicy = 3
 * 
 * cdef union cudaStreamAttrValue:             # <<<<<<<<<<<<<<
 *     cudaAccessPolicyWindow accessPolicyWindow
 *     cudaSynchronizationPolicy syncPolicy
 */
union __pyx_t_4cuda_7ccudart_cudaStreamAttrValue {
  struct __pyx_t_4cuda_7ccudart_cudaAccessPolicyWindow accessPolicyWindow;
  enum __pyx_t_4cuda_7ccudart_cudaSynchronizationPolicy syncPolicy;
};

/* "cuda/ccudart.pxd":354
 *     cudaKernelNodeAttributeCooperative = 2
 * 
 * cdef union cudaKernelNodeAttrValue:             # <<<<<<<<<<<<<<
 *     cudaAccessPolicyWindow accessPolicyWindow
 *     int cooperative
 */
union __pyx_t_4cuda_7ccudart_cudaKernelNodeAttrValue {
  struct __pyx_t_4cuda_7ccudart_cudaAccessPolicyWindow accessPolicyWindow;
  int cooperative;
};

/* "cuda/ccudart.pxd":401
 *     cudaResViewFormatUnsignedBlockCompressed7 = 0x22
 * 
 * cdef struct _cudaResourceDesc_res_res_array_s:             # <<<<<<<<<<<<<<
 *     cudaArray_t array
 * 
 */
struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_array_s {
  __pyx_t_4cuda_7ccudart_cudaArray_t array;
};

/* "cuda/ccudart.pxd":404
 *     cudaArray_t array
 * 
 * cdef struct _cudaResourceDesc_res_res_mipmap_s:             # <<<<<<<<<<<<<<
 *     cudaMipmappedArray_t mipmap
 * 
 */
struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_mipmap_s {
  __pyx_t_4cuda_7ccudart_cudaMipmappedArray_t mipmap;
};

/* "cuda/ccudart.pxd":407
 *     cudaMipmappedArray_t mipmap
 * 
 * cdef struct _cudaResourceDesc_res_res_linear_s:             # <<<<<<<<<<<<<<
 *     void* devPtr
 *     cudaChannelFormatDesc desc
 */
struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_linear_s {
  void *devPtr;
  struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc desc;
  size_t sizeInBytes;
};

/* "cuda/ccudart.pxd":412
 *     size_t sizeInBytes
 * 
 * cdef struct _cudaResourceDesc_res_res_pitch2D_s:             # <<<<<<<<<<<<<<
 *     void* devPtr
 *     cudaChannelFormatDesc desc
 */
struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_pitch2D_s {
  void *devPtr;
  struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc desc;
  size_t width;
  size_t height;
  size_t pitchInBytes;
};

/* "cuda/ccudart.pxd":419
 *     size_t pitchInBytes
 * 
 * cdef union _cudaResourceDesc_res_u:             # <<<<<<<<<<<<<<
 *     _cudaResourceDesc_res_res_array_s array
 *     _cudaResourceDesc_res_res_mipmap_s mipmap
 */
union __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_u {
  struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_array_s array;
  struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_mipmap_s mipmap;
  struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_linear_s linear;
  struct __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_res_pitch2D_s pitch2D;
};

/* "cuda/ccudart.pxd":425
 *     _cudaResourceDesc_res_res_pitch2D_s pitch2D
 * 
 * cdef struct cudaResourceDesc:             # <<<<<<<<<<<<<<
 *     cudaResourceType resType
 *     _cudaResourceDesc_res_u res
 */
struct __pyx_t_4cuda_7ccudart_cudaResourceDesc {
  enum __pyx_t_4cuda_7ccudart_cudaResourceType resType;
  union __pyx_t_4cuda_7ccudart__cudaResourceDesc_res_u res;
};

/* "cuda/ccudart.pxd":429
 *     _cudaResourceDesc_res_u res
 * 
 * cdef struct cudaResourceViewDesc:             # <<<<<<<<<<<<<<
 *     cudaResourceViewFormat format
 *     size_t width
 */
struct __pyx_t_4cuda_7ccudart_cudaResourceViewDesc {
  enum __pyx_t_4cuda_7ccudart_cudaResourceViewFormat format;
  size_t width;
  size_t height;
  size_t depth;
  unsigned int firstMipmapLevel;
  unsigned int lastMipmapLevel;
  unsigned int firstLayer;
  unsigned int lastLayer;
};

/* "cuda/ccudart.pxd":439
 *     unsigned int lastLayer
 * 
 * cdef struct cudaPointerAttributes:             # <<<<<<<<<<<<<<
 *     cudaMemoryType type
 *     int device
 */
struct __pyx_t_4cuda_7ccudart_cudaPointerAttributes {
  enum __pyx_t_4cuda_7ccudart_cudaMemoryType type;
  int device;
  void *devicePointer;
  void *hostPointer;
};

/* "cuda/ccudart.pxd":445
 *     void* hostPointer
 * 
 * cdef struct cudaFuncAttributes:             # <<<<<<<<<<<<<<
 *     size_t sharedSizeBytes
 *     size_t constSizeBytes
 */
struct __pyx_t_4cuda_7ccudart_cudaFuncAttributes {
  size_t sharedSizeBytes;
  size_t constSizeBytes;
  size_t localSizeBytes;
  int maxThreadsPerBlock;
  int numRegs;
  int ptxVersion;
  int binaryVersion;
  int cacheModeCA;
  int maxDynamicSharedSizeBytes;
  int preferredShmemCarveout;
};

/* "cuda/ccudart.pxd":657
 *     cudaMemLocationTypeDevice = 1
 * 
 * cdef struct cudaMemLocation:             # <<<<<<<<<<<<<<
 *     cudaMemLocationType type
 *     int id
 */
struct __pyx_t_4cuda_7ccudart_cudaMemLocation {
  enum __pyx_t_4cuda_7ccudart_cudaMemLocationType type;
  int id;
};

/* "cuda/ccudart.pxd":666
 *     cudaMemAccessFlagsProtReadWrite = 3
 * 
 * cdef struct cudaMemAccessDesc:             # <<<<<<<<<<<<<<
 *     cudaMemLocation location
 *     cudaMemAccessFlags flags
 */
struct __pyx_t_4cuda_7ccudart_cudaMemAccessDesc {
  struct __pyx_t_4cuda_7ccudart_cudaMemLocation location;
  enum __pyx_t_4cuda_7ccudart_cudaMemAccessFlags flags;
};

/* "cuda/ccudart.pxd":681
 *     cudaMemHandleTypeWin32Kmt = 0x4
 * 
 * cdef struct cudaMemPoolProps:             # <<<<<<<<<<<<<<
 *     cudaMemAllocationType allocType
 *     cudaMemAllocationHandleType handleTypes
 */
struct __pyx_t_4cuda_7ccudart_cudaMemPoolProps {
  enum __pyx_t_4cuda_7ccudart_cudaMemAllocationType allocType;
  enum __pyx_t_4cuda_7ccudart_cudaMemAllocationHandleType handleTypes;
  struct __pyx_t_4cuda_7ccudart_cudaMemLocation location;
  void *win32SecurityAttributes;
  unsigned char reserved[64];
};

/* "cuda/ccudart.pxd":688
 *     unsigned char reserved[64]
 * 
 * cdef struct cudaMemPoolPtrExportData:             # <<<<<<<<<<<<<<
 *     unsigned char reserved[64]
 * 
 */
struct __pyx_t_4cuda_7ccudart_cudaMemPoolPtrExportData {
  unsigned char reserved[64];
};

/* "cuda/ccudart.pxd":691
 *     unsigned char reserved[64]
 * 
 * cdef struct cudaMemAllocNodeParams:             # <<<<<<<<<<<<<<
 *     cudaMemPoolProps poolProps
 *     const cudaMemAccessDesc* accessDescs
 */
struct __pyx_t_4cuda_7ccudart_cudaMemAllocNodeParams {
  struct __pyx_t_4cuda_7ccudart_cudaMemPoolProps poolProps;
  struct __pyx_t_4cuda_7ccudart_cudaMemAccessDesc const *accessDescs;
  size_t accessDescCount;
  size_t bytesize;
  void *dptr;
};

/* "cuda/ccudart.pxd":710
 *     cudaDevP2PAttrCudaArrayAccessSupported = 4
 * 
 * cdef struct CUuuid_st:             # <<<<<<<<<<<<<<
 *     char bytes[16]
 * 
 */
struct __pyx_t_4cuda_7ccudart_CUuuid_st {
  char bytes[16];
};

/* "cuda/ccudart.pxd":713
 *     char bytes[16]
 * 
 * ctypedef CUuuid_st CUuuid             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUuuid_st cudaUUID_t
 */
typedef struct __pyx_t_4cuda_7ccudart_CUuuid_st __pyx_t_4cuda_7ccudart_CUuuid;

/* "cuda/ccudart.pxd":715
 * ctypedef CUuuid_st CUuuid
 * 
 * ctypedef CUuuid_st cudaUUID_t             # <<<<<<<<<<<<<<
 * 
 * cdef struct cudaDeviceProp:
 */
typedef struct __pyx_t_4cuda_7ccudart_CUuuid_st __pyx_t_4cuda_7ccudart_cudaUUID_t;

/* "cuda/ccudart.pxd":717
 * ctypedef CUuuid_st cudaUUID_t
 * 
 * cdef struct cudaDeviceProp:             # <<<<<<<<<<<<<<
 *     char name[256]
 *     cudaUUID_t uuid
 */
struct __pyx_t_4cuda_7ccudart_cudaDeviceProp {
  char name[0x100];
  __pyx_t_4cuda_7ccudart_cudaUUID_t uuid;
  char luid[8];
  unsigned int luidDeviceNodeMask;
  size_t totalGlobalMem;
  size_t sharedMemPerBlock;
  int regsPerBlock;
  int warpSize;
  size_t memPitch;
  int maxThreadsPerBlock;
  int maxThreadsDim[3];
  int maxGridSize[3];
  int clockRate;
  size_t totalConstMem;
  int major;
  int minor;
  size_t textureAlignment;
  size_t texturePitchAlignment;
  int deviceOverlap;
  int multiProcessorCount;
  int kernelExecTimeoutEnabled;
  int integrated;
  int canMapHostMemory;
  int computeMode;
  int maxTexture1D;
  int maxTexture1DMipmap;
  int maxTexture1DLinear;
  int maxTexture2D[2];
  int maxTexture2DMipmap[2];
  int maxTexture2DLinear[3];
  int maxTexture2DGather[2];
  int maxTexture3D[3];
  int maxTexture3DAlt[3];
  int maxTextureCubemap;
  int maxTexture1DLayered[2];
  int maxTexture2DLayered[3];
  int maxTextureCubemapLayered[2];
  int maxSurface1D;
  int maxSurface2D[2];
  int maxSurface3D[3];
  int maxSurface1DLayered[2];
  int maxSurface2DLayered[3];
  int maxSurfaceCubemap;
  int maxSurfaceCubemapLayered[2];
  size_t surfaceAlignment;
  int concurrentKernels;
  int ECCEnabled;
  int pciBusID;
  int pciDeviceID;
  int pciDomainID;
  int tccDriver;
  int asyncEngineCount;
  int unifiedAddressing;
  int memoryClockRate;
  int memoryBusWidth;
  int l2CacheSize;
  int persistingL2CacheMaxSize;
  int maxThreadsPerMultiProcessor;
  int streamPrioritiesSupported;
  int globalL1CacheSupported;
  int localL1CacheSupported;
  size_t sharedMemPerMultiprocessor;
  int regsPerMultiprocessor;
  int managedMemory;
  int isMultiGpuBoard;
  int multiGpuBoardGroupID;
  int hostNativeAtomicSupported;
  int singleToDoublePrecisionPerfRatio;
  int pageableMemoryAccess;
  int concurrentManagedAccess;
  int computePreemptionSupported;
  int canUseHostPointerForRegisteredMem;
  int cooperativeLaunch;
  int cooperativeMultiDeviceLaunch;
  size_t sharedMemPerBlockOptin;
  int pageableMemoryAccessUsesHostPageTables;
  int directManagedMemAccessFromHost;
  int maxBlocksPerMultiProcessor;
  int accessPolicyMaxWindowSize;
  size_t reservedSharedMemPerBlock;
};

/* "cuda/ccudart.pxd":799
 *     size_t reservedSharedMemPerBlock
 * 
 * cdef struct cudaIpcEventHandle_st:             # <<<<<<<<<<<<<<
 *     char reserved[64]
 * 
 */
struct __pyx_t_4cuda_7ccudart_cudaIpcEventHandle_st {
  char reserved[64];
};

/* "cuda/ccudart.pxd":802
 *     char reserved[64]
 * 
 * ctypedef cudaIpcEventHandle_st cudaIpcEventHandle_t             # <<<<<<<<<<<<<<
 * 
 * cdef struct cudaIpcMemHandle_st:
 */
typedef struct __pyx_t_4cuda_7ccudart_cudaIpcEventHandle_st __pyx_t_4cuda_7ccudart_cudaIpcEventHandle_t;

/* "cuda/ccudart.pxd":804
 * ctypedef cudaIpcEventHandle_st cudaIpcEventHandle_t
 * 
 * cdef struct cudaIpcMemHandle_st:             # <<<<<<<<<<<<<<
 *     char reserved[64]
 * 
 */
struct __pyx_t_4cuda_7ccudart_cudaIpcMemHandle_st {
  char reserved[64];
};

/* "cuda/ccudart.pxd":807
 *     char reserved[64]
 * 
 * ctypedef cudaIpcMemHandle_st cudaIpcMemHandle_t             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaExternalMemoryHandleType:
 */
typedef struct __pyx_t_4cuda_7ccudart_cudaIpcMemHandle_st __pyx_t_4cuda_7ccudart_cudaIpcMemHandle_t;

/* "cuda/ccudart.pxd":819
 *     cudaExternalMemoryHandleTypeNvSciBuf = 8
 * 
 * cdef struct _cudaExternalMemoryHandleDesc_handle_handle_win32_s:             # <<<<<<<<<<<<<<
 *     void* handle
 *     void* name
 */
struct __pyx_t_4cuda_7ccudart__cudaExternalMemoryHandleDesc_handle_handle_win32_s {
  void *handle;
  void *name;
};

/* "cuda/ccudart.pxd":823
 *     void* name
 * 
 * cdef union _cudaExternalMemoryHandleDesc_handle_u:             # <<<<<<<<<<<<<<
 *     int fd
 *     _cudaExternalMemoryHandleDesc_handle_handle_win32_s win32
 */
union __pyx_t_4cuda_7ccudart__cudaExternalMemoryHandleDesc_handle_u {
  int fd;
  struct __pyx_t_4cuda_7ccudart__cudaExternalMemoryHandleDesc_handle_handle_win32_s win32;
  void *nvSciBufObject;
};

/* "cuda/ccudart.pxd":828
 *     void* nvSciBufObject
 * 
 * cdef struct cudaExternalMemoryHandleDesc:             # <<<<<<<<<<<<<<
 *     cudaExternalMemoryHandleType type
 *     _cudaExternalMemoryHandleDesc_handle_u handle
 */
struct __pyx_t_4cuda_7ccudart_cudaExternalMemoryHandleDesc {
  enum __pyx_t_4cuda_7ccudart_cudaExternalMemoryHandleType type;
  union __pyx_t_4cuda_7ccudart__cudaExternalMemoryHandleDesc_handle_u handle;
  unsigned PY_LONG_LONG size;
  unsigned int flags;
};

/* "cuda/ccudart.pxd":834
 *     unsigned int flags
 * 
 * cdef struct cudaExternalMemoryBufferDesc:             # <<<<<<<<<<<<<<
 *     unsigned long long offset
 *     unsigned long long size
 */
struct __pyx_t_4cuda_7ccudart_cudaExternalMemoryBufferDesc {
  unsigned PY_LONG_LONG offset;
  unsigned PY_LONG_LONG size;
  unsigned int flags;
};

/* "cuda/ccudart.pxd":839
 *     unsigned int flags
 * 
 * cdef struct cudaExternalMemoryMipmappedArrayDesc:             # <<<<<<<<<<<<<<
 *     unsigned long long offset
 *     cudaChannelFormatDesc formatDesc
 */
struct __pyx_t_4cuda_7ccudart_cudaExternalMemoryMipmappedArrayDesc {
  unsigned PY_LONG_LONG offset;
  struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc formatDesc;
  struct __pyx_t_4cuda_7ccudart_cudaExtent extent;
  unsigned int flags;
  unsigned int numLevels;
};

/* "cuda/ccudart.pxd":858
 *     cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10
 * 
 * cdef struct _cudaExternalSemaphoreHandleDesc_handle_handle_win32_s:             # <<<<<<<<<<<<<<
 *     void* handle
 *     void* name
 */
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreHandleDesc_handle_handle_win32_s {
  void *handle;
  void *name;
};

/* "cuda/ccudart.pxd":862
 *     void* name
 * 
 * cdef union _cudaExternalSemaphoreHandleDesc_handle_u:             # <<<<<<<<<<<<<<
 *     int fd
 *     _cudaExternalSemaphoreHandleDesc_handle_handle_win32_s win32
 */
union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreHandleDesc_handle_u {
  int fd;
  struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreHandleDesc_handle_handle_win32_s win32;
  void *nvSciSyncObj;
};

/* "cuda/ccudart.pxd":867
 *     void* nvSciSyncObj
 * 
 * cdef struct cudaExternalSemaphoreHandleDesc:             # <<<<<<<<<<<<<<
 *     cudaExternalSemaphoreHandleType type
 *     _cudaExternalSemaphoreHandleDesc_handle_u handle
 */
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreHandleDesc {
  enum __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreHandleType type;
  union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreHandleDesc_handle_u handle;
  unsigned int flags;
};

/* "cuda/ccudart.pxd":872
 *     unsigned int flags
 * 
 * cdef struct _cudaExternalSemaphoreSignalParams_params_params_fence_s:             # <<<<<<<<<<<<<<
 *     unsigned long long value
 * 
 */
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_fence_s {
  unsigned PY_LONG_LONG value;
};

/* "cuda/ccudart.pxd":875
 *     unsigned long long value
 * 
 * cdef union _cudaExternalSemaphoreSignalParams_params_params_nvSciSync_u:             # <<<<<<<<<<<<<<
 *     void* fence
 *     unsigned long long reserved
 */
union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_nvSciSync_u {
  void *fence;
  unsigned PY_LONG_LONG reserved;
};

/* "cuda/ccudart.pxd":879
 *     unsigned long long reserved
 * 
 * cdef struct _cudaExternalSemaphoreSignalParams_params_params_keyedMutex_s:             # <<<<<<<<<<<<<<
 *     unsigned long long key
 * 
 */
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_keyedMutex_s {
  unsigned PY_LONG_LONG key;
};

/* "cuda/ccudart.pxd":882
 *     unsigned long long key
 * 
 * cdef struct _cudaExternalSemaphoreSignalParams_params_s:             # <<<<<<<<<<<<<<
 *     _cudaExternalSemaphoreSignalParams_params_params_fence_s fence
 *     _cudaExternalSemaphoreSignalParams_params_params_nvSciSync_u nvSciSync
 */
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_s {
  struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_fence_s fence;
  union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_nvSciSync_u nvSciSync;
  struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_params_keyedMutex_s keyedMutex;
  unsigned int reserved[12];
};

/* "cuda/ccudart.pxd":888
 *     unsigned int reserved[12]
 * 
 * cdef struct cudaExternalSemaphoreSignalParams:             # <<<<<<<<<<<<<<
 *     _cudaExternalSemaphoreSignalParams_params_s params
 *     unsigned int flags
 */
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreSignalParams {
  struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreSignalParams_params_s params;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccudart.pxd":893
 *     unsigned int reserved[16]
 * 
 * cdef struct _cudaExternalSemaphoreWaitParams_params_params_fence_s:             # <<<<<<<<<<<<<<
 *     unsigned long long value
 * 
 */
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_fence_s {
  unsigned PY_LONG_LONG value;
};

/* "cuda/ccudart.pxd":896
 *     unsigned long long value
 * 
 * cdef union _cudaExternalSemaphoreWaitParams_params_params_nvSciSync_u:             # <<<<<<<<<<<<<<
 *     void* fence
 *     unsigned long long reserved
 */
union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_nvSciSync_u {
  void *fence;
  unsigned PY_LONG_LONG reserved;
};

/* "cuda/ccudart.pxd":900
 *     unsigned long long reserved
 * 
 * cdef struct _cudaExternalSemaphoreWaitParams_params_params_keyedMutex_s:             # <<<<<<<<<<<<<<
 *     unsigned long long key
 *     unsigned int timeoutMs
 */
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_keyedMutex_s {
  unsigned PY_LONG_LONG key;
  unsigned int timeoutMs;
};

/* "cuda/ccudart.pxd":904
 *     unsigned int timeoutMs
 * 
 * cdef struct _cudaExternalSemaphoreWaitParams_params_s:             # <<<<<<<<<<<<<<
 *     _cudaExternalSemaphoreWaitParams_params_params_fence_s fence
 *     _cudaExternalSemaphoreWaitParams_params_params_nvSciSync_u nvSciSync
 */
struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_s {
  struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_fence_s fence;
  union __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_nvSciSync_u nvSciSync;
  struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_params_keyedMutex_s keyedMutex;
  unsigned int reserved[10];
};

/* "cuda/ccudart.pxd":910
 *     unsigned int reserved[10]
 * 
 * cdef struct cudaExternalSemaphoreWaitParams:             # <<<<<<<<<<<<<<
 *     _cudaExternalSemaphoreWaitParams_params_s params
 *     unsigned int flags
 */
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreWaitParams {
  struct __pyx_t_4cuda_7ccudart__cudaExternalSemaphoreWaitParams_params_s params;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccudart.pxd":915
 *     unsigned int reserved[16]
 * 
 * ctypedef cudaError cudaError_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef enum __pyx_t_4cuda_7ccudart_cudaError __pyx_t_4cuda_7ccudart_cudaError_t;

/* "cuda/ccudart.pxd":920
 *     cdef struct CUstream_st:
 *         pass
 * ctypedef CUstream_st* cudaStream_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUstream_st *__pyx_t_4cuda_7ccudart_cudaStream_t;

/* "cuda/ccudart.pxd":925
 *     cdef struct CUevent_st:
 *         pass
 * ctypedef CUevent_st* cudaEvent_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUevent_st *__pyx_t_4cuda_7ccudart_cudaEvent_t;

/* "cuda/ccudart.pxd":930
 *     cdef struct cudaGraphicsResource:
 *         pass
 * ctypedef cudaGraphicsResource* cudaGraphicsResource_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef cudaOutputMode cudaOutputMode_t
 */
typedef struct cudaGraphicsResource *__pyx_t_4cuda_7ccudart_cudaGraphicsResource_t;

/* "cuda/ccudart.pxd":932
 * ctypedef cudaGraphicsResource* cudaGraphicsResource_t
 * 
 * ctypedef cudaOutputMode cudaOutputMode_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef enum __pyx_t_4cuda_7ccudart_cudaOutputMode __pyx_t_4cuda_7ccudart_cudaOutputMode_t;

/* "cuda/ccudart.pxd":937
 *     cdef struct CUexternalMemory_st:
 *         pass
 * ctypedef CUexternalMemory_st* cudaExternalMemory_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUexternalMemory_st *__pyx_t_4cuda_7ccudart_cudaExternalMemory_t;

/* "cuda/ccudart.pxd":942
 *     cdef struct CUexternalSemaphore_st:
 *         pass
 * ctypedef CUexternalSemaphore_st* cudaExternalSemaphore_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUexternalSemaphore_st *__pyx_t_4cuda_7ccudart_cudaExternalSemaphore_t;

/* "cuda/ccudart.pxd":947
 *     cdef struct CUgraph_st:
 *         pass
 * ctypedef CUgraph_st* cudaGraph_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUgraph_st *__pyx_t_4cuda_7ccudart_cudaGraph_t;

/* "cuda/ccudart.pxd":952
 *     cdef struct CUgraphNode_st:
 *         pass
 * ctypedef CUgraphNode_st* cudaGraphNode_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUgraphNode_st *__pyx_t_4cuda_7ccudart_cudaGraphNode_t;

/* "cuda/ccudart.pxd":957
 *     cdef struct CUuserObject_st:
 *         pass
 * ctypedef CUuserObject_st* cudaUserObject_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUuserObject_st *__pyx_t_4cuda_7ccudart_cudaUserObject_t;

/* "cuda/ccudart.pxd":962
 *     cdef struct CUfunc_st:
 *         pass
 * ctypedef CUfunc_st* cudaFunction_t             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUfunc_st *__pyx_t_4cuda_7ccudart_cudaFunction_t;

/* "cuda/ccudart.pxd":967
 *     cdef struct CUmemPoolHandle_st:
 *         pass
 * ctypedef CUmemPoolHandle_st* cudaMemPool_t             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaCGScope:
 */
typedef struct CUmemPoolHandle_st *__pyx_t_4cuda_7ccudart_cudaMemPool_t;

/* "cuda/ccudart.pxd":974
 *     cudaCGScopeMultiGrid = 2
 * 
 * cdef struct cudaKernelNodeParams:             # <<<<<<<<<<<<<<
 *     void* func
 *     dim3 gridDim
 */
struct __pyx_t_4cuda_7ccudart_cudaKernelNodeParams {
  void *func;
  struct __pyx_t_4cuda_7ccudart_dim3 gridDim;
  struct __pyx_t_4cuda_7ccudart_dim3 blockDim;
  unsigned int sharedMemBytes;
  void **kernelParams;
  void **extra;
};

/* "cuda/ccudart.pxd":982
 *     void** extra
 * 
 * cdef struct cudaExternalSemaphoreSignalNodeParams:             # <<<<<<<<<<<<<<
 *     cudaExternalSemaphore_t* extSemArray
 *     const cudaExternalSemaphoreSignalParams* paramsArray
 */
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreSignalNodeParams {
  __pyx_t_4cuda_7ccudart_cudaExternalSemaphore_t *extSemArray;
  struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreSignalParams const *paramsArray;
  unsigned int numExtSems;
};

/* "cuda/ccudart.pxd":987
 *     unsigned int numExtSems
 * 
 * cdef struct cudaExternalSemaphoreWaitNodeParams:             # <<<<<<<<<<<<<<
 *     cudaExternalSemaphore_t* extSemArray
 *     const cudaExternalSemaphoreWaitParams* paramsArray
 */
struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreWaitNodeParams {
  __pyx_t_4cuda_7ccudart_cudaExternalSemaphore_t *extSemArray;
  struct __pyx_t_4cuda_7ccudart_cudaExternalSemaphoreWaitParams const *paramsArray;
  unsigned int numExtSems;
};

/* "cuda/ccudart.pxd":1010
 *     cdef struct CUgraphExec_st:
 *         pass
 * ctypedef CUgraphExec_st* cudaGraphExec_t             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaGraphExecUpdateResult:
 */
typedef struct CUgraphExec_st *__pyx_t_4cuda_7ccudart_cudaGraphExec_t;

/* "cuda/ccudart.pxd":1067
 *     cudaReadModeNormalizedFloat = 1
 * 
 * cdef struct cudaTextureDesc:             # <<<<<<<<<<<<<<
 *     cudaTextureAddressMode addressMode[3]
 *     cudaTextureFilterMode filterMode
 */
struct __pyx_t_4cuda_7ccudart_cudaTextureDesc {
  enum __pyx_t_4cuda_7ccudart_cudaTextureAddressMode addressMode[3];
  enum __pyx_t_4cuda_7ccudart_cudaTextureFilterMode filterMode;
  enum __pyx_t_4cuda_7ccudart_cudaTextureReadMode readMode;
  int sRGB;
  float borderColor[4];
  int normalizedCoords;
  unsigned int maxAnisotropy;
  enum __pyx_t_4cuda_7ccudart_cudaTextureFilterMode mipmapFilterMode;
  float mipmapLevelBias;
  float minMipmapLevelClamp;
  float maxMipmapLevelClamp;
  int disableTrilinearOptimization;
};

/* "cuda/ccudart.pxd":1113
 *     CUDA_C_64U = 27
 * 
 * ctypedef cudaDataType_t cudaDataType             # <<<<<<<<<<<<<<
 * 
 * cdef enum libraryPropertyType_t:
 */
typedef enum __pyx_t_4cuda_7ccudart_cudaDataType_t __pyx_t_4cuda_7ccudart_cudaDataType;

/* "cuda/ccudart.pxd":1120
 *     PATCH_LEVEL
 * 
 * ctypedef libraryPropertyType_t libraryPropertyType             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t cudaDeviceReset() nogil except ?cudaErrorCallRequiresNewerDriver
 */
typedef enum __pyx_t_4cuda_7ccudart_libraryPropertyType_t __pyx_t_4cuda_7ccudart_libraryPropertyType;

/* "cuda/ccudart.pxd":1226
 * cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) nogil except ?cudaErrorCallRequiresNewerDriver
 * 
 * ctypedef void (*cudaStreamCallback_t)(cudaStream_t stream, cudaError_t status, void* userData)             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) nogil except ?cudaErrorCallRequiresNewerDriver
 */
typedef void (*__pyx_t_4cuda_7ccudart_cudaStreamCallback_t)(__pyx_t_4cuda_7ccudart_cudaStream_t, __pyx_t_4cuda_7ccudart_cudaError_t, void *);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

/* Module declarations from 'cuda.ccudart' */
static __pyx_t_4cuda_7ccudart_cudaError_t (*__pyx_f_4cuda_7ccudart_cudaMalloc)(void **, size_t); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t (*__pyx_f_4cuda_7ccudart_cudaFree)(void *); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t (*__pyx_f_4cuda_7ccudart_cudaMemcpy)(void *, void const *, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind); /*proto*/

/* Module declarations from 'cuda.tests.test_ccudart' */
#define __Pyx_MODULE_NAME "cuda.tests.test_ccudart"
extern int __pyx_module_is_main_cuda__tests__test_ccudart;
int __pyx_module_is_main_cuda__tests__test_ccudart = 0;

/* Implementation of 'cuda.tests.test_ccudart' */
static const char __pyx_k_err[] = "err";
static const char __pyx_k_dptr[] = "dptr";
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_hptr1[] = "hptr1";
static const char __pyx_k_hptr2[] = "hptr2";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_test_ccudart_memcpy[] = "test_ccudart_memcpy";
static const char __pyx_k_cuda_tests_test_ccudart[] = "cuda.tests.test_ccudart";
static const char __pyx_k_cuda_tests_test_ccudart_pyx[] = "cuda/tests/test_ccudart.pyx";
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_cuda_tests_test_ccudart;
static PyObject *__pyx_kp_s_cuda_tests_test_ccudart_pyx;
static PyObject *__pyx_n_s_dptr;
static PyObject *__pyx_n_s_err;
static PyObject *__pyx_n_s_hptr1;
static PyObject *__pyx_n_s_hptr2;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_test_ccudart_memcpy;
static PyObject *__pyx_pf_4cuda_5tests_12test_ccudart_test_ccudart_memcpy(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_tuple__2;
/* Late includes */

/* "cuda/tests/test_ccudart.pyx":14
 * cimport cuda.ccudart as ccudart
 * 
 * def test_ccudart_memcpy():             # <<<<<<<<<<<<<<
 *     # Allocate dev memory
 *     cdef void* dptr
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_5tests_12test_ccudart_1test_ccudart_memcpy(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_5tests_12test_ccudart_test_ccudart_memcpy[] = "test_ccudart_memcpy()";
static PyMethodDef __pyx_mdef_4cuda_5tests_12test_ccudart_1test_ccudart_memcpy = {"test_ccudart_memcpy", (PyCFunction)__pyx_pw_4cuda_5tests_12test_ccudart_1test_ccudart_memcpy, METH_NOARGS, __pyx_doc_4cuda_5tests_12test_ccudart_test_ccudart_memcpy};
static PyObject *__pyx_pw_4cuda_5tests_12test_ccudart_1test_ccudart_memcpy(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("test_ccudart_memcpy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_5tests_12test_ccudart_test_ccudart_memcpy(__pyx_self);

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

static PyObject *__pyx_pf_4cuda_5tests_12test_ccudart_test_ccudart_memcpy(CYTHON_UNUSED PyObject *__pyx_self) {
  void *__pyx_v_dptr;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  char __pyx_v_hptr1[0x400];
  char __pyx_v_hptr2[0x400];
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj_)
  __Pyx_RefNannySetupContext("test_ccudart_memcpy", 0);
  __Pyx_TraceCall("test_ccudart_memcpy", __pyx_f[0], 14, 0, __PYX_ERR(0, 14, __pyx_L1_error));

  /* "cuda/tests/test_ccudart.pyx":17
 *     # Allocate dev memory
 *     cdef void* dptr
 *     err = ccudart.cudaMalloc(&dptr, 1024)             # <<<<<<<<<<<<<<
 *     assert(err == ccudart.cudaSuccess)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_7ccudart_cudaMalloc((&__pyx_v_dptr), 0x400); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver) && PyErr_Occurred())) __PYX_ERR(0, 17, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/tests/test_ccudart.pyx":18
 *     cdef void* dptr
 *     err = ccudart.cudaMalloc(&dptr, 1024)
 *     assert(err == ccudart.cudaSuccess)             # <<<<<<<<<<<<<<
 * 
 *     # Set h1 and h2 memory to be different
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((__pyx_v_err == __pyx_e_4cuda_7ccudart_cudaSuccess) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 18, __pyx_L1_error)
    }
  }
  #endif

  /* "cuda/tests/test_ccudart.pyx":22
 *     # Set h1 and h2 memory to be different
 *     cdef char[1024] hptr1
 *     memset(hptr1, 1, 1024)             # <<<<<<<<<<<<<<
 *     cdef char[1024] hptr2
 *     memset(hptr2, 2, 1024)
 */
  (void)(memset(__pyx_v_hptr1, 1, 0x400));

  /* "cuda/tests/test_ccudart.pyx":24
 *     memset(hptr1, 1, 1024)
 *     cdef char[1024] hptr2
 *     memset(hptr2, 2, 1024)             # <<<<<<<<<<<<<<
 *     assert(memcmp(hptr1, hptr2, 1024) != 0)
 * 
 */
  (void)(memset(__pyx_v_hptr2, 2, 0x400));

  /* "cuda/tests/test_ccudart.pyx":25
 *     cdef char[1024] hptr2
 *     memset(hptr2, 2, 1024)
 *     assert(memcmp(hptr1, hptr2, 1024) != 0)             # <<<<<<<<<<<<<<
 * 
 *     # h1 to D
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((memcmp(__pyx_v_hptr1, __pyx_v_hptr2, 0x400) != 0) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 25, __pyx_L1_error)
    }
  }
  #endif

  /* "cuda/tests/test_ccudart.pyx":28
 * 
 *     # h1 to D
 *     err = ccudart.cudaMemcpy(dptr, <void*>hptr1, 1024, ccudart.cudaMemcpyKind.cudaMemcpyHostToDevice)             # <<<<<<<<<<<<<<
 *     assert(err == ccudart.cudaSuccess)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_7ccudart_cudaMemcpy(__pyx_v_dptr, ((void *)__pyx_v_hptr1), 0x400, __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver) && PyErr_Occurred())) __PYX_ERR(0, 28, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/tests/test_ccudart.pyx":29
 *     # h1 to D
 *     err = ccudart.cudaMemcpy(dptr, <void*>hptr1, 1024, ccudart.cudaMemcpyKind.cudaMemcpyHostToDevice)
 *     assert(err == ccudart.cudaSuccess)             # <<<<<<<<<<<<<<
 * 
 *     # D to h2
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((__pyx_v_err == __pyx_e_4cuda_7ccudart_cudaSuccess) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 29, __pyx_L1_error)
    }
  }
  #endif

  /* "cuda/tests/test_ccudart.pyx":32
 * 
 *     # D to h2
 *     err = ccudart.cudaMemcpy(<void*>hptr2, dptr, 1024, ccudart.cudaMemcpyKind.cudaMemcpyDeviceToHost)             # <<<<<<<<<<<<<<
 *     assert(err == ccudart.cudaSuccess)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_7ccudart_cudaMemcpy(((void *)__pyx_v_hptr2), __pyx_v_dptr, 0x400, __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver) && PyErr_Occurred())) __PYX_ERR(0, 32, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/tests/test_ccudart.pyx":33
 *     # D to h2
 *     err = ccudart.cudaMemcpy(<void*>hptr2, dptr, 1024, ccudart.cudaMemcpyKind.cudaMemcpyDeviceToHost)
 *     assert(err == ccudart.cudaSuccess)             # <<<<<<<<<<<<<<
 * 
 *     # Validate h1 == h2
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((__pyx_v_err == __pyx_e_4cuda_7ccudart_cudaSuccess) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 33, __pyx_L1_error)
    }
  }
  #endif

  /* "cuda/tests/test_ccudart.pyx":36
 * 
 *     # Validate h1 == h2
 *     assert(memcmp(hptr1, hptr2, 1024) == 0)             # <<<<<<<<<<<<<<
 * 
 *     # Cleanup
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((memcmp(__pyx_v_hptr1, __pyx_v_hptr2, 0x400) == 0) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 36, __pyx_L1_error)
    }
  }
  #endif

  /* "cuda/tests/test_ccudart.pyx":39
 * 
 *     # Cleanup
 *     err = ccudart.cudaFree(dptr)             # <<<<<<<<<<<<<<
 *     assert(err == ccudart.cudaSuccess)
 */
  __pyx_t_1 = __pyx_f_4cuda_7ccudart_cudaFree(__pyx_v_dptr); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver) && PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/tests/test_ccudart.pyx":40
 *     # Cleanup
 *     err = ccudart.cudaFree(dptr)
 *     assert(err == ccudart.cudaSuccess)             # <<<<<<<<<<<<<<
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((__pyx_v_err == __pyx_e_4cuda_7ccudart_cudaSuccess) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 40, __pyx_L1_error)
    }
  }
  #endif

  /* "cuda/tests/test_ccudart.pyx":14
 * cimport cuda.ccudart as ccudart
 * 
 * def test_ccudart_memcpy():             # <<<<<<<<<<<<<<
 *     # Allocate dev memory
 *     cdef void* dptr
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.tests.test_ccudart.test_ccudart_memcpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_test_ccudart(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_test_ccudart},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "test_ccudart",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_cuda_tests_test_ccudart, __pyx_k_cuda_tests_test_ccudart, sizeof(__pyx_k_cuda_tests_test_ccudart), 0, 0, 1, 1},
  {&__pyx_kp_s_cuda_tests_test_ccudart_pyx, __pyx_k_cuda_tests_test_ccudart_pyx, sizeof(__pyx_k_cuda_tests_test_ccudart_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_dptr, __pyx_k_dptr, sizeof(__pyx_k_dptr), 0, 0, 1, 1},
  {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
  {&__pyx_n_s_hptr1, __pyx_k_hptr1, sizeof(__pyx_k_hptr1), 0, 0, 1, 1},
  {&__pyx_n_s_hptr2, __pyx_k_hptr2, sizeof(__pyx_k_hptr2), 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},
  {&__pyx_n_s_test_ccudart_memcpy, __pyx_k_test_ccudart_memcpy, sizeof(__pyx_k_test_ccudart_memcpy), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  return 0;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "cuda/tests/test_ccudart.pyx":14
 * cimport cuda.ccudart as ccudart
 * 
 * def test_ccudart_memcpy():             # <<<<<<<<<<<<<<
 *     # Allocate dev memory
 *     cdef void* dptr
 */
  __pyx_tuple__2 = PyTuple_Pack(4, __pyx_n_s_dptr, __pyx_n_s_err, __pyx_n_s_hptr1, __pyx_n_s_hptr2); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_tests_test_ccudart_pyx, __pyx_n_s_test_ccudart_memcpy, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __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.ccudart"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "cudaMalloc", (void (**)(void))&__pyx_f_4cuda_7ccudart_cudaMalloc, "__pyx_t_4cuda_7ccudart_cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cudaFree", (void (**)(void))&__pyx_f_4cuda_7ccudart_cudaFree, "__pyx_t_4cuda_7ccudart_cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cudaMemcpy", (void (**)(void))&__pyx_f_4cuda_7ccudart_cudaMemcpy, "__pyx_t_4cuda_7ccudart_cudaError_t (void *, void const *, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC inittest_ccudart(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC inittest_ccudart(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_test_ccudart(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_test_ccudart(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_test_ccudart(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'test_ccudart' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_test_ccudart(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("test_ccudart", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_cuda__tests__test_ccudart) {
    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.tests.test_ccudart")) {
      if (unlikely(PyDict_SetItemString(modules, "cuda.tests.test_ccudart", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  (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_test_ccudart(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "cuda/tests/test_ccudart.pyx":14
 * cimport cuda.ccudart as ccudart
 * 
 * def test_ccudart_memcpy():             # <<<<<<<<<<<<<<
 *     # Allocate dev memory
 *     cdef void* dptr
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_5tests_12test_ccudart_1test_ccudart_memcpy, 0, __pyx_n_s_test_ccudart_memcpy, NULL, __pyx_n_s_cuda_tests_test_ccudart, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_ccudart_memcpy, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/tests/test_ccudart.pyx":1
 * # Copyright 2021 NVIDIA Corporation.  All rights reserved.             # <<<<<<<<<<<<<<
 * #
 * # Please refer to the NVIDIA end user license agreement (EULA) associated
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init cuda.tests.test_ccudart", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cuda.tests.test_ccudart");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   PyThreadState* tstate,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
    __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    __Pyx_EnterTracing(tstate);
    __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
    #if CYTHON_TRACE
    if (tstate->c_tracefunc)
        retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
    if (retval && tstate->c_profilefunc)
    #endif
        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
    __Pyx_LeaveTracing(tstate);
    if (retval) {
        __Pyx_ErrRestoreInState(tstate, type, value, traceback);
        return __Pyx_IsTracing(tstate, 0, 0) && retval;
    } else {
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(traceback);
        return -1;
    }
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
    PyCodeObject *py_code = 0;
#if PY_MAJOR_VERSION >= 3
    py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
    if (likely(py_code)) {
        py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
    }
#else
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    py_funcname = PyString_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    py_srcfile = PyString_FromString(srcfile);
    if (unlikely(!py_srcfile)) goto bad;
    py_code = PyCode_New(
        0,
        0,
        0,
        CO_OPTIMIZED | CO_NEWLOCALS,
        __pyx_empty_bytes,     /*PyObject *code,*/
        __pyx_empty_tuple,     /*PyObject *consts,*/
        __pyx_empty_tuple,     /*PyObject *names,*/
        __pyx_empty_tuple,     /*PyObject *varnames,*/
        __pyx_empty_tuple,     /*PyObject *freevars,*/
        __pyx_empty_tuple,     /*PyObject *cellvars,*/
        py_srcfile,       /*PyObject *filename,*/
        py_funcname,      /*PyObject *name,*/
        firstlineno,
        __pyx_empty_bytes      /*PyObject *lnotab*/
    );
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
#endif
    return py_code;
}
#endif

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

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

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

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

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    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) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __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);
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
