/* Generated by Cython 0.29.28 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "cuda"
        ],
        "extra_compile_args": [
            "-std=c++14",
            "-fpermissive",
            "-Wno-deprecated-declarations",
            "-D _GLIBCXX_ASSERTIONS",
            "-fno-var-tracking-assignments",
            "-O3"
        ],
        "include_dirs": [
            "./cuda",
            "/opt/conda/conda-bld/cuda-python_1647360842862/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include"
        ],
        "language": "c++",
        "library_dirs": [
            "/opt/conda/conda-bld/cuda-python_1647360842862/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.10/site-packages",
            "/opt/conda/conda-bld/cuda-python_1647360842862/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib"
        ],
        "name": "cuda._lib.ccudart.utils",
        "sources": [
            "cuda/_lib/ccudart/utils.pyx"
        ]
    },
    "module_name": "cuda._lib.ccudart.utils"
}
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_28"
#define CYTHON_HEX_VERSION 0x001D1CF0
#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
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 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
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#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___lib__ccudart__utils
#define __PYX_HAVE_API__cuda___lib__ccudart__utils
/* Early includes */
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#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[] = {
  "stringsource",
  "cuda/_lib/ccudart/utils.pyx",
};
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

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


/* "cuda/ccudart.pxd":1058
 *     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":1089
 *     int seamlessCubemap
 * 
 * ctypedef unsigned long long cudaTextureObject_t             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaDataType_t:
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_7ccudart_cudaTextureObject_t;

/* "cuda/ccudart.pxd":1664
 * 
 * 
 * ctypedef unsigned int GLenum             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int GLuint
 */
typedef unsigned int __pyx_t_4cuda_7ccudart_GLenum;

/* "cuda/ccudart.pxd":1666
 * ctypedef unsigned int GLenum
 * 
 * ctypedef unsigned int GLuint             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef unsigned int __pyx_t_4cuda_7ccudart_GLuint;

/* "cuda/ccudart.pxd":1678
 * ctypedef void* EGLStreamKHR
 * 
 * ctypedef unsigned int EGLint             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef unsigned int __pyx_t_4cuda_7ccudart_EGLint;

/* "cuda/ccudart.pxd":1685
 * ctypedef void* EGLSyncKHR
 * 
 * ctypedef uint32_t VdpDevice             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long VdpGetProcAddress
 */
typedef uint32_t __pyx_t_4cuda_7ccudart_VdpDevice;

/* "cuda/ccudart.pxd":1687
 * ctypedef uint32_t VdpDevice
 * 
 * ctypedef unsigned long long VdpGetProcAddress             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpVideoSurface
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_7ccudart_VdpGetProcAddress;

/* "cuda/ccudart.pxd":1689
 * ctypedef unsigned long long VdpGetProcAddress
 * 
 * ctypedef uint32_t VdpVideoSurface             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpOutputSurface
 */
typedef uint32_t __pyx_t_4cuda_7ccudart_VdpVideoSurface;

/* "cuda/ccudart.pxd":1691
 * ctypedef uint32_t VdpVideoSurface
 * 
 * ctypedef uint32_t VdpOutputSurface             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?cudaErrorCallRequiresNewerDriver
 */
typedef uint32_t __pyx_t_4cuda_7ccudart_VdpOutputSurface;

/* "cuda/ccuda.pxd":11
 * 
 * 
 * ctypedef uint32_t cuuint32_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint64_t cuuint64_t
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_cuuint32_t;

/* "cuda/ccuda.pxd":13
 * ctypedef uint32_t cuuint32_t
 * 
 * ctypedef uint64_t cuuint64_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long CUdeviceptr_v2
 */
typedef uint64_t __pyx_t_4cuda_5ccuda_cuuint64_t;

/* "cuda/ccuda.pxd":15
 * ctypedef uint64_t cuuint64_t
 * 
 * ctypedef unsigned long long CUdeviceptr_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUdeviceptr_v2 CUdeviceptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_CUdeviceptr_v2;

/* "cuda/ccuda.pxd":17
 * ctypedef unsigned long long CUdeviceptr_v2
 * 
 * ctypedef CUdeviceptr_v2 CUdeviceptr             # <<<<<<<<<<<<<<
 * 
 * ctypedef int CUdevice_v1
 */
typedef __pyx_t_4cuda_5ccuda_CUdeviceptr_v2 __pyx_t_4cuda_5ccuda_CUdeviceptr;

/* "cuda/ccuda.pxd":19
 * ctypedef CUdeviceptr_v2 CUdeviceptr
 * 
 * ctypedef int CUdevice_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUdevice_v1 CUdevice
 */
typedef int __pyx_t_4cuda_5ccuda_CUdevice_v1;

/* "cuda/ccuda.pxd":21
 * ctypedef int CUdevice_v1
 * 
 * ctypedef CUdevice_v1 CUdevice             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef __pyx_t_4cuda_5ccuda_CUdevice_v1 __pyx_t_4cuda_5ccuda_CUdevice;

/* "cuda/ccuda.pxd":73
 * ctypedef CUgraphicsResource_st* CUgraphicsResource
 * 
 * ctypedef unsigned long long CUtexObject_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUtexObject_v1 CUtexObject
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_CUtexObject_v1;

/* "cuda/ccuda.pxd":75
 * ctypedef unsigned long long CUtexObject_v1
 * 
 * ctypedef CUtexObject_v1 CUtexObject             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long CUsurfObject_v1
 */
typedef __pyx_t_4cuda_5ccuda_CUtexObject_v1 __pyx_t_4cuda_5ccuda_CUtexObject;

/* "cuda/ccuda.pxd":77
 * ctypedef CUtexObject_v1 CUtexObject
 * 
 * ctypedef unsigned long long CUsurfObject_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUsurfObject_v1 CUsurfObject
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_CUsurfObject_v1;

/* "cuda/ccuda.pxd":79
 * ctypedef unsigned long long CUsurfObject_v1
 * 
 * ctypedef CUsurfObject_v1 CUsurfObject             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef __pyx_t_4cuda_5ccuda_CUsurfObject_v1 __pyx_t_4cuda_5ccuda_CUsurfObject;

/* "cuda/ccuda.pxd":1350
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS
 * 
 * ctypedef unsigned long long CUmemGenericAllocationHandle_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle_v1;

/* "cuda/ccuda.pxd":1352
 * ctypedef unsigned long long CUmemGenericAllocationHandle_v1
 * 
 * ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationHandleType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle_v1 __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle;

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

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

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

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

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

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

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

/*--- Type declarations ---*/
struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal;
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_cudaArrayMemoryRequirements;
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;
struct __pyx_t_4cuda_7ccudart_cudaEglPlaneDesc_st;
union __pyx_t_4cuda_7ccudart__cudaEglFrame_cudaEglFrame_cudaEglFrame_st_frame_u;
struct __pyx_t_4cuda_7ccudart_cudaEglFrame_st;

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

/* "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":224
 *     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":230
 *     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":282
 *     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":300
 *     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":305
 *     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":310
 *     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":316
 *     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":324
 *     cudaSynchronizationPolicy syncPolicy
 * 
 * cdef enum cudaStreamUpdateCaptureDependenciesFlags:             # <<<<<<<<<<<<<<
 *     cudaStreamAddCaptureDependencies = 0
 *     cudaStreamSetCaptureDependencies = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaStreamUpdateCaptureDependenciesFlags {
  __pyx_e_4cuda_7ccudart_cudaStreamAddCaptureDependencies = 0,
  __pyx_e_4cuda_7ccudart_cudaStreamSetCaptureDependencies = 1
};

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

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

/* "cuda/ccudart.pxd":335
 * 
 * 
 * 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":342
 *     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":347
 *     cudaGraphicsMapFlagsWriteDiscard = 2
 * 
 * cdef enum cudaGraphicsCubeFace:             # <<<<<<<<<<<<<<
 *     cudaGraphicsCubeFacePositiveX = 0
 *     cudaGraphicsCubeFaceNegativeX = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphicsCubeFace {
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFacePositiveX = 0,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFaceNegativeX = 1,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFacePositiveY = 2,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFaceNegativeY = 3,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFacePositiveZ = 4,
  __pyx_e_4cuda_7ccudart_cudaGraphicsCubeFaceNegativeZ = 5
};

/* "cuda/ccudart.pxd":355
 *     cudaGraphicsCubeFaceNegativeZ = 5
 * 
 * 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":363
 *     int cooperative
 * 
 * cdef enum cudaResourceType:             # <<<<<<<<<<<<<<
 *     cudaResourceTypeArray = 0
 *     cudaResourceTypeMipmappedArray = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaResourceType {
  __pyx_e_4cuda_7ccudart_cudaResourceTypeArray = 0,
  __pyx_e_4cuda_7ccudart_cudaResourceTypeMipmappedArray = 1,
  __pyx_e_4cuda_7ccudart_cudaResourceTypeLinear = 2,
  __pyx_e_4cuda_7ccudart_cudaResourceTypePitch2D = 3
};

/* "cuda/ccudart.pxd":369
 *     cudaResourceTypePitch2D = 3
 * 
 * cdef enum cudaResourceViewFormat:             # <<<<<<<<<<<<<<
 *     cudaResViewFormatNone = 0
 *     cudaResViewFormatUnsignedChar1 = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaResourceViewFormat {
  __pyx_e_4cuda_7ccudart_cudaResViewFormatNone = 0,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedChar1 = 1,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedChar2 = 2,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedChar4 = 3,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedChar1 = 4,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedChar2 = 5,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedChar4 = 6,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedShort1 = 7,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedShort2 = 8,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedShort4 = 9,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedShort1 = 10,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedShort2 = 11,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedShort4 = 12,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedInt1 = 13,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedInt2 = 14,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedInt4 = 15,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedInt1 = 16,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedInt2 = 17,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedInt4 = 18,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatHalf1 = 19,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatHalf2 = 20,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatHalf4 = 21,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatFloat1 = 22,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatFloat2 = 23,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatFloat4 = 24,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed1 = 25,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed2 = 26,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed3 = 27,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed4 = 28,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedBlockCompressed4 = 29,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed5 = 30,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedBlockCompressed5 = 31,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed6H = 32,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatSignedBlockCompressed6H = 33,
  __pyx_e_4cuda_7ccudart_cudaResViewFormatUnsignedBlockCompressed7 = 34
};

/* "cuda/ccudart.pxd":462
 *     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 = 10
};

/* "cuda/ccudart.pxd":467
 *     cudaFuncAttributeMax = 10
 * 
 * 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":473
 *     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":478
 *     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":483
 *     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":489
 *     cudaComputeModeExclusiveProcess = 3
 * 
 * cdef enum cudaLimit:             # <<<<<<<<<<<<<<
 *     cudaLimitStackSize = 0
 *     cudaLimitPrintfFifoSize = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaLimit {
  __pyx_e_4cuda_7ccudart_cudaLimitStackSize = 0,
  __pyx_e_4cuda_7ccudart_cudaLimitPrintfFifoSize = 1,
  __pyx_e_4cuda_7ccudart_cudaLimitMallocHeapSize = 2,
  __pyx_e_4cuda_7ccudart_cudaLimitDevRuntimeSyncDepth = 3,
  __pyx_e_4cuda_7ccudart_cudaLimitDevRuntimePendingLaunchCount = 4,
  __pyx_e_4cuda_7ccudart_cudaLimitMaxL2FetchGranularity = 5,
  __pyx_e_4cuda_7ccudart_cudaLimitPersistingL2CacheSize = 6
};

/* "cuda/ccudart.pxd":498
 *     cudaLimitPersistingL2CacheSize = 6
 * 
 * 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":506
 *     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":512
 *     cudaMemRangeAttributeLastPrefetchLocation = 4
 * 
 * cdef enum cudaOutputMode:             # <<<<<<<<<<<<<<
 *     cudaKeyValuePair = 0
 *     cudaCSV = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaOutputMode {
  __pyx_e_4cuda_7ccudart_cudaKeyValuePair = 0,
  __pyx_e_4cuda_7ccudart_cudaCSV = 1
};

/* "cuda/ccudart.pxd":516
 *     cudaCSV = 1
 * 
 * cdef enum cudaFlushGPUDirectRDMAWritesOptions:             # <<<<<<<<<<<<<<
 *     cudaFlushGPUDirectRDMAWritesOptionHost = 1
 *     cudaFlushGPUDirectRDMAWritesOptionMemOps = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesOptions {
  __pyx_e_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesOptionHost = 1,
  __pyx_e_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesOptionMemOps = 2
};

/* "cuda/ccudart.pxd":520
 *     cudaFlushGPUDirectRDMAWritesOptionMemOps = 2
 * 
 * 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":525
 *     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":529
 *     cudaFlushGPUDirectRDMAWritesToAllDevices = 200
 * 
 * cdef enum cudaFlushGPUDirectRDMAWritesTarget:             # <<<<<<<<<<<<<<
 *     cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0
 * 
 */
enum __pyx_t_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesTarget {
  __pyx_e_4cuda_7ccudart_cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0
};

/* "cuda/ccudart.pxd":532
 *     cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0
 * 
 * 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_cudaDevAttrDeferredMappingCudaArraySupported = 0x79,
  __pyx_e_4cuda_7ccudart_cudaDevAttrMax = 0x7A
};

/* "cuda/ccudart.pxd":649
 *     cudaDevAttrMax = 122
 * 
 * cdef enum cudaMemPoolAttr:             # <<<<<<<<<<<<<<
 *     cudaMemPoolReuseFollowEventDependencies = 1
 *     cudaMemPoolReuseAllowOpportunistic = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaMemPoolAttr {
  __pyx_e_4cuda_7ccudart_cudaMemPoolReuseFollowEventDependencies = 1,
  __pyx_e_4cuda_7ccudart_cudaMemPoolReuseAllowOpportunistic = 2,
  __pyx_e_4cuda_7ccudart_cudaMemPoolReuseAllowInternalDependencies = 3,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrReleaseThreshold = 4,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrReservedMemCurrent = 5,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrReservedMemHigh = 6,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrUsedMemCurrent = 7,
  __pyx_e_4cuda_7ccudart_cudaMemPoolAttrUsedMemHigh = 8
};

/* "cuda/ccudart.pxd":659
 *     cudaMemPoolAttrUsedMemHigh = 8
 * 
 * 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":667
 *     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":676
 *     cudaMemAccessFlags flags
 * 
 * cdef enum cudaMemAllocationType:             # <<<<<<<<<<<<<<
 *     cudaMemAllocationTypeInvalid = 0
 *     cudaMemAllocationTypePinned = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaMemAllocationType {
  __pyx_e_4cuda_7ccudart_cudaMemAllocationTypeInvalid = 0,
  __pyx_e_4cuda_7ccudart_cudaMemAllocationTypePinned = 1,
  __pyx_e_4cuda_7ccudart_cudaMemAllocationTypeMax = 0x7FFFFFFF
};

/* "cuda/ccudart.pxd":681
 *     cudaMemAllocationTypeMax = 2147483647
 * 
 * cdef enum cudaMemAllocationHandleType:             # <<<<<<<<<<<<<<
 *     cudaMemHandleTypeNone = 0
 *     cudaMemHandleTypePosixFileDescriptor = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaMemAllocationHandleType {
  __pyx_e_4cuda_7ccudart_cudaMemHandleTypeNone = 0,
  __pyx_e_4cuda_7ccudart_cudaMemHandleTypePosixFileDescriptor = 1,
  __pyx_e_4cuda_7ccudart_cudaMemHandleTypeWin32 = 2,
  __pyx_e_4cuda_7ccudart_cudaMemHandleTypeWin32Kmt = 4
};

/* "cuda/ccudart.pxd":704
 *     void* dptr
 * 
 * cdef enum cudaGraphMemAttributeType:             # <<<<<<<<<<<<<<
 *     cudaGraphMemAttrUsedMemCurrent = 0
 *     cudaGraphMemAttrUsedMemHigh = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphMemAttributeType {
  __pyx_e_4cuda_7ccudart_cudaGraphMemAttrUsedMemCurrent = 0,
  __pyx_e_4cuda_7ccudart_cudaGraphMemAttrUsedMemHigh = 1,
  __pyx_e_4cuda_7ccudart_cudaGraphMemAttrReservedMemCurrent = 2,
  __pyx_e_4cuda_7ccudart_cudaGraphMemAttrReservedMemHigh = 3
};

/* "cuda/ccudart.pxd":710
 *     cudaGraphMemAttrReservedMemHigh = 3
 * 
 * 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":815
 * 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":852
 *     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":975
 * 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":998
 *     unsigned int numExtSems
 * 
 * cdef enum cudaGraphNodeType:             # <<<<<<<<<<<<<<
 *     cudaGraphNodeTypeKernel = 0
 *     cudaGraphNodeTypeMemcpy = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphNodeType {
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeKernel = 0,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeMemcpy = 1,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeMemset = 2,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeHost = 3,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeGraph = 4,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeEmpty = 5,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeWaitEvent = 6,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeEventRecord = 7,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeExtSemaphoreSignal = 8,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeExtSemaphoreWait = 9,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeMemAlloc = 10,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeMemFree = 11,
  __pyx_e_4cuda_7ccudart_cudaGraphNodeTypeCount = 12
};

/* "cuda/ccudart.pxd":1018
 * ctypedef CUgraphExec_st* cudaGraphExec_t
 * 
 * cdef enum cudaGraphExecUpdateResult:             # <<<<<<<<<<<<<<
 *     cudaGraphExecUpdateSuccess = 0
 *     cudaGraphExecUpdateError = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphExecUpdateResult {
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateSuccess = 0,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateError = 1,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorTopologyChanged = 2,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorNodeTypeChanged = 3,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorFunctionChanged = 4,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorParametersChanged = 5,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorNotSupported = 6,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7,
  __pyx_e_4cuda_7ccudart_cudaGraphExecUpdateErrorAttributesChanged = 8
};

/* "cuda/ccudart.pxd":1029
 *     cudaGraphExecUpdateErrorAttributesChanged = 8
 * 
 * cdef enum cudaGetDriverEntryPointFlags:             # <<<<<<<<<<<<<<
 *     cudaEnableDefault = 0
 *     cudaEnableLegacyStream = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaGetDriverEntryPointFlags {
  __pyx_e_4cuda_7ccudart_cudaEnableDefault = 0,
  __pyx_e_4cuda_7ccudart_cudaEnableLegacyStream = 1,
  __pyx_e_4cuda_7ccudart_cudaEnablePerThreadDefaultStream = 2
};

/* "cuda/ccudart.pxd":1034
 *     cudaEnablePerThreadDefaultStream = 2
 * 
 * cdef enum cudaGraphDebugDotFlags:             # <<<<<<<<<<<<<<
 *     cudaGraphDebugDotFlagsVerbose = 1
 *     cudaGraphDebugDotFlagsKernelNodeParams = 4
 */
enum __pyx_t_4cuda_7ccudart_cudaGraphDebugDotFlags {
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsVerbose = 1,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsKernelNodeParams = 4,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsMemcpyNodeParams = 8,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsMemsetNodeParams = 16,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsHostNodeParams = 32,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsEventNodeParams = 64,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 0x80,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 0x100,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsKernelNodeAttributes = 0x200,
  __pyx_e_4cuda_7ccudart_cudaGraphDebugDotFlagsHandles = 0x400
};

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

/* "cuda/ccudart.pxd":1049
 *     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":1054
 *     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":1060
 * 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":1066
 *     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":1070
 *     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":1091
 * 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":1123
 * ctypedef cudaDataType_t cudaDataType
 * 
 * cdef enum libraryPropertyType_t:             # <<<<<<<<<<<<<<
 *     MAJOR_VERSION = 0
 *     MINOR_VERSION = 1
 */
enum __pyx_t_4cuda_7ccudart_libraryPropertyType_t {
  __pyx_e_4cuda_7ccudart_MAJOR_VERSION = 0,
  __pyx_e_4cuda_7ccudart_MINOR_VERSION = 1,
  __pyx_e_4cuda_7ccudart_PATCH_LEVEL = 2
};

/* "cuda/ccudart.pxd":1701
 * cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?cudaErrorCallRequiresNewerDriver
 * 
 * cdef enum cudaGLDeviceList:             # <<<<<<<<<<<<<<
 *     cudaGLDeviceListAll = 1
 *     cudaGLDeviceListCurrentFrame = 2
 */
enum __pyx_t_4cuda_7ccudart_cudaGLDeviceList {
  __pyx_e_4cuda_7ccudart_cudaGLDeviceListAll = 1,
  __pyx_e_4cuda_7ccudart_cudaGLDeviceListCurrentFrame = 2,
  __pyx_e_4cuda_7ccudart_cudaGLDeviceListNextFrame = 3
};

/* "cuda/ccudart.pxd":1712
 * cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) nogil except ?cudaErrorCallRequiresNewerDriver
 * 
 * cdef enum cudaGLMapFlags:             # <<<<<<<<<<<<<<
 *     cudaGLMapFlagsNone = 0
 *     cudaGLMapFlagsReadOnly = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaGLMapFlags {
  __pyx_e_4cuda_7ccudart_cudaGLMapFlagsNone = 0,
  __pyx_e_4cuda_7ccudart_cudaGLMapFlagsReadOnly = 1,
  __pyx_e_4cuda_7ccudart_cudaGLMapFlagsWriteDiscard = 2
};

/* "cuda/ccudart.pxd":1717
 *     cudaGLMapFlagsWriteDiscard = 2
 * 
 * cdef enum cudaEglFrameType_enum:             # <<<<<<<<<<<<<<
 *     cudaEglFrameTypeArray = 0
 *     cudaEglFrameTypePitch = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaEglFrameType_enum {
  __pyx_e_4cuda_7ccudart_cudaEglFrameTypeArray = 0,
  __pyx_e_4cuda_7ccudart_cudaEglFrameTypePitch = 1
};

/* "cuda/ccudart.pxd":1723
 * ctypedef cudaEglFrameType_enum cudaEglFrameType
 * 
 * cdef enum cudaEglResourceLocationFlags_enum:             # <<<<<<<<<<<<<<
 *     cudaEglResourceLocationSysmem = 0
 *     cudaEglResourceLocationVidmem = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaEglResourceLocationFlags_enum {
  __pyx_e_4cuda_7ccudart_cudaEglResourceLocationSysmem = 0,
  __pyx_e_4cuda_7ccudart_cudaEglResourceLocationVidmem = 1
};

/* "cuda/ccudart.pxd":1729
 * ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags
 * 
 * cdef enum cudaEglColorFormat_enum:             # <<<<<<<<<<<<<<
 *     cudaEglColorFormatYUV420Planar = 0
 *     cudaEglColorFormatYUV420SemiPlanar = 1
 */
enum __pyx_t_4cuda_7ccudart_cudaEglColorFormat_enum {
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar = 0,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar = 1,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422Planar = 2,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422SemiPlanar = 3,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatARGB = 6,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatRGBA = 7,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatL = 8,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatR = 9,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444Planar = 10,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444SemiPlanar = 11,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUYV422 = 12,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatUYVY422 = 13,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatABGR = 14,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBGRA = 15,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatA = 16,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatRG = 17,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatAYUV = 18,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444SemiPlanar = 19,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422SemiPlanar = 20,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar = 21,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar = 22,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar = 23,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar = 24,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar = 25,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatVYUY_ER = 26,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatUYVY_ER = 27,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUYV_ER = 28,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVYU_ER = 29,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUVA_ER = 31,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatAYUV_ER = 32,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444Planar_ER = 33,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422Planar_ER = 34,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_ER = 35,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444SemiPlanar_ER = 36,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422SemiPlanar_ER = 37,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_ER = 38,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444Planar_ER = 39,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422Planar_ER = 40,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_ER = 41,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444SemiPlanar_ER = 42,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422SemiPlanar_ER = 43,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_ER = 44,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerRGGB = 45,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerBGGR = 46,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerGRBG = 47,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerGBRG = 48,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10RGGB = 49,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10BGGR = 50,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10GRBG = 51,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10GBRG = 52,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12RGGB = 53,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12BGGR = 54,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12GRBG = 55,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12GBRG = 56,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14RGGB = 57,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14BGGR = 58,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14GRBG = 59,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14GBRG = 60,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20RGGB = 61,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20BGGR = 62,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20GRBG = 63,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20GBRG = 64,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444Planar = 65,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422Planar = 66,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar = 67,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspRGGB = 68,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspBGGR = 69,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspGRBG = 70,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspGBRG = 71,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerBCCR = 72,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerRCCB = 73,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerCRBC = 74,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerCBRC = 75,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10CCCC = 76,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12BCCR = 77,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12RCCB = 78,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CRBC = 79,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CBRC = 80,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CCCC = 81,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY = 82,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_2020 = 83,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_2020 = 84,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_2020 = 85,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_2020 = 86,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_709 = 87,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_709 = 88,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_709 = 89,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_709 = 90,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar = 94,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY_ER = 96,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY_709_ER = 97,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10_ER = 98,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10_709_ER = 99,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12_ER = 0x64,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12_709_ER = 0x65,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUVA = 0x66,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVYU = 0x68,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatVYUY = 0x69,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 0x6A,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 0x6B,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 0x6C,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 0x6D,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 0x6E,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 0x6F,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 0x70,
  __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 0x71
};

/* "cuda/ccudart.pxd":1896
 * cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?cudaErrorCallRequiresNewerDriver
 * 
 * cdef enum: cudaHostAllocDefault = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostAllocPortable = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostAllocDefault = 0
};

/* "cuda/ccudart.pxd":1898
 * cdef enum: cudaHostAllocDefault = 0
 * 
 * cdef enum: cudaHostAllocPortable = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostAllocMapped = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostAllocPortable = 1
};

/* "cuda/ccudart.pxd":1900
 * cdef enum: cudaHostAllocPortable = 1
 * 
 * cdef enum: cudaHostAllocMapped = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostAllocWriteCombined = 4
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostAllocMapped = 2
};

/* "cuda/ccudart.pxd":1902
 * cdef enum: cudaHostAllocMapped = 2
 * 
 * cdef enum: cudaHostAllocWriteCombined = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterDefault = 0
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostAllocWriteCombined = 4
};

/* "cuda/ccudart.pxd":1904
 * cdef enum: cudaHostAllocWriteCombined = 4
 * 
 * cdef enum: cudaHostRegisterDefault = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterPortable = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterDefault = 0
};

/* "cuda/ccudart.pxd":1906
 * cdef enum: cudaHostRegisterDefault = 0
 * 
 * cdef enum: cudaHostRegisterPortable = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterMapped = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterPortable = 1
};

/* "cuda/ccudart.pxd":1908
 * cdef enum: cudaHostRegisterPortable = 1
 * 
 * cdef enum: cudaHostRegisterMapped = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterIoMemory = 4
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterMapped = 2
};

/* "cuda/ccudart.pxd":1910
 * cdef enum: cudaHostRegisterMapped = 2
 * 
 * cdef enum: cudaHostRegisterIoMemory = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaHostRegisterReadOnly = 8
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterIoMemory = 4
};

/* "cuda/ccudart.pxd":1912
 * cdef enum: cudaHostRegisterIoMemory = 4
 * 
 * cdef enum: cudaHostRegisterReadOnly = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaPeerAccessDefault = 0
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaHostRegisterReadOnly = 8
};

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

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

/* "cuda/ccudart.pxd":1918
 * cdef enum: cudaStreamDefault = 0
 * 
 * cdef enum: cudaStreamNonBlocking = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaStreamLegacy = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaStreamNonBlocking = 1
};

/* "cuda/ccudart.pxd":1920
 * cdef enum: cudaStreamNonBlocking = 1
 * 
 * cdef enum: cudaStreamLegacy = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaStreamPerThread = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaStreamLegacy = 1
};

/* "cuda/ccudart.pxd":1922
 * cdef enum: cudaStreamLegacy = 1
 * 
 * cdef enum: cudaStreamPerThread = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventDefault = 0
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaStreamPerThread = 2
};

/* "cuda/ccudart.pxd":1924
 * cdef enum: cudaStreamPerThread = 2
 * 
 * cdef enum: cudaEventDefault = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventBlockingSync = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventDefault = 0
};

/* "cuda/ccudart.pxd":1926
 * cdef enum: cudaEventDefault = 0
 * 
 * cdef enum: cudaEventBlockingSync = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventDisableTiming = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventBlockingSync = 1
};

/* "cuda/ccudart.pxd":1928
 * cdef enum: cudaEventBlockingSync = 1
 * 
 * cdef enum: cudaEventDisableTiming = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventInterprocess = 4
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventDisableTiming = 2
};

/* "cuda/ccudart.pxd":1930
 * cdef enum: cudaEventDisableTiming = 2
 * 
 * cdef enum: cudaEventInterprocess = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventRecordDefault = 0
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventInterprocess = 4
};

/* "cuda/ccudart.pxd":1932
 * cdef enum: cudaEventInterprocess = 4
 * 
 * cdef enum: cudaEventRecordDefault = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaEventRecordExternal = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaEventRecordDefault = 0
};

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

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

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

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

/* "cuda/ccudart.pxd":1942
 * cdef enum: cudaDeviceScheduleAuto = 0
 * 
 * cdef enum: cudaDeviceScheduleSpin = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceScheduleYield = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleSpin = 1
};

/* "cuda/ccudart.pxd":1944
 * cdef enum: cudaDeviceScheduleSpin = 1
 * 
 * cdef enum: cudaDeviceScheduleYield = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceScheduleBlockingSync = 4
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleYield = 2
};

/* "cuda/ccudart.pxd":1946
 * cdef enum: cudaDeviceScheduleYield = 2
 * 
 * cdef enum: cudaDeviceScheduleBlockingSync = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceBlockingSync = 4
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleBlockingSync = 4
};

/* "cuda/ccudart.pxd":1948
 * cdef enum: cudaDeviceScheduleBlockingSync = 4
 * 
 * cdef enum: cudaDeviceBlockingSync = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceScheduleMask = 7
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceBlockingSync = 4
};

/* "cuda/ccudart.pxd":1950
 * cdef enum: cudaDeviceBlockingSync = 4
 * 
 * cdef enum: cudaDeviceScheduleMask = 7             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceMapHost = 8
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceScheduleMask = 7
};

/* "cuda/ccudart.pxd":1952
 * cdef enum: cudaDeviceScheduleMask = 7
 * 
 * cdef enum: cudaDeviceMapHost = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceLmemResizeToMax = 16
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceMapHost = 8
};

/* "cuda/ccudart.pxd":1954
 * cdef enum: cudaDeviceMapHost = 8
 * 
 * cdef enum: cudaDeviceLmemResizeToMax = 16             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaDeviceMask = 31
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceLmemResizeToMax = 16
};

/* "cuda/ccudart.pxd":1956
 * cdef enum: cudaDeviceLmemResizeToMax = 16
 * 
 * cdef enum: cudaDeviceMask = 31             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayDefault = 0
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaDeviceMask = 31
};

/* "cuda/ccudart.pxd":1958
 * cdef enum: cudaDeviceMask = 31
 * 
 * cdef enum: cudaArrayDefault = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayLayered = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayDefault = 0
};

/* "cuda/ccudart.pxd":1960
 * cdef enum: cudaArrayDefault = 0
 * 
 * cdef enum: cudaArrayLayered = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArraySurfaceLoadStore = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayLayered = 1
};

/* "cuda/ccudart.pxd":1962
 * cdef enum: cudaArrayLayered = 1
 * 
 * cdef enum: cudaArraySurfaceLoadStore = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayCubemap = 4
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArraySurfaceLoadStore = 2
};

/* "cuda/ccudart.pxd":1964
 * cdef enum: cudaArraySurfaceLoadStore = 2
 * 
 * cdef enum: cudaArrayCubemap = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayTextureGather = 8
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayCubemap = 4
};

/* "cuda/ccudart.pxd":1966
 * cdef enum: cudaArrayCubemap = 4
 * 
 * cdef enum: cudaArrayTextureGather = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayColorAttachment = 32
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayTextureGather = 8
};

/* "cuda/ccudart.pxd":1968
 * cdef enum: cudaArrayTextureGather = 8
 * 
 * cdef enum: cudaArrayColorAttachment = 32             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArraySparse = 64
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayColorAttachment = 32
};

/* "cuda/ccudart.pxd":1970
 * cdef enum: cudaArrayColorAttachment = 32
 * 
 * cdef enum: cudaArraySparse = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArrayDeferredMapping = 128
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArraySparse = 64
};

/* "cuda/ccudart.pxd":1972
 * cdef enum: cudaArraySparse = 64
 * 
 * cdef enum: cudaArrayDeferredMapping = 128             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArrayDeferredMapping = 0x80
};

/* "cuda/ccudart.pxd":1974
 * cdef enum: cudaArrayDeferredMapping = 128
 * 
 * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaMemAttachGlobal = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaIpcMemLazyEnablePeerAccess = 1
};

/* "cuda/ccudart.pxd":1976
 * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1
 * 
 * cdef enum: cudaMemAttachGlobal = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaMemAttachHost = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaMemAttachGlobal = 1
};

/* "cuda/ccudart.pxd":1978
 * cdef enum: cudaMemAttachGlobal = 1
 * 
 * cdef enum: cudaMemAttachHost = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaMemAttachSingle = 4
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaMemAttachHost = 2
};

/* "cuda/ccudart.pxd":1980
 * cdef enum: cudaMemAttachHost = 2
 * 
 * cdef enum: cudaMemAttachSingle = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaOccupancyDefault = 0
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaMemAttachSingle = 4
};

/* "cuda/ccudart.pxd":1982
 * cdef enum: cudaMemAttachSingle = 4
 * 
 * cdef enum: cudaOccupancyDefault = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaOccupancyDisableCachingOverride = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaOccupancyDefault = 0
};

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

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

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

/* "cuda/ccudart.pxd":1990
 * cdef enum: cudaInvalidDeviceId = -2
 * 
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaCooperativeLaunchMultiDeviceNoPreSync = 1
};

/* "cuda/ccudart.pxd":1992
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1
 * 
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaCooperativeLaunchMultiDeviceNoPostSync = 2
};

/* "cuda/ccudart.pxd":1994
 * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2
 * 
 * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaArraySparsePropertiesSingleMipTail = 1
};

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

/* "cuda/ccudart.pxd":1998
 * cdef enum: CUDA_IPC_HANDLE_SIZE = 64
 * 
 * cdef enum: cudaExternalMemoryDedicated = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaExternalMemoryDedicated = 1
};

/* "cuda/ccudart.pxd":2000
 * cdef enum: cudaExternalMemoryDedicated = 1
 * 
 * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1
};

/* "cuda/ccudart.pxd":2002
 * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1
 * 
 * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaNvSciSyncAttrSignal = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2
};

/* "cuda/ccudart.pxd":2004
 * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2
 * 
 * cdef enum: cudaNvSciSyncAttrSignal = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaNvSciSyncAttrWait = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaNvSciSyncAttrSignal = 1
};

/* "cuda/ccudart.pxd":2006
 * cdef enum: cudaNvSciSyncAttrSignal = 1
 * 
 * cdef enum: cudaNvSciSyncAttrWait = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType1D = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaNvSciSyncAttrWait = 2
};

/* "cuda/ccudart.pxd":2008
 * cdef enum: cudaNvSciSyncAttrWait = 2
 * 
 * cdef enum: cudaSurfaceType1D = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType2D = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType1D = 1
};

/* "cuda/ccudart.pxd":2010
 * cdef enum: cudaSurfaceType1D = 1
 * 
 * cdef enum: cudaSurfaceType2D = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType3D = 3
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType2D = 2
};

/* "cuda/ccudart.pxd":2012
 * cdef enum: cudaSurfaceType2D = 2
 * 
 * cdef enum: cudaSurfaceType3D = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceTypeCubemap = 12
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType3D = 3
};

/* "cuda/ccudart.pxd":2014
 * cdef enum: cudaSurfaceType3D = 3
 * 
 * cdef enum: cudaSurfaceTypeCubemap = 12             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType1DLayered = 241
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceTypeCubemap = 12
};

/* "cuda/ccudart.pxd":2016
 * cdef enum: cudaSurfaceTypeCubemap = 12
 * 
 * cdef enum: cudaSurfaceType1DLayered = 241             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceType2DLayered = 242
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType1DLayered = 0xF1
};

/* "cuda/ccudart.pxd":2018
 * cdef enum: cudaSurfaceType1DLayered = 241
 * 
 * cdef enum: cudaSurfaceType2DLayered = 242             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaSurfaceTypeCubemapLayered = 252
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceType2DLayered = 0xF2
};

/* "cuda/ccudart.pxd":2020
 * cdef enum: cudaSurfaceType2DLayered = 242
 * 
 * cdef enum: cudaSurfaceTypeCubemapLayered = 252             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType1D = 1
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaSurfaceTypeCubemapLayered = 0xFC
};

/* "cuda/ccudart.pxd":2022
 * cdef enum: cudaSurfaceTypeCubemapLayered = 252
 * 
 * cdef enum: cudaTextureType1D = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType2D = 2
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType1D = 1
};

/* "cuda/ccudart.pxd":2024
 * cdef enum: cudaTextureType1D = 1
 * 
 * cdef enum: cudaTextureType2D = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType3D = 3
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType2D = 2
};

/* "cuda/ccudart.pxd":2026
 * cdef enum: cudaTextureType2D = 2
 * 
 * cdef enum: cudaTextureType3D = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureTypeCubemap = 12
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType3D = 3
};

/* "cuda/ccudart.pxd":2028
 * cdef enum: cudaTextureType3D = 3
 * 
 * cdef enum: cudaTextureTypeCubemap = 12             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType1DLayered = 241
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureTypeCubemap = 12
};

/* "cuda/ccudart.pxd":2030
 * cdef enum: cudaTextureTypeCubemap = 12
 * 
 * cdef enum: cudaTextureType1DLayered = 241             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureType2DLayered = 242
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType1DLayered = 0xF1
};

/* "cuda/ccudart.pxd":2032
 * cdef enum: cudaTextureType1DLayered = 241
 * 
 * cdef enum: cudaTextureType2DLayered = 242             # <<<<<<<<<<<<<<
 * 
 * cdef enum: cudaTextureTypeCubemapLayered = 252
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureType2DLayered = 0xF2
};

/* "cuda/ccudart.pxd":2034
 * cdef enum: cudaTextureType2DLayered = 242
 * 
 * cdef enum: cudaTextureTypeCubemapLayered = 252             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDART_VERSION = 11060
 */
enum  {
  __pyx_e_4cuda_7ccudart_cudaTextureTypeCubemapLayered = 0xFC
};

/* "cuda/ccudart.pxd":2036
 * cdef enum: cudaTextureTypeCubemapLayered = 252
 * 
 * cdef enum: CUDART_VERSION = 11060             # <<<<<<<<<<<<<<
 * 
 * cdef enum: __CUDART_API_VERSION = 11060
 */
enum  {
  __pyx_e_4cuda_7ccudart_CUDART_VERSION = 0x2B34
};

/* "cuda/ccudart.pxd":2038
 * cdef enum: CUDART_VERSION = 11060
 * 
 * cdef enum: __CUDART_API_VERSION = 11060             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EGL_MAX_PLANES = 3
 */
enum  {
  __pyx_e_4cuda_7ccudart___CUDART_API_VERSION = 0x2B34
};

/* "cuda/ccudart.pxd":2040
 * cdef enum: __CUDART_API_VERSION = 11060
 * 
 * cdef enum: CUDA_EGL_MAX_PLANES = 3             # <<<<<<<<<<<<<<
 */
enum  {
  __pyx_e_4cuda_7ccudart_CUDA_EGL_MAX_PLANES = 3
};

/* "cuda/ccudart.pxd":15
 *     cudaRoundMinInf = 3
 * 
 * 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":219
 *     unsigned int reserved[4]
 * 
 * cdef struct cudaArrayMemoryRequirements:             # <<<<<<<<<<<<<<
 *     size_t size
 *     size_t alignment
 */
struct __pyx_t_4cuda_7ccudart_cudaArrayMemoryRequirements {
  size_t size;
  size_t alignment;
  unsigned int reserved[4];
};

/* "cuda/ccudart.pxd":237
 *     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":243
 *     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":248
 *     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":253
 *     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":263
 *     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":274
 *     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":287
 *     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":294
 *     cudaAccessProperty missProp
 * 
 * ctypedef void (*cudaHostFn_t)(void* userData)             # <<<<<<<<<<<<<<
 * 
 * cdef struct cudaHostNodeParams:
 */
typedef void (*__pyx_t_4cuda_7ccudart_cudaHostFn_t)(void *);

/* "cuda/ccudart.pxd":296
 * 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":320
 *     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":359
 *     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":406
 *     cudaResViewFormatUnsignedBlockCompressed7 = 34
 * 
 * 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":409
 *     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":412
 *     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":417
 *     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":424
 *     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":430
 *     _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":434
 *     _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":444
 *     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":450
 *     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":663
 *     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":672
 *     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":687
 *     cudaMemHandleTypeWin32Kmt = 4
 * 
 * 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":694
 *     unsigned char reserved[64]
 * 
 * cdef struct cudaMemPoolPtrExportData:             # <<<<<<<<<<<<<<
 *     unsigned char reserved[64]
 * 
 */
struct __pyx_t_4cuda_7ccudart_cudaMemPoolPtrExportData {
  unsigned char reserved[64];
};

/* "cuda/ccudart.pxd":697
 *     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":716
 *     cudaDevP2PAttrCudaArrayAccessSupported = 4
 * 
 * cdef struct CUuuid_st:             # <<<<<<<<<<<<<<
 *     char bytes[16]
 * 
 */
struct __pyx_t_4cuda_7ccudart_CUuuid_st {
  char bytes[16];
};

/* "cuda/ccudart.pxd":719
 *     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":721
 * 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":723
 * 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":805
 *     size_t reservedSharedMemPerBlock
 * 
 * cdef struct cudaIpcEventHandle_st:             # <<<<<<<<<<<<<<
 *     char reserved[64]
 * 
 */
struct __pyx_t_4cuda_7ccudart_cudaIpcEventHandle_st {
  char reserved[64];
};

/* "cuda/ccudart.pxd":808
 *     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":810
 * 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":813
 *     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":825
 *     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":829
 *     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":834
 *     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":840
 *     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":845
 *     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":864
 *     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":868
 *     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":873
 *     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":878
 *     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":881
 *     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":885
 *     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":888
 *     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":894
 *     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":899
 *     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":902
 *     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":906
 *     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":910
 *     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":916
 *     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":921
 *     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":926
 *     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":931
 *     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":936
 *     cdef struct cudaGraphicsResource:
 *         pass
 * ctypedef cudaGraphicsResource* cudaGraphicsResource_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef cudaOutputMode cudaOutputMode_t
 */
typedef struct cudaGraphicsResource *__pyx_t_4cuda_7ccudart_cudaGraphicsResource_t;

/* "cuda/ccudart.pxd":938
 * 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":943
 *     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":948
 *     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":953
 *     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":958
 *     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":963
 *     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":968
 *     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":973
 *     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":980
 *     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":988
 *     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":993
 *     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":1016
 *     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":1074
 *     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;
  int seamlessCubemap;
};

/* "cuda/ccudart.pxd":1121
 *     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":1128
 *     PATCH_LEVEL = 2
 * 
 * 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":1234
 * 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 *);

/* "cuda/ccudart.pxd":1671
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLImageKHR             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef void *__pyx_t_4cuda_7ccudart_EGLImageKHR;

/* "cuda/ccudart.pxd":1676
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLStreamKHR             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int EGLint
 */
typedef void *__pyx_t_4cuda_7ccudart_EGLStreamKHR;

/* "cuda/ccudart.pxd":1683
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLSyncKHR             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpDevice
 */
typedef void *__pyx_t_4cuda_7ccudart_EGLSyncKHR;

/* "cuda/ccudart.pxd":1721
 *     cudaEglFrameTypePitch = 1
 * 
 * ctypedef cudaEglFrameType_enum cudaEglFrameType             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaEglResourceLocationFlags_enum:
 */
typedef enum __pyx_t_4cuda_7ccudart_cudaEglFrameType_enum __pyx_t_4cuda_7ccudart_cudaEglFrameType;

/* "cuda/ccudart.pxd":1727
 *     cudaEglResourceLocationVidmem = 1
 * 
 * ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaEglColorFormat_enum:
 */
typedef enum __pyx_t_4cuda_7ccudart_cudaEglResourceLocationFlags_enum __pyx_t_4cuda_7ccudart_cudaEglResourceLocationFlags;

/* "cuda/ccudart.pxd":1841
 *     cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 113
 * 
 * ctypedef cudaEglColorFormat_enum cudaEglColorFormat             # <<<<<<<<<<<<<<
 * 
 * cdef struct cudaEglPlaneDesc_st:
 */
typedef enum __pyx_t_4cuda_7ccudart_cudaEglColorFormat_enum __pyx_t_4cuda_7ccudart_cudaEglColorFormat;

/* "cuda/ccudart.pxd":1843
 * ctypedef cudaEglColorFormat_enum cudaEglColorFormat
 * 
 * cdef struct cudaEglPlaneDesc_st:             # <<<<<<<<<<<<<<
 *     unsigned int width
 *     unsigned int height
 */
struct __pyx_t_4cuda_7ccudart_cudaEglPlaneDesc_st {
  unsigned int width;
  unsigned int height;
  unsigned int depth;
  unsigned int pitch;
  unsigned int numChannels;
  struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc channelDesc;
  unsigned int reserved[4];
};

/* "cuda/ccudart.pxd":1852
 *     unsigned int reserved[4]
 * 
 * ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc             # <<<<<<<<<<<<<<
 * 
 * cdef union _cudaEglFrame_cudaEglFrame_cudaEglFrame_st_frame_u:
 */
typedef struct __pyx_t_4cuda_7ccudart_cudaEglPlaneDesc_st __pyx_t_4cuda_7ccudart_cudaEglPlaneDesc;

/* "cuda/ccudart.pxd":1854
 * ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc
 * 
 * cdef union _cudaEglFrame_cudaEglFrame_cudaEglFrame_st_frame_u:             # <<<<<<<<<<<<<<
 *     cudaArray_t pArray[3]
 *     cudaPitchedPtr pPitch[3]
 */
union __pyx_t_4cuda_7ccudart__cudaEglFrame_cudaEglFrame_cudaEglFrame_st_frame_u {
  __pyx_t_4cuda_7ccudart_cudaArray_t pArray[3];
  struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr pPitch[3];
};

/* "cuda/ccudart.pxd":1858
 *     cudaPitchedPtr pPitch[3]
 * 
 * cdef struct cudaEglFrame_st:             # <<<<<<<<<<<<<<
 *     _cudaEglFrame_cudaEglFrame_cudaEglFrame_st_frame_u frame
 *     cudaEglPlaneDesc planeDesc[3]
 */
struct __pyx_t_4cuda_7ccudart_cudaEglFrame_st {
  union __pyx_t_4cuda_7ccudart__cudaEglFrame_cudaEglFrame_cudaEglFrame_st_frame_u frame;
  __pyx_t_4cuda_7ccudart_cudaEglPlaneDesc planeDesc[3];
  unsigned int planeCount;
  __pyx_t_4cuda_7ccudart_cudaEglFrameType frameType;
  __pyx_t_4cuda_7ccudart_cudaEglColorFormat eglColorFormat;
};

/* "cuda/ccudart.pxd":1865
 *     cudaEglColorFormat eglColorFormat
 * 
 * ctypedef cudaEglFrame_st cudaEglFrame             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct __pyx_t_4cuda_7ccudart_cudaEglFrame_st __pyx_t_4cuda_7ccudart_cudaEglFrame;

/* "cuda/ccudart.pxd":1870
 *     cdef struct CUeglStreamConnection_st:
 *         pass
 * ctypedef CUeglStreamConnection_st* cudaEglStreamConnection             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?cudaErrorCallRequiresNewerDriver
 */
typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_7ccudart_cudaEglStreamConnection;
struct __pyx_t_4cuda_5ccuda_CUuuid_st;
struct __pyx_t_4cuda_5ccuda_CUipcEventHandle_st;
struct __pyx_t_4cuda_5ccuda_CUipcMemHandle_st;
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWaitValueParams_st;
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWriteValueParams_st;
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpFlushRemoteWritesParams_st;
union __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_union;
struct __pyx_t_4cuda_5ccuda_CUdevprop_st;
struct __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_st;
struct __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_st;
union __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_union;
union __pyx_t_4cuda_5ccuda_CUstreamAttrValue_union;
struct __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_st;
union __pyx_t_4cuda_5ccuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u;
struct __pyx_t_4cuda_5ccuda_CUexecAffinityParam_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_st;
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_st;
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_st;
struct __pyx_t_4cuda_5ccuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s;
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_st;
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s;
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s;
union __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u;
struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_st;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s;
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s;
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s;
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s;
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s;
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s;
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u;
struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s;
struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s;
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u;
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u;
struct __pyx_t_4cuda_5ccuda_CUarrayMapInfo_st;
struct __pyx_t_4cuda_5ccuda_CUmemLocation_st;
struct __pyx_t_4cuda_5ccuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s;
struct __pyx_t_4cuda_5ccuda_CUmemAllocationProp_st;
struct __pyx_t_4cuda_5ccuda_CUmemAccessDesc_st;
struct __pyx_t_4cuda_5ccuda_CUmemPoolProps_st;
struct __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_st;
struct __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS_st;
union __pyx_t_4cuda_5ccuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u;
struct __pyx_t_4cuda_5ccuda_CUeglFrame_st;

/* "cuda/ccuda.pxd":135
 * ctypedef CUipcMemHandle_v1 CUipcMemHandle
 * 
 * cdef enum CUipcMem_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUipcMem_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1
};

/* "cuda/ccuda.pxd":140
 * ctypedef CUipcMem_flags_enum CUipcMem_flags
 * 
 * cdef enum CUmemAttach_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ATTACH_GLOBAL = 1
 *     CU_MEM_ATTACH_HOST = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmemAttach_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ATTACH_GLOBAL = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_ATTACH_HOST = 2,
  __pyx_e_4cuda_5ccuda_CU_MEM_ATTACH_SINGLE = 4
};

/* "cuda/ccuda.pxd":147
 * ctypedef CUmemAttach_flags_enum CUmemAttach_flags
 * 
 * cdef enum CUctx_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_CTX_SCHED_AUTO = 0
 *     CU_CTX_SCHED_SPIN = 1
 */
enum __pyx_t_4cuda_5ccuda_CUctx_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_AUTO = 0,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_SPIN = 1,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_YIELD = 2,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_BLOCKING_SYNC = 4,
  __pyx_e_4cuda_5ccuda_CU_CTX_BLOCKING_SYNC = 4,
  __pyx_e_4cuda_5ccuda_CU_CTX_SCHED_MASK = 7,
  __pyx_e_4cuda_5ccuda_CU_CTX_MAP_HOST = 8,
  __pyx_e_4cuda_5ccuda_CU_CTX_LMEM_RESIZE_TO_MAX = 16,
  __pyx_e_4cuda_5ccuda_CU_CTX_FLAGS_MASK = 31
};

/* "cuda/ccuda.pxd":160
 * ctypedef CUctx_flags_enum CUctx_flags
 * 
 * cdef enum CUstream_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_DEFAULT = 0
 *     CU_STREAM_NON_BLOCKING = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstream_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_NON_BLOCKING = 1
};

/* "cuda/ccuda.pxd":166
 * ctypedef CUstream_flags_enum CUstream_flags
 * 
 * cdef enum CUevent_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_EVENT_DEFAULT = 0
 *     CU_EVENT_BLOCKING_SYNC = 1
 */
enum __pyx_t_4cuda_5ccuda_CUevent_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_EVENT_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_EVENT_BLOCKING_SYNC = 1,
  __pyx_e_4cuda_5ccuda_CU_EVENT_DISABLE_TIMING = 2,
  __pyx_e_4cuda_5ccuda_CU_EVENT_INTERPROCESS = 4
};

/* "cuda/ccuda.pxd":174
 * ctypedef CUevent_flags_enum CUevent_flags
 * 
 * cdef enum CUevent_record_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_EVENT_RECORD_DEFAULT = 0
 *     CU_EVENT_RECORD_EXTERNAL = 1
 */
enum __pyx_t_4cuda_5ccuda_CUevent_record_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_EVENT_RECORD_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_EVENT_RECORD_EXTERNAL = 1
};

/* "cuda/ccuda.pxd":180
 * ctypedef CUevent_record_flags_enum CUevent_record_flags
 * 
 * cdef enum CUevent_wait_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_EVENT_WAIT_DEFAULT = 0
 *     CU_EVENT_WAIT_EXTERNAL = 1
 */
enum __pyx_t_4cuda_5ccuda_CUevent_wait_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_EVENT_WAIT_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_EVENT_WAIT_EXTERNAL = 1
};

/* "cuda/ccuda.pxd":186
 * ctypedef CUevent_wait_flags_enum CUevent_wait_flags
 * 
 * cdef enum CUstreamWaitValue_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_WAIT_VALUE_GEQ = 0
 *     CU_STREAM_WAIT_VALUE_EQ = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamWaitValue_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_GEQ = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_EQ = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_AND = 2,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_NOR = 3,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WAIT_VALUE_FLUSH = 0x40000000
};

/* "cuda/ccuda.pxd":195
 * ctypedef CUstreamWaitValue_flags_enum CUstreamWaitValue_flags
 * 
 * cdef enum CUstreamWriteValue_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_WRITE_VALUE_DEFAULT = 0
 *     CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamWriteValue_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_WRITE_VALUE_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1
};

/* "cuda/ccuda.pxd":201
 * ctypedef CUstreamWriteValue_flags_enum CUstreamWriteValue_flags
 * 
 * cdef enum CUstreamBatchMemOpType_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1
 *     CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2
 */
enum __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2,
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_WAIT_VALUE_64 = 4,
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_WRITE_VALUE_64 = 5,
  __pyx_e_4cuda_5ccuda_CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3
};

/* "cuda/ccuda.pxd":239
 * ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams
 * 
 * cdef enum CUoccupancy_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_OCCUPANCY_DEFAULT = 0
 *     CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUoccupancy_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_OCCUPANCY_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1
};

/* "cuda/ccuda.pxd":245
 * ctypedef CUoccupancy_flags_enum CUoccupancy_flags
 * 
 * cdef enum CUstreamUpdateCaptureDependencies_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_ADD_CAPTURE_DEPENDENCIES = 0
 *     CU_STREAM_SET_CAPTURE_DEPENDENCIES = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamUpdateCaptureDependencies_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ADD_CAPTURE_DEPENDENCIES = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_SET_CAPTURE_DEPENDENCIES = 1
};

/* "cuda/ccuda.pxd":251
 * ctypedef CUstreamUpdateCaptureDependencies_flags_enum CUstreamUpdateCaptureDependencies_flags
 * 
 * cdef enum CUarray_format_enum:             # <<<<<<<<<<<<<<
 *     CU_AD_FORMAT_UNSIGNED_INT8 = 1
 *     CU_AD_FORMAT_UNSIGNED_INT16 = 2
 */
enum __pyx_t_4cuda_5ccuda_CUarray_format_enum {
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8 = 1,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16 = 2,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32 = 3,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8 = 8,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16 = 9,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32 = 10,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF = 16,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT = 32,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_NV12 = 0xB0,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X1 = 0xC0,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X2 = 0xC1,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X4 = 0xC2,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X1 = 0xC3,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X2 = 0xC4,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X4 = 0xC5,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X1 = 0xC6,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X2 = 0xC7,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X4 = 0xC8,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X1 = 0xC9,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X2 = 0xCA,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X4 = 0xCB,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM = 0x91,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM_SRGB = 0x92,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM = 0x93,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM_SRGB = 0x94,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM = 0x95,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM_SRGB = 0x96,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_UNORM = 0x97,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_SNORM = 0x98,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_UNORM = 0x99,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_SNORM = 0x9A,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_UF16 = 0x9B,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_SF16 = 0x9C,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM = 0x9D,
  __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM_SRGB = 0x9E
};

/* "cuda/ccuda.pxd":290
 * ctypedef CUarray_format_enum CUarray_format
 * 
 * cdef enum CUaddress_mode_enum:             # <<<<<<<<<<<<<<
 *     CU_TR_ADDRESS_MODE_WRAP = 0
 *     CU_TR_ADDRESS_MODE_CLAMP = 1
 */
enum __pyx_t_4cuda_5ccuda_CUaddress_mode_enum {
  __pyx_e_4cuda_5ccuda_CU_TR_ADDRESS_MODE_WRAP = 0,
  __pyx_e_4cuda_5ccuda_CU_TR_ADDRESS_MODE_CLAMP = 1,
  __pyx_e_4cuda_5ccuda_CU_TR_ADDRESS_MODE_MIRROR = 2,
  __pyx_e_4cuda_5ccuda_CU_TR_ADDRESS_MODE_BORDER = 3
};

/* "cuda/ccuda.pxd":298
 * ctypedef CUaddress_mode_enum CUaddress_mode
 * 
 * cdef enum CUfilter_mode_enum:             # <<<<<<<<<<<<<<
 *     CU_TR_FILTER_MODE_POINT = 0
 *     CU_TR_FILTER_MODE_LINEAR = 1
 */
enum __pyx_t_4cuda_5ccuda_CUfilter_mode_enum {
  __pyx_e_4cuda_5ccuda_CU_TR_FILTER_MODE_POINT = 0,
  __pyx_e_4cuda_5ccuda_CU_TR_FILTER_MODE_LINEAR = 1
};

/* "cuda/ccuda.pxd":304
 * ctypedef CUfilter_mode_enum CUfilter_mode
 * 
 * cdef enum CUdevice_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1
 *     CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2
 */
enum __pyx_t_4cuda_5ccuda_CUdevice_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = 3,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = 4,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = 6,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = 7,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = 8,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = 8,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = 9,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_WARP_SIZE = 10,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_PITCH = 11,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = 12,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = 12,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = 15,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = 17,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_INTEGRATED = 18,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = 20,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = 21,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = 22,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = 23,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = 24,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = 25,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = 26,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = 27,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = 28,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = 29,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = 27,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = 28,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = 29,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = 30,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = 31,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_ECC_ENABLED = 32,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = 33,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = 34,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TCC_DRIVER = 35,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = 36,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = 37,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = 38,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = 39,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = 40,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = 41,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = 42,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = 43,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = 44,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = 45,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = 46,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = 47,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = 48,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = 49,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = 50,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = 51,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = 52,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = 53,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = 54,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = 55,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = 56,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = 57,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = 58,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = 59,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = 60,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = 61,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = 62,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = 63,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = 64,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = 65,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = 66,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = 67,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = 68,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = 69,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = 70,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = 71,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = 72,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = 73,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = 74,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = 77,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = 78,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = 79,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = 80,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = 81,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = 82,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = 84,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = 85,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = 86,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = 87,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = 88,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = 89,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = 90,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = 91,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS = 92,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = 93,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = 94,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = 95,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = 96,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = 97,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = 98,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = 99,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = 0x64,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = 0x65,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = 0x66,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = 0x66,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = 0x67,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = 0x68,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = 0x69,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = 0x6A,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = 0x6B,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = 0x6C,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = 0x6D,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = 0x6E,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = 0x6F,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = 0x70,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = 0x71,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = 0x72,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = 0x73,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = 0x74,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = 0x75,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = 0x76,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = 0x77,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = 0x79,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX = 0x7A
};

/* "cuda/ccuda.pxd":451
 * ctypedef CUdevprop_v1 CUdevprop
 * 
 * cdef enum CUpointer_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_POINTER_ATTRIBUTE_CONTEXT = 1
 *     CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2
 */
enum __pyx_t_4cuda_5ccuda_CUpointer_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_CONTEXT = 1,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_DEVICE_POINTER = 3,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_HOST_POINTER = 4,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_P2P_TOKENS = 5,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_BUFFER_ID = 7,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_IS_MANAGED = 8,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = 10,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_RANGE_SIZE = 12,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_MAPPED = 13,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17
};

/* "cuda/ccuda.pxd":472
 * ctypedef CUpointer_attribute_enum CUpointer_attribute
 * 
 * cdef enum CUfunction_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0
 *     CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1
 */
enum __pyx_t_4cuda_5ccuda_CUfunction_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_NUM_REGS = 4,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_PTX_VERSION = 5,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_BINARY_VERSION = 6,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9,
  __pyx_e_4cuda_5ccuda_CU_FUNC_ATTRIBUTE_MAX = 10
};

/* "cuda/ccuda.pxd":487
 * ctypedef CUfunction_attribute_enum CUfunction_attribute
 * 
 * cdef enum CUfunc_cache_enum:             # <<<<<<<<<<<<<<
 *     CU_FUNC_CACHE_PREFER_NONE = 0
 *     CU_FUNC_CACHE_PREFER_SHARED = 1
 */
enum __pyx_t_4cuda_5ccuda_CUfunc_cache_enum {
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_SHARED = 1,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_L1 = 2,
  __pyx_e_4cuda_5ccuda_CU_FUNC_CACHE_PREFER_EQUAL = 3
};

/* "cuda/ccuda.pxd":495
 * ctypedef CUfunc_cache_enum CUfunc_cache
 * 
 * cdef enum CUsharedconfig_enum:             # <<<<<<<<<<<<<<
 *     CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0
 *     CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUsharedconfig_enum {
  __pyx_e_4cuda_5ccuda_CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0,
  __pyx_e_4cuda_5ccuda_CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1,
  __pyx_e_4cuda_5ccuda_CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2
};

/* "cuda/ccuda.pxd":502
 * ctypedef CUsharedconfig_enum CUsharedconfig
 * 
 * cdef enum CUshared_carveout_enum:             # <<<<<<<<<<<<<<
 *     CU_SHAREDMEM_CARVEOUT_DEFAULT = -1
 *     CU_SHAREDMEM_CARVEOUT_MAX_SHARED = 100
 */
enum __pyx_t_4cuda_5ccuda_CUshared_carveout_enum {
  __pyx_e_4cuda_5ccuda_CU_SHAREDMEM_CARVEOUT_DEFAULT = -1L,
  __pyx_e_4cuda_5ccuda_CU_SHAREDMEM_CARVEOUT_MAX_SHARED = 0x64,
  __pyx_e_4cuda_5ccuda_CU_SHAREDMEM_CARVEOUT_MAX_L1 = 0
};

/* "cuda/ccuda.pxd":509
 * ctypedef CUshared_carveout_enum CUshared_carveout
 * 
 * cdef enum CUmemorytype_enum:             # <<<<<<<<<<<<<<
 *     CU_MEMORYTYPE_HOST = 1
 *     CU_MEMORYTYPE_DEVICE = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum {
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST = 1,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE = 2,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY = 3,
  __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED = 4
};

/* "cuda/ccuda.pxd":517
 * ctypedef CUmemorytype_enum CUmemorytype
 * 
 * cdef enum CUcomputemode_enum:             # <<<<<<<<<<<<<<
 *     CU_COMPUTEMODE_DEFAULT = 0
 *     CU_COMPUTEMODE_PROHIBITED = 2
 */
enum __pyx_t_4cuda_5ccuda_CUcomputemode_enum {
  __pyx_e_4cuda_5ccuda_CU_COMPUTEMODE_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_COMPUTEMODE_PROHIBITED = 2,
  __pyx_e_4cuda_5ccuda_CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3
};

/* "cuda/ccuda.pxd":524
 * ctypedef CUcomputemode_enum CUcomputemode
 * 
 * cdef enum CUmem_advise_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ADVISE_SET_READ_MOSTLY = 1
 *     CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmem_advise_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_SET_READ_MOSTLY = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_SET_PREFERRED_LOCATION = 3,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = 4,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_SET_ACCESSED_BY = 5,
  __pyx_e_4cuda_5ccuda_CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6
};

/* "cuda/ccuda.pxd":534
 * ctypedef CUmem_advise_enum CUmem_advise
 * 
 * cdef enum CUmem_range_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1
 *     CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmem_range_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2,
  __pyx_e_4cuda_5ccuda_CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = 3,
  __pyx_e_4cuda_5ccuda_CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4
};

/* "cuda/ccuda.pxd":542
 * ctypedef CUmem_range_attribute_enum CUmem_range_attribute
 * 
 * cdef enum CUjit_option_enum:             # <<<<<<<<<<<<<<
 *     CU_JIT_MAX_REGISTERS = 0
 *     CU_JIT_THREADS_PER_BLOCK = 1
 */
enum __pyx_t_4cuda_5ccuda_CUjit_option_enum {
  __pyx_e_4cuda_5ccuda_CU_JIT_MAX_REGISTERS = 0,
  __pyx_e_4cuda_5ccuda_CU_JIT_THREADS_PER_BLOCK = 1,
  __pyx_e_4cuda_5ccuda_CU_JIT_WALL_TIME = 2,
  __pyx_e_4cuda_5ccuda_CU_JIT_INFO_LOG_BUFFER = 3,
  __pyx_e_4cuda_5ccuda_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = 4,
  __pyx_e_4cuda_5ccuda_CU_JIT_ERROR_LOG_BUFFER = 5,
  __pyx_e_4cuda_5ccuda_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6,
  __pyx_e_4cuda_5ccuda_CU_JIT_OPTIMIZATION_LEVEL = 7,
  __pyx_e_4cuda_5ccuda_CU_JIT_TARGET_FROM_CUCONTEXT = 8,
  __pyx_e_4cuda_5ccuda_CU_JIT_TARGET = 9,
  __pyx_e_4cuda_5ccuda_CU_JIT_FALLBACK_STRATEGY = 10,
  __pyx_e_4cuda_5ccuda_CU_JIT_GENERATE_DEBUG_INFO = 11,
  __pyx_e_4cuda_5ccuda_CU_JIT_LOG_VERBOSE = 12,
  __pyx_e_4cuda_5ccuda_CU_JIT_GENERATE_LINE_INFO = 13,
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_MODE = 14,
  __pyx_e_4cuda_5ccuda_CU_JIT_NEW_SM3X_OPT = 15,
  __pyx_e_4cuda_5ccuda_CU_JIT_FAST_COMPILE = 16,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_NAMES = 17,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_ADDRESSES = 18,
  __pyx_e_4cuda_5ccuda_CU_JIT_GLOBAL_SYMBOL_COUNT = 19,
  __pyx_e_4cuda_5ccuda_CU_JIT_LTO = 20,
  __pyx_e_4cuda_5ccuda_CU_JIT_FTZ = 21,
  __pyx_e_4cuda_5ccuda_CU_JIT_PREC_DIV = 22,
  __pyx_e_4cuda_5ccuda_CU_JIT_PREC_SQRT = 23,
  __pyx_e_4cuda_5ccuda_CU_JIT_FMA = 24,
  __pyx_e_4cuda_5ccuda_CU_JIT_NUM_OPTIONS = 25
};

/* "cuda/ccuda.pxd":572
 * ctypedef CUjit_option_enum CUjit_option
 * 
 * cdef enum CUjit_target_enum:             # <<<<<<<<<<<<<<
 *     CU_TARGET_COMPUTE_20 = 20
 *     CU_TARGET_COMPUTE_21 = 21
 */
enum __pyx_t_4cuda_5ccuda_CUjit_target_enum {
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_20 = 20,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_21 = 21,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_30 = 30,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_32 = 32,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_35 = 35,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_37 = 37,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_50 = 50,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_52 = 52,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_53 = 53,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_60 = 60,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_61 = 61,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_62 = 62,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_70 = 70,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_72 = 72,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_75 = 75,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_80 = 80,
  __pyx_e_4cuda_5ccuda_CU_TARGET_COMPUTE_86 = 86
};

/* "cuda/ccuda.pxd":593
 * ctypedef CUjit_target_enum CUjit_target
 * 
 * cdef enum CUjit_fallback_enum:             # <<<<<<<<<<<<<<
 *     CU_PREFER_PTX = 0
 *     CU_PREFER_BINARY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUjit_fallback_enum {
  __pyx_e_4cuda_5ccuda_CU_PREFER_PTX = 0,
  __pyx_e_4cuda_5ccuda_CU_PREFER_BINARY = 1
};

/* "cuda/ccuda.pxd":599
 * ctypedef CUjit_fallback_enum CUjit_fallback
 * 
 * cdef enum CUjit_cacheMode_enum:             # <<<<<<<<<<<<<<
 *     CU_JIT_CACHE_OPTION_NONE = 0
 *     CU_JIT_CACHE_OPTION_CG = 1
 */
enum __pyx_t_4cuda_5ccuda_CUjit_cacheMode_enum {
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_OPTION_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_OPTION_CG = 1,
  __pyx_e_4cuda_5ccuda_CU_JIT_CACHE_OPTION_CA = 2
};

/* "cuda/ccuda.pxd":606
 * ctypedef CUjit_cacheMode_enum CUjit_cacheMode
 * 
 * cdef enum CUjitInputType_enum:             # <<<<<<<<<<<<<<
 *     CU_JIT_INPUT_CUBIN = 0
 *     CU_JIT_INPUT_PTX = 1
 */
enum __pyx_t_4cuda_5ccuda_CUjitInputType_enum {
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_CUBIN = 0,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_PTX = 1,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_FATBINARY = 2,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_OBJECT = 3,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_LIBRARY = 4,
  __pyx_e_4cuda_5ccuda_CU_JIT_INPUT_NVVM = 5,
  __pyx_e_4cuda_5ccuda_CU_JIT_NUM_INPUT_TYPES = 6
};

/* "cuda/ccuda.pxd":622
 * ctypedef CUlinkState_st* CUlinkState
 * 
 * cdef enum CUgraphicsRegisterFlags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_REGISTER_FLAGS_NONE = 0
 *     CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 4,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8
};

/* "cuda/ccuda.pxd":631
 * ctypedef CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags
 * 
 * cdef enum CUgraphicsMapResourceFlags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphicsMapResourceFlags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
};

/* "cuda/ccuda.pxd":638
 * ctypedef CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags
 * 
 * cdef enum CUarray_cubemap_face_enum:             # <<<<<<<<<<<<<<
 *     CU_CUBEMAP_FACE_POSITIVE_X = 0
 *     CU_CUBEMAP_FACE_NEGATIVE_X = 1
 */
enum __pyx_t_4cuda_5ccuda_CUarray_cubemap_face_enum {
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_X = 0,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_X = 1,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_Y = 2,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_Y = 3,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_POSITIVE_Z = 4,
  __pyx_e_4cuda_5ccuda_CU_CUBEMAP_FACE_NEGATIVE_Z = 5
};

/* "cuda/ccuda.pxd":648
 * ctypedef CUarray_cubemap_face_enum CUarray_cubemap_face
 * 
 * cdef enum CUlimit_enum:             # <<<<<<<<<<<<<<
 *     CU_LIMIT_STACK_SIZE = 0
 *     CU_LIMIT_PRINTF_FIFO_SIZE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUlimit_enum {
  __pyx_e_4cuda_5ccuda_CU_LIMIT_STACK_SIZE = 0,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_PRINTF_FIFO_SIZE = 1,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MALLOC_HEAP_SIZE = 2,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 3,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 4,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 5,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_PERSISTING_L2_CACHE_SIZE = 6,
  __pyx_e_4cuda_5ccuda_CU_LIMIT_MAX = 7
};

/* "cuda/ccuda.pxd":660
 * ctypedef CUlimit_enum CUlimit
 * 
 * cdef enum CUresourcetype_enum:             # <<<<<<<<<<<<<<
 *     CU_RESOURCE_TYPE_ARRAY = 0
 *     CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUresourcetype_enum {
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_ARRAY = 0,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_LINEAR = 2,
  __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_PITCH2D = 3
};

/* "cuda/ccuda.pxd":670
 * ctypedef void (*CUhostFn)(void* userData)
 * 
 * cdef enum CUaccessProperty_enum:             # <<<<<<<<<<<<<<
 *     CU_ACCESS_PROPERTY_NORMAL = 0
 *     CU_ACCESS_PROPERTY_STREAMING = 1
 */
enum __pyx_t_4cuda_5ccuda_CUaccessProperty_enum {
  __pyx_e_4cuda_5ccuda_CU_ACCESS_PROPERTY_NORMAL = 0,
  __pyx_e_4cuda_5ccuda_CU_ACCESS_PROPERTY_STREAMING = 1,
  __pyx_e_4cuda_5ccuda_CU_ACCESS_PROPERTY_PERSISTING = 2
};

/* "cuda/ccuda.pxd":724
 * ctypedef CUDA_HOST_NODE_PARAMS_v1 CUDA_HOST_NODE_PARAMS
 * 
 * cdef enum CUgraphNodeType_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_NODE_TYPE_KERNEL = 0
 *     CU_GRAPH_NODE_TYPE_MEMCPY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphNodeType_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_KERNEL = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_MEMCPY = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_MEMSET = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_HOST = 3,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_GRAPH = 4,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_EMPTY = 5,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_WAIT_EVENT = 6,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_EVENT_RECORD = 7,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = 8,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = 9,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_MEM_ALLOC = 10,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_NODE_TYPE_MEM_FREE = 11
};

/* "cuda/ccuda.pxd":740
 * ctypedef CUgraphNodeType_enum CUgraphNodeType
 * 
 * cdef enum CUsynchronizationPolicy_enum:             # <<<<<<<<<<<<<<
 *     CU_SYNC_POLICY_AUTO = 1
 *     CU_SYNC_POLICY_SPIN = 2
 */
enum __pyx_t_4cuda_5ccuda_CUsynchronizationPolicy_enum {
  __pyx_e_4cuda_5ccuda_CU_SYNC_POLICY_AUTO = 1,
  __pyx_e_4cuda_5ccuda_CU_SYNC_POLICY_SPIN = 2,
  __pyx_e_4cuda_5ccuda_CU_SYNC_POLICY_YIELD = 3,
  __pyx_e_4cuda_5ccuda_CU_SYNC_POLICY_BLOCKING_SYNC = 4
};

/* "cuda/ccuda.pxd":748
 * ctypedef CUsynchronizationPolicy_enum CUsynchronizationPolicy
 * 
 * cdef enum CUkernelNodeAttrID_enum:             # <<<<<<<<<<<<<<
 *     CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 *     CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
 */
enum __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID_enum {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1,
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
};

/* "cuda/ccuda.pxd":762
 * ctypedef CUkernelNodeAttrValue_v1 CUkernelNodeAttrValue
 * 
 * cdef enum CUstreamCaptureStatus_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_CAPTURE_STATUS_NONE = 0
 *     CU_STREAM_CAPTURE_STATUS_ACTIVE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_ACTIVE = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2
};

/* "cuda/ccuda.pxd":769
 * ctypedef CUstreamCaptureStatus_enum CUstreamCaptureStatus
 * 
 * cdef enum CUstreamCaptureMode_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_CAPTURE_MODE_GLOBAL = 0
 *     CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1
 */
enum __pyx_t_4cuda_5ccuda_CUstreamCaptureMode_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_MODE_GLOBAL = 0,
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_MODE_RELAXED = 2
};

/* "cuda/ccuda.pxd":776
 * ctypedef CUstreamCaptureMode_enum CUstreamCaptureMode
 * 
 * cdef enum CUstreamAttrID_enum:             # <<<<<<<<<<<<<<
 *     CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 *     CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 */
enum __pyx_t_4cuda_5ccuda_CUstreamAttrID_enum {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1,
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
};

/* "cuda/ccuda.pxd":790
 * ctypedef CUstreamAttrValue_v1 CUstreamAttrValue
 * 
 * cdef enum CUdriverProcAddress_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GET_PROC_ADDRESS_DEFAULT = 0
 *     CU_GET_PROC_ADDRESS_LEGACY_STREAM = 1
 */
enum __pyx_t_4cuda_5ccuda_CUdriverProcAddress_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_DEFAULT = 0,
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_LEGACY_STREAM = 1,
  __pyx_e_4cuda_5ccuda_CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = 2
};

/* "cuda/ccuda.pxd":797
 * ctypedef CUdriverProcAddress_flags_enum CUdriverProcAddress_flags
 * 
 * cdef enum CUexecAffinityType_enum:             # <<<<<<<<<<<<<<
 *     CU_EXEC_AFFINITY_TYPE_SM_COUNT = 0
 *     CU_EXEC_AFFINITY_TYPE_MAX = 1
 */
enum __pyx_t_4cuda_5ccuda_CUexecAffinityType_enum {
  __pyx_e_4cuda_5ccuda_CU_EXEC_AFFINITY_TYPE_SM_COUNT = 0,
  __pyx_e_4cuda_5ccuda_CU_EXEC_AFFINITY_TYPE_MAX = 1
};

/* "cuda/ccuda.pxd":821
 * ctypedef CUexecAffinityParam_v1 CUexecAffinityParam
 * 
 * cdef enum cudaError_enum:             # <<<<<<<<<<<<<<
 *     CUDA_SUCCESS = 0
 *     CUDA_ERROR_INVALID_VALUE = 1
 */
enum __pyx_t_4cuda_5ccuda_cudaError_enum {
  __pyx_e_4cuda_5ccuda_CUDA_SUCCESS = 0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_VALUE = 1,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_OUT_OF_MEMORY = 2,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_INITIALIZED = 3,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_DEINITIALIZED = 4,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PROFILER_DISABLED = 5,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PROFILER_NOT_INITIALIZED = 6,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PROFILER_ALREADY_STARTED = 7,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PROFILER_ALREADY_STOPPED = 8,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STUB_LIBRARY = 34,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NO_DEVICE = 0x64,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_DEVICE = 0x65,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_DEVICE_NOT_LICENSED = 0x66,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_IMAGE = 0xC8,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_CONTEXT = 0xC9,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_CONTEXT_ALREADY_CURRENT = 0xCA,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MAP_FAILED = 0xCD,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNMAP_FAILED = 0xCE,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ARRAY_IS_MAPPED = 0xCF,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ALREADY_MAPPED = 0xD0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NO_BINARY_FOR_GPU = 0xD1,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ALREADY_ACQUIRED = 0xD2,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_MAPPED = 0xD3,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_MAPPED_AS_ARRAY = 0xD4,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_MAPPED_AS_POINTER = 0xD5,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ECC_UNCORRECTABLE = 0xD6,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNSUPPORTED_LIMIT = 0xD7,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_CONTEXT_ALREADY_IN_USE = 0xD8,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = 0xD9,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_PTX = 0xDA,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 0xDB,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NVLINK_UNCORRECTABLE = 0xDC,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_JIT_COMPILER_NOT_FOUND = 0xDD,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNSUPPORTED_PTX_VERSION = 0xDE,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_JIT_COMPILATION_DISABLED = 0xDF,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = 0xE0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_SOURCE = 0x12C,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_FILE_NOT_FOUND = 0x12D,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 0x12E,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = 0x12F,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_OPERATING_SYSTEM = 0x130,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_HANDLE = 0x190,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ILLEGAL_STATE = 0x191,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND = 0x1F4,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_READY = 0x258,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ILLEGAL_ADDRESS = 0x2BC,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = 0x2BD,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_LAUNCH_TIMEOUT = 0x2BE,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = 0x2BF,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = 0x2C0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = 0x2C1,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = 0x2C4,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_CONTEXT_IS_DESTROYED = 0x2C5,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ASSERT = 0x2C6,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_TOO_MANY_PEERS = 0x2C7,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = 0x2C8,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = 0x2C9,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_HARDWARE_STACK_ERROR = 0x2CA,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_ILLEGAL_INSTRUCTION = 0x2CB,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MISALIGNED_ADDRESS = 0x2CC,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_ADDRESS_SPACE = 0x2CD,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_PC = 0x2CE,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_LAUNCH_FAILED = 0x2CF,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = 0x2D0,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_PERMITTED = 0x320,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_SUPPORTED = 0x321,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_SYSTEM_NOT_READY = 0x322,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = 0x323,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = 0x324,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_CONNECTION_FAILED = 0x325,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_RPC_FAILURE = 0x326,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_SERVER_NOT_READY = 0x327,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = 0x328,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = 0x329,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = 0x384,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = 0x385,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_MERGE = 0x386,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = 0x387,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_UNJOINED = 0x388,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_ISOLATION = 0x389,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = 0x38A,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_CAPTURED_EVENT = 0x38B,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = 0x38C,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_TIMEOUT = 0x38D,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = 0x38E,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_EXTERNAL_DEVICE = 0x38F,
  __pyx_e_4cuda_5ccuda_CUDA_ERROR_UNKNOWN = 0x3E7
};

/* "cuda/ccuda.pxd":912
 * ctypedef cudaError_enum CUresult
 * 
 * cdef enum CUdevice_P2PAttribute_enum:             # <<<<<<<<<<<<<<
 *     CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1
 *     CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2
 */
enum __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute_enum {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 3,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = 4,
  __pyx_e_4cuda_5ccuda_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 4
};

/* "cuda/ccuda.pxd":1111
 * ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC
 * 
 * cdef enum CUresourceViewFormat_enum:             # <<<<<<<<<<<<<<
 *     CU_RES_VIEW_FORMAT_NONE = 0
 *     CU_RES_VIEW_FORMAT_UINT_1X8 = 1
 */
enum __pyx_t_4cuda_5ccuda_CUresourceViewFormat_enum {
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X8 = 1,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X8 = 2,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X8 = 3,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X8 = 4,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X8 = 5,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X8 = 6,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X16 = 7,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X16 = 8,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X16 = 9,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X16 = 10,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X16 = 11,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X16 = 12,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_1X32 = 13,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_2X32 = 14,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UINT_4X32 = 15,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_1X32 = 16,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_2X32 = 17,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SINT_4X32 = 18,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_1X16 = 19,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_2X16 = 20,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_4X16 = 21,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_1X32 = 22,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_2X32 = 23,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_FLOAT_4X32 = 24,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC4 = 29,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC5 = 31,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_SIGNED_BC6H = 33,
  __pyx_e_4cuda_5ccuda_CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34
};

/* "cuda/ccuda.pxd":1173
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 CUDA_POINTER_ATTRIBUTE_P2P_TOKENS
 * 
 * cdef enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum:             # <<<<<<<<<<<<<<
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = 0
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = 1
 */
enum __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum {
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = 1,
  __pyx_e_4cuda_5ccuda_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = 3
};

/* "cuda/ccuda.pxd":1196
 * ctypedef CUDA_LAUNCH_PARAMS_v1 CUDA_LAUNCH_PARAMS
 * 
 * cdef enum CUexternalMemoryHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2
 */
enum __pyx_t_4cuda_5ccuda_CUexternalMemoryHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = 4,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = 5,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = 6,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = 7,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8
};

/* "cuda/ccuda.pxd":1248
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC
 * 
 * cdef enum CUexternalSemaphoreHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2
 */
enum __pyx_t_4cuda_5ccuda_CUexternalSemaphoreHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = 4,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = 5,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = 6,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = 7,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = 8,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = 9,
  __pyx_e_4cuda_5ccuda_CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = 10
};

/* "cuda/ccuda.pxd":1354
 * ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle
 * 
 * cdef enum CUmemAllocationHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_HANDLE_TYPE_NONE = 0
 *     CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_WIN32 = 2,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_WIN32_KMT = 4,
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_MAX = 0x7FFFFFFF
};

/* "cuda/ccuda.pxd":1363
 * ctypedef CUmemAllocationHandleType_enum CUmemAllocationHandleType
 * 
 * cdef enum CUmemAccess_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ACCESS_FLAGS_PROT_NONE = 0
 *     CU_MEM_ACCESS_FLAGS_PROT_READ = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAccess_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ACCESS_FLAGS_PROT_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ACCESS_FLAGS_PROT_READ = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_ACCESS_FLAGS_PROT_READWRITE = 3,
  __pyx_e_4cuda_5ccuda_CU_MEM_ACCESS_FLAGS_PROT_MAX = 0x7FFFFFFF
};

/* "cuda/ccuda.pxd":1371
 * ctypedef CUmemAccess_flags_enum CUmemAccess_flags
 * 
 * cdef enum CUmemLocationType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_LOCATION_TYPE_INVALID = 0
 *     CU_MEM_LOCATION_TYPE_DEVICE = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemLocationType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_LOCATION_TYPE_INVALID = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_LOCATION_TYPE_DEVICE = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_LOCATION_TYPE_MAX = 0x7FFFFFFF
};

/* "cuda/ccuda.pxd":1378
 * ctypedef CUmemLocationType_enum CUmemLocationType
 * 
 * cdef enum CUmemAllocationType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ALLOCATION_TYPE_INVALID = 0
 *     CU_MEM_ALLOCATION_TYPE_PINNED = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_TYPE_INVALID = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_TYPE_PINNED = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_TYPE_MAX = 0x7FFFFFFF
};

/* "cuda/ccuda.pxd":1385
 * ctypedef CUmemAllocationType_enum CUmemAllocationType
 * 
 * cdef enum CUmemAllocationGranularity_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0
 *     CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1
};

/* "cuda/ccuda.pxd":1391
 * ctypedef CUmemAllocationGranularity_flags_enum CUmemAllocationGranularity_flags
 * 
 * cdef enum CUarraySparseSubresourceType_enum:             # <<<<<<<<<<<<<<
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1
 */
enum __pyx_t_4cuda_5ccuda_CUarraySparseSubresourceType_enum {
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0,
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1
};

/* "cuda/ccuda.pxd":1397
 * ctypedef CUarraySparseSubresourceType_enum CUarraySparseSubresourceType
 * 
 * cdef enum CUmemOperationType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_OPERATION_TYPE_MAP = 1
 *     CU_MEM_OPERATION_TYPE_UNMAP = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmemOperationType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_OPERATION_TYPE_MAP = 1,
  __pyx_e_4cuda_5ccuda_CU_MEM_OPERATION_TYPE_UNMAP = 2
};

/* "cuda/ccuda.pxd":1403
 * ctypedef CUmemOperationType_enum CUmemOperationType
 * 
 * cdef enum CUmemHandleType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_HANDLE_TYPE_GENERIC = 0
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUmemHandleType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_HANDLE_TYPE_GENERIC = 0
};

/* "cuda/ccuda.pxd":1459
 * ctypedef CUmemLocation_v1 CUmemLocation
 * 
 * cdef enum CUmemAllocationCompType_enum:             # <<<<<<<<<<<<<<
 *     CU_MEM_ALLOCATION_COMP_NONE = 0
 *     CU_MEM_ALLOCATION_COMP_GENERIC = 1
 */
enum __pyx_t_4cuda_5ccuda_CUmemAllocationCompType_enum {
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_COMP_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_MEM_ALLOCATION_COMP_GENERIC = 1
};

/* "cuda/ccuda.pxd":1490
 * ctypedef CUmemAccessDesc_v1 CUmemAccessDesc
 * 
 * cdef enum CUgraphExecUpdateResult_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_EXEC_UPDATE_SUCCESS = 0
 *     CU_GRAPH_EXEC_UPDATE_ERROR = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_SUCCESS = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = 3,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = 4,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = 5,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = 6,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = 7,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = 8
};

/* "cuda/ccuda.pxd":1503
 * ctypedef CUgraphExecUpdateResult_enum CUgraphExecUpdateResult
 * 
 * cdef enum CUmemPool_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = 1
 *     CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = 2
 */
enum __pyx_t_4cuda_5ccuda_CUmemPool_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = 1,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = 2,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = 3,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = 4,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = 5,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = 6,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_USED_MEM_CURRENT = 7,
  __pyx_e_4cuda_5ccuda_CU_MEMPOOL_ATTR_USED_MEM_HIGH = 8
};

/* "cuda/ccuda.pxd":1542
 * ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_st CUDA_MEM_ALLOC_NODE_PARAMS
 * 
 * cdef enum CUgraphMem_attribute_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = 0
 *     CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = 1
 */
enum __pyx_t_4cuda_5ccuda_CUgraphMem_attribute_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = 0,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = 3
};

/* "cuda/ccuda.pxd":1550
 * ctypedef CUgraphMem_attribute_enum CUgraphMem_attribute
 * 
 * cdef enum CUflushGPUDirectRDMAWritesOptions_enum:             # <<<<<<<<<<<<<<
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = 1
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 2
 */
enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions_enum {
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = 1,
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 2
};

/* "cuda/ccuda.pxd":1556
 * ctypedef CUflushGPUDirectRDMAWritesOptions_enum CUflushGPUDirectRDMAWritesOptions
 * 
 * cdef enum CUGPUDirectRDMAWritesOrdering_enum:             # <<<<<<<<<<<<<<
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = 0
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = 100
 */
enum __pyx_t_4cuda_5ccuda_CUGPUDirectRDMAWritesOrdering_enum {
  __pyx_e_4cuda_5ccuda_CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = 0x64,
  __pyx_e_4cuda_5ccuda_CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = 0xC8
};

/* "cuda/ccuda.pxd":1563
 * ctypedef CUGPUDirectRDMAWritesOrdering_enum CUGPUDirectRDMAWritesOrdering
 * 
 * cdef enum CUflushGPUDirectRDMAWritesScope_enum:             # <<<<<<<<<<<<<<
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = 100
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 200
 */
enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope_enum {
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = 0x64,
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 0xC8
};

/* "cuda/ccuda.pxd":1569
 * ctypedef CUflushGPUDirectRDMAWritesScope_enum CUflushGPUDirectRDMAWritesScope
 * 
 * cdef enum CUflushGPUDirectRDMAWritesTarget_enum:             # <<<<<<<<<<<<<<
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget_enum {
  __pyx_e_4cuda_5ccuda_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0
};

/* "cuda/ccuda.pxd":1574
 * ctypedef CUflushGPUDirectRDMAWritesTarget_enum CUflushGPUDirectRDMAWritesTarget
 * 
 * cdef enum CUgraphDebugDot_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = 1
 *     CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = 2
 */
enum __pyx_t_4cuda_5ccuda_CUgraphDebugDot_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = 1,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = 2,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = 4,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = 8,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = 16,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = 32,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = 64,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = 0x80,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = 0x100,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = 0x200,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = 0x400,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = 0x800,
  __pyx_e_4cuda_5ccuda_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = 0x1000
};

/* "cuda/ccuda.pxd":1591
 * ctypedef CUgraphDebugDot_flags_enum CUgraphDebugDot_flags
 * 
 * cdef enum CUuserObject_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = 1
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUuserObject_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = 1
};

/* "cuda/ccuda.pxd":1596
 * ctypedef CUuserObject_flags_enum CUuserObject_flags
 * 
 * cdef enum CUuserObjectRetain_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GRAPH_USER_OBJECT_MOVE = 1
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUuserObjectRetain_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GRAPH_USER_OBJECT_MOVE = 1
};

/* "cuda/ccuda.pxd":1601
 * ctypedef CUuserObjectRetain_flags_enum CUuserObjectRetain_flags
 * 
 * cdef enum CUgraphInstantiate_flags_enum:             # <<<<<<<<<<<<<<
 *     CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1
 * 
 */
enum __pyx_t_4cuda_5ccuda_CUgraphInstantiate_flags_enum {
  __pyx_e_4cuda_5ccuda_CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1
};

/* "cuda/ccuda.pxd":2314
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * cdef enum CUoutput_mode_enum:             # <<<<<<<<<<<<<<
 *     CU_OUT_KEY_VALUE_PAIR = 0
 *     CU_OUT_CSV = 1
 */
enum __pyx_t_4cuda_5ccuda_CUoutput_mode_enum {
  __pyx_e_4cuda_5ccuda_CU_OUT_KEY_VALUE_PAIR = 0,
  __pyx_e_4cuda_5ccuda_CU_OUT_CSV = 1
};

/* "cuda/ccuda.pxd":2365
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * cdef enum CUeglFrameType_enum:             # <<<<<<<<<<<<<<
 *     CU_EGL_FRAME_TYPE_ARRAY = 0
 *     CU_EGL_FRAME_TYPE_PITCH = 1
 */
enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum {
  __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_ARRAY = 0,
  __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_PITCH = 1
};

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

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

/* "cuda/ccuda.pxd":2549
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * cdef enum CUGLDeviceList_enum:             # <<<<<<<<<<<<<<
 *     CU_GL_DEVICE_LIST_ALL = 1
 *     CU_GL_DEVICE_LIST_CURRENT_FRAME = 2
 */
enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum {
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_ALL = 1,
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2,
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_NEXT_FRAME = 3
};

/* "cuda/ccuda.pxd":2558
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * cdef enum CUGLmap_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GL_MAP_RESOURCE_FLAGS_NONE = 0
 *     CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1,
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
};

/* "cuda/ccuda.pxd":2565
 * ctypedef CUGLmap_flags_enum CUGLmap_flags
 * 
 * cdef enum: CUDA_VERSION = 11060             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_VERSION = 0x2B34
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* "cuda/ccuda.pxd":2635
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64
 * 
 * cdef enum: CU_LAUNCH_PARAM_END = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END = 0
};

/* "cuda/ccuda.pxd":2637
 * cdef enum: CU_LAUNCH_PARAM_END = 0
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER = 1
};

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

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

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

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

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

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

/* "cuda/ccuda.pxd":26
 *     cdef struct CUctx_st:
 *         pass
 * ctypedef CUctx_st* CUcontext             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUctx_st *__pyx_t_4cuda_5ccuda_CUcontext;

/* "cuda/ccuda.pxd":31
 *     cdef struct CUmod_st:
 *         pass
 * ctypedef CUmod_st* CUmodule             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUmod_st *__pyx_t_4cuda_5ccuda_CUmodule;

/* "cuda/ccuda.pxd":36
 *     cdef struct CUfunc_st:
 *         pass
 * ctypedef CUfunc_st* CUfunction             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUfunc_st *__pyx_t_4cuda_5ccuda_CUfunction;

/* "cuda/ccuda.pxd":41
 *     cdef struct CUarray_st:
 *         pass
 * ctypedef CUarray_st* CUarray             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUarray_st *__pyx_t_4cuda_5ccuda_CUarray;

/* "cuda/ccuda.pxd":46
 *     cdef struct CUmipmappedArray_st:
 *         pass
 * ctypedef CUmipmappedArray_st* CUmipmappedArray             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUmipmappedArray_st *__pyx_t_4cuda_5ccuda_CUmipmappedArray;

/* "cuda/ccuda.pxd":51
 *     cdef struct CUtexref_st:
 *         pass
 * ctypedef CUtexref_st* CUtexref             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUtexref_st *__pyx_t_4cuda_5ccuda_CUtexref;

/* "cuda/ccuda.pxd":56
 *     cdef struct CUsurfref_st:
 *         pass
 * ctypedef CUsurfref_st* CUsurfref             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUsurfref_st *__pyx_t_4cuda_5ccuda_CUsurfref;

/* "cuda/ccuda.pxd":61
 *     cdef struct CUevent_st:
 *         pass
 * ctypedef CUevent_st* CUevent             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUevent_st *__pyx_t_4cuda_5ccuda_CUevent;

/* "cuda/ccuda.pxd":66
 *     cdef struct CUstream_st:
 *         pass
 * ctypedef CUstream_st* CUstream             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUstream_st *__pyx_t_4cuda_5ccuda_CUstream;

/* "cuda/ccuda.pxd":71
 *     cdef struct CUgraphicsResource_st:
 *         pass
 * ctypedef CUgraphicsResource_st* CUgraphicsResource             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long CUtexObject_v1
 */
typedef struct CUgraphicsResource_st *__pyx_t_4cuda_5ccuda_CUgraphicsResource;

/* "cuda/ccuda.pxd":84
 *     cdef struct CUextMemory_st:
 *         pass
 * ctypedef CUextMemory_st* CUexternalMemory             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUextMemory_st *__pyx_t_4cuda_5ccuda_CUexternalMemory;

/* "cuda/ccuda.pxd":89
 *     cdef struct CUextSemaphore_st:
 *         pass
 * ctypedef CUextSemaphore_st* CUexternalSemaphore             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUextSemaphore_st *__pyx_t_4cuda_5ccuda_CUexternalSemaphore;

/* "cuda/ccuda.pxd":94
 *     cdef struct CUgraph_st:
 *         pass
 * ctypedef CUgraph_st* CUgraph             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUgraph_st *__pyx_t_4cuda_5ccuda_CUgraph;

/* "cuda/ccuda.pxd":99
 *     cdef struct CUgraphNode_st:
 *         pass
 * ctypedef CUgraphNode_st* CUgraphNode             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUgraphNode_st *__pyx_t_4cuda_5ccuda_CUgraphNode;

/* "cuda/ccuda.pxd":104
 *     cdef struct CUgraphExec_st:
 *         pass
 * ctypedef CUgraphExec_st* CUgraphExec             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUgraphExec_st *__pyx_t_4cuda_5ccuda_CUgraphExec;

/* "cuda/ccuda.pxd":109
 *     cdef struct CUmemPoolHandle_st:
 *         pass
 * ctypedef CUmemPoolHandle_st* CUmemoryPool             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef struct CUmemPoolHandle_st *__pyx_t_4cuda_5ccuda_CUmemoryPool;

/* "cuda/ccuda.pxd":114
 *     cdef struct CUuserObject_st:
 *         pass
 * ctypedef CUuserObject_st* CUuserObject             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUuuid_st:
 */
typedef struct CUuserObject_st *__pyx_t_4cuda_5ccuda_CUuserObject;

/* "cuda/ccuda.pxd":116
 * ctypedef CUuserObject_st* CUuserObject
 * 
 * cdef struct CUuuid_st:             # <<<<<<<<<<<<<<
 *     char bytes[16]
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUuuid_st {
  char bytes[16];
};

/* "cuda/ccuda.pxd":119
 *     char bytes[16]
 * 
 * ctypedef CUuuid_st CUuuid             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUipcEventHandle_st:
 */
typedef struct __pyx_t_4cuda_5ccuda_CUuuid_st __pyx_t_4cuda_5ccuda_CUuuid;

/* "cuda/ccuda.pxd":121
 * ctypedef CUuuid_st CUuuid
 * 
 * cdef struct CUipcEventHandle_st:             # <<<<<<<<<<<<<<
 *     char reserved[64]
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUipcEventHandle_st {
  char reserved[64];
};

/* "cuda/ccuda.pxd":124
 *     char reserved[64]
 * 
 * ctypedef CUipcEventHandle_st CUipcEventHandle_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUipcEventHandle_v1 CUipcEventHandle
 */
typedef struct __pyx_t_4cuda_5ccuda_CUipcEventHandle_st __pyx_t_4cuda_5ccuda_CUipcEventHandle_v1;

/* "cuda/ccuda.pxd":126
 * ctypedef CUipcEventHandle_st CUipcEventHandle_v1
 * 
 * ctypedef CUipcEventHandle_v1 CUipcEventHandle             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUipcMemHandle_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUipcEventHandle_v1 __pyx_t_4cuda_5ccuda_CUipcEventHandle;

/* "cuda/ccuda.pxd":128
 * ctypedef CUipcEventHandle_v1 CUipcEventHandle
 * 
 * cdef struct CUipcMemHandle_st:             # <<<<<<<<<<<<<<
 *     char reserved[64]
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUipcMemHandle_st {
  char reserved[64];
};

/* "cuda/ccuda.pxd":131
 *     char reserved[64]
 * 
 * ctypedef CUipcMemHandle_st CUipcMemHandle_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUipcMemHandle_v1 CUipcMemHandle
 */
typedef struct __pyx_t_4cuda_5ccuda_CUipcMemHandle_st __pyx_t_4cuda_5ccuda_CUipcMemHandle_v1;

/* "cuda/ccuda.pxd":133
 * ctypedef CUipcMemHandle_st CUipcMemHandle_v1
 * 
 * ctypedef CUipcMemHandle_v1 CUipcMemHandle             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUipcMem_flags_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUipcMemHandle_v1 __pyx_t_4cuda_5ccuda_CUipcMemHandle;

/* "cuda/ccuda.pxd":138
 *     CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1
 * 
 * ctypedef CUipcMem_flags_enum CUipcMem_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAttach_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUipcMem_flags_enum __pyx_t_4cuda_5ccuda_CUipcMem_flags;

/* "cuda/ccuda.pxd":145
 *     CU_MEM_ATTACH_SINGLE = 4
 * 
 * ctypedef CUmemAttach_flags_enum CUmemAttach_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUctx_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAttach_flags_enum __pyx_t_4cuda_5ccuda_CUmemAttach_flags;

/* "cuda/ccuda.pxd":158
 *     CU_CTX_FLAGS_MASK = 31
 * 
 * ctypedef CUctx_flags_enum CUctx_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstream_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUctx_flags_enum __pyx_t_4cuda_5ccuda_CUctx_flags;

/* "cuda/ccuda.pxd":164
 *     CU_STREAM_NON_BLOCKING = 1
 * 
 * ctypedef CUstream_flags_enum CUstream_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUevent_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstream_flags_enum __pyx_t_4cuda_5ccuda_CUstream_flags;

/* "cuda/ccuda.pxd":172
 *     CU_EVENT_INTERPROCESS = 4
 * 
 * ctypedef CUevent_flags_enum CUevent_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUevent_record_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUevent_flags_enum __pyx_t_4cuda_5ccuda_CUevent_flags;

/* "cuda/ccuda.pxd":178
 *     CU_EVENT_RECORD_EXTERNAL = 1
 * 
 * ctypedef CUevent_record_flags_enum CUevent_record_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUevent_wait_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUevent_record_flags_enum __pyx_t_4cuda_5ccuda_CUevent_record_flags;

/* "cuda/ccuda.pxd":184
 *     CU_EVENT_WAIT_EXTERNAL = 1
 * 
 * ctypedef CUevent_wait_flags_enum CUevent_wait_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamWaitValue_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUevent_wait_flags_enum __pyx_t_4cuda_5ccuda_CUevent_wait_flags;

/* "cuda/ccuda.pxd":193
 *     CU_STREAM_WAIT_VALUE_FLUSH = 1073741824
 * 
 * ctypedef CUstreamWaitValue_flags_enum CUstreamWaitValue_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamWriteValue_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamWaitValue_flags_enum __pyx_t_4cuda_5ccuda_CUstreamWaitValue_flags;

/* "cuda/ccuda.pxd":199
 *     CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1
 * 
 * ctypedef CUstreamWriteValue_flags_enum CUstreamWriteValue_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamBatchMemOpType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamWriteValue_flags_enum __pyx_t_4cuda_5ccuda_CUstreamWriteValue_flags;

/* "cuda/ccuda.pxd":208
 *     CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3
 * 
 * ctypedef CUstreamBatchMemOpType_enum CUstreamBatchMemOpType             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUstreamMemOpWaitValueParams_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType_enum __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType;

/* "cuda/ccuda.pxd":210
 * ctypedef CUstreamBatchMemOpType_enum CUstreamBatchMemOpType
 * 
 * cdef struct CUstreamMemOpWaitValueParams_st:             # <<<<<<<<<<<<<<
 *     CUstreamBatchMemOpType operation
 *     CUdeviceptr address
 */
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWaitValueParams_st {
  __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType operation;
  __pyx_t_4cuda_5ccuda_CUdeviceptr address;
  __pyx_t_4cuda_5ccuda_cuuint64_t value64;
  unsigned int flags;
  __pyx_t_4cuda_5ccuda_CUdeviceptr alias;
};

/* "cuda/ccuda.pxd":217
 *     CUdeviceptr alias
 * 
 * cdef struct CUstreamMemOpWriteValueParams_st:             # <<<<<<<<<<<<<<
 *     CUstreamBatchMemOpType operation
 *     CUdeviceptr address
 */
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWriteValueParams_st {
  __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType operation;
  __pyx_t_4cuda_5ccuda_CUdeviceptr address;
  __pyx_t_4cuda_5ccuda_cuuint64_t value64;
  unsigned int flags;
  __pyx_t_4cuda_5ccuda_CUdeviceptr alias;
};

/* "cuda/ccuda.pxd":224
 *     CUdeviceptr alias
 * 
 * cdef struct CUstreamMemOpFlushRemoteWritesParams_st:             # <<<<<<<<<<<<<<
 *     CUstreamBatchMemOpType operation
 *     unsigned int flags
 */
struct __pyx_t_4cuda_5ccuda_CUstreamMemOpFlushRemoteWritesParams_st {
  __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType operation;
  unsigned int flags;
};

/* "cuda/ccuda.pxd":228
 *     unsigned int flags
 * 
 * cdef union CUstreamBatchMemOpParams_union:             # <<<<<<<<<<<<<<
 *     CUstreamBatchMemOpType operation
 *     CUstreamMemOpWaitValueParams_st waitValue
 */
union __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_union {
  __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpType operation;
  struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWaitValueParams_st waitValue;
  struct __pyx_t_4cuda_5ccuda_CUstreamMemOpWriteValueParams_st writeValue;
  struct __pyx_t_4cuda_5ccuda_CUstreamMemOpFlushRemoteWritesParams_st flushRemoteWrites;
  __pyx_t_4cuda_5ccuda_cuuint64_t pad[6];
};

/* "cuda/ccuda.pxd":235
 *     cuuint64_t pad[6]
 * 
 * ctypedef CUstreamBatchMemOpParams_union CUstreamBatchMemOpParams_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams
 */
typedef union __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_union __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_v1;

/* "cuda/ccuda.pxd":237
 * ctypedef CUstreamBatchMemOpParams_union CUstreamBatchMemOpParams_v1
 * 
 * ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUoccupancy_flags_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams_v1 __pyx_t_4cuda_5ccuda_CUstreamBatchMemOpParams;

/* "cuda/ccuda.pxd":243
 *     CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1
 * 
 * ctypedef CUoccupancy_flags_enum CUoccupancy_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamUpdateCaptureDependencies_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUoccupancy_flags_enum __pyx_t_4cuda_5ccuda_CUoccupancy_flags;

/* "cuda/ccuda.pxd":249
 *     CU_STREAM_SET_CAPTURE_DEPENDENCIES = 1
 * 
 * ctypedef CUstreamUpdateCaptureDependencies_flags_enum CUstreamUpdateCaptureDependencies_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUarray_format_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamUpdateCaptureDependencies_flags_enum __pyx_t_4cuda_5ccuda_CUstreamUpdateCaptureDependencies_flags;

/* "cuda/ccuda.pxd":288
 *     CU_AD_FORMAT_BC7_UNORM_SRGB = 158
 * 
 * ctypedef CUarray_format_enum CUarray_format             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUaddress_mode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUarray_format_enum __pyx_t_4cuda_5ccuda_CUarray_format;

/* "cuda/ccuda.pxd":296
 *     CU_TR_ADDRESS_MODE_BORDER = 3
 * 
 * ctypedef CUaddress_mode_enum CUaddress_mode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUfilter_mode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUaddress_mode_enum __pyx_t_4cuda_5ccuda_CUaddress_mode;

/* "cuda/ccuda.pxd":302
 *     CU_TR_FILTER_MODE_LINEAR = 1
 * 
 * ctypedef CUfilter_mode_enum CUfilter_mode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUdevice_attribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUfilter_mode_enum __pyx_t_4cuda_5ccuda_CUfilter_mode;

/* "cuda/ccuda.pxd":433
 *     CU_DEVICE_ATTRIBUTE_MAX = 122
 * 
 * ctypedef CUdevice_attribute_enum CUdevice_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUdevprop_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUdevice_attribute_enum __pyx_t_4cuda_5ccuda_CUdevice_attribute;

/* "cuda/ccuda.pxd":435
 * ctypedef CUdevice_attribute_enum CUdevice_attribute
 * 
 * cdef struct CUdevprop_st:             # <<<<<<<<<<<<<<
 *     int maxThreadsPerBlock
 *     int maxThreadsDim[3]
 */
struct __pyx_t_4cuda_5ccuda_CUdevprop_st {
  int maxThreadsPerBlock;
  int maxThreadsDim[3];
  int maxGridSize[3];
  int sharedMemPerBlock;
  int totalConstantMemory;
  int SIMDWidth;
  int memPitch;
  int regsPerBlock;
  int clockRate;
  int textureAlign;
};

/* "cuda/ccuda.pxd":447
 *     int textureAlign
 * 
 * ctypedef CUdevprop_st CUdevprop_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUdevprop_v1 CUdevprop
 */
typedef struct __pyx_t_4cuda_5ccuda_CUdevprop_st __pyx_t_4cuda_5ccuda_CUdevprop_v1;

/* "cuda/ccuda.pxd":449
 * ctypedef CUdevprop_st CUdevprop_v1
 * 
 * ctypedef CUdevprop_v1 CUdevprop             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUpointer_attribute_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUdevprop_v1 __pyx_t_4cuda_5ccuda_CUdevprop;

/* "cuda/ccuda.pxd":470
 *     CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17
 * 
 * ctypedef CUpointer_attribute_enum CUpointer_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUfunction_attribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUpointer_attribute_enum __pyx_t_4cuda_5ccuda_CUpointer_attribute;

/* "cuda/ccuda.pxd":485
 *     CU_FUNC_ATTRIBUTE_MAX = 10
 * 
 * ctypedef CUfunction_attribute_enum CUfunction_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUfunc_cache_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUfunction_attribute_enum __pyx_t_4cuda_5ccuda_CUfunction_attribute;

/* "cuda/ccuda.pxd":493
 *     CU_FUNC_CACHE_PREFER_EQUAL = 3
 * 
 * ctypedef CUfunc_cache_enum CUfunc_cache             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUsharedconfig_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUfunc_cache_enum __pyx_t_4cuda_5ccuda_CUfunc_cache;

/* "cuda/ccuda.pxd":500
 *     CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2
 * 
 * ctypedef CUsharedconfig_enum CUsharedconfig             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUshared_carveout_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUsharedconfig_enum __pyx_t_4cuda_5ccuda_CUsharedconfig;

/* "cuda/ccuda.pxd":507
 *     CU_SHAREDMEM_CARVEOUT_MAX_L1 = 0
 * 
 * ctypedef CUshared_carveout_enum CUshared_carveout             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemorytype_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUshared_carveout_enum __pyx_t_4cuda_5ccuda_CUshared_carveout;

/* "cuda/ccuda.pxd":515
 *     CU_MEMORYTYPE_UNIFIED = 4
 * 
 * ctypedef CUmemorytype_enum CUmemorytype             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUcomputemode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum __pyx_t_4cuda_5ccuda_CUmemorytype;

/* "cuda/ccuda.pxd":522
 *     CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3
 * 
 * ctypedef CUcomputemode_enum CUcomputemode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmem_advise_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUcomputemode_enum __pyx_t_4cuda_5ccuda_CUcomputemode;

/* "cuda/ccuda.pxd":532
 *     CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6
 * 
 * ctypedef CUmem_advise_enum CUmem_advise             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmem_range_attribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmem_advise_enum __pyx_t_4cuda_5ccuda_CUmem_advise;

/* "cuda/ccuda.pxd":540
 *     CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4
 * 
 * ctypedef CUmem_range_attribute_enum CUmem_range_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjit_option_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmem_range_attribute_enum __pyx_t_4cuda_5ccuda_CUmem_range_attribute;

/* "cuda/ccuda.pxd":570
 *     CU_JIT_NUM_OPTIONS = 25
 * 
 * ctypedef CUjit_option_enum CUjit_option             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjit_target_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjit_option_enum __pyx_t_4cuda_5ccuda_CUjit_option;

/* "cuda/ccuda.pxd":591
 *     CU_TARGET_COMPUTE_86 = 86
 * 
 * ctypedef CUjit_target_enum CUjit_target             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjit_fallback_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjit_target_enum __pyx_t_4cuda_5ccuda_CUjit_target;

/* "cuda/ccuda.pxd":597
 *     CU_PREFER_BINARY = 1
 * 
 * ctypedef CUjit_fallback_enum CUjit_fallback             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjit_cacheMode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjit_fallback_enum __pyx_t_4cuda_5ccuda_CUjit_fallback;

/* "cuda/ccuda.pxd":604
 *     CU_JIT_CACHE_OPTION_CA = 2
 * 
 * ctypedef CUjit_cacheMode_enum CUjit_cacheMode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUjitInputType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjit_cacheMode_enum __pyx_t_4cuda_5ccuda_CUjit_cacheMode;

/* "cuda/ccuda.pxd":615
 *     CU_JIT_NUM_INPUT_TYPES = 6
 * 
 * ctypedef CUjitInputType_enum CUjitInputType             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef enum __pyx_t_4cuda_5ccuda_CUjitInputType_enum __pyx_t_4cuda_5ccuda_CUjitInputType;

/* "cuda/ccuda.pxd":620
 *     cdef struct CUlinkState_st:
 *         pass
 * ctypedef CUlinkState_st* CUlinkState             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphicsRegisterFlags_enum:
 */
typedef struct CUlinkState_st *__pyx_t_4cuda_5ccuda_CUlinkState;

/* "cuda/ccuda.pxd":629
 *     CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8
 * 
 * ctypedef CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphicsMapResourceFlags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags_enum __pyx_t_4cuda_5ccuda_CUgraphicsRegisterFlags;

/* "cuda/ccuda.pxd":636
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
 * 
 * ctypedef CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUarray_cubemap_face_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphicsMapResourceFlags_enum __pyx_t_4cuda_5ccuda_CUgraphicsMapResourceFlags;

/* "cuda/ccuda.pxd":646
 *     CU_CUBEMAP_FACE_NEGATIVE_Z = 5
 * 
 * ctypedef CUarray_cubemap_face_enum CUarray_cubemap_face             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUlimit_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUarray_cubemap_face_enum __pyx_t_4cuda_5ccuda_CUarray_cubemap_face;

/* "cuda/ccuda.pxd":658
 *     CU_LIMIT_MAX = 7
 * 
 * ctypedef CUlimit_enum CUlimit             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUresourcetype_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUlimit_enum __pyx_t_4cuda_5ccuda_CUlimit;

/* "cuda/ccuda.pxd":666
 *     CU_RESOURCE_TYPE_PITCH2D = 3
 * 
 * ctypedef CUresourcetype_enum CUresourcetype             # <<<<<<<<<<<<<<
 * 
 * ctypedef void (*CUhostFn)(void* userData)
 */
typedef enum __pyx_t_4cuda_5ccuda_CUresourcetype_enum __pyx_t_4cuda_5ccuda_CUresourcetype;

/* "cuda/ccuda.pxd":668
 * ctypedef CUresourcetype_enum CUresourcetype
 * 
 * ctypedef void (*CUhostFn)(void* userData)             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUaccessProperty_enum:
 */
typedef void (*__pyx_t_4cuda_5ccuda_CUhostFn)(void *);

/* "cuda/ccuda.pxd":675
 *     CU_ACCESS_PROPERTY_PERSISTING = 2
 * 
 * ctypedef CUaccessProperty_enum CUaccessProperty             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUaccessPolicyWindow_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUaccessProperty_enum __pyx_t_4cuda_5ccuda_CUaccessProperty;

/* "cuda/ccuda.pxd":677
 * ctypedef CUaccessProperty_enum CUaccessProperty
 * 
 * cdef struct CUaccessPolicyWindow_st:             # <<<<<<<<<<<<<<
 *     void* base_ptr
 *     size_t num_bytes
 */
struct __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_st {
  void *base_ptr;
  size_t num_bytes;
  float hitRatio;
  __pyx_t_4cuda_5ccuda_CUaccessProperty hitProp;
  __pyx_t_4cuda_5ccuda_CUaccessProperty missProp;
};

/* "cuda/ccuda.pxd":684
 *     CUaccessProperty missProp
 * 
 * ctypedef CUaccessPolicyWindow_st CUaccessPolicyWindow_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUaccessPolicyWindow_v1 CUaccessPolicyWindow
 */
typedef struct __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_st __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_v1;

/* "cuda/ccuda.pxd":686
 * ctypedef CUaccessPolicyWindow_st CUaccessPolicyWindow_v1
 * 
 * ctypedef CUaccessPolicyWindow_v1 CUaccessPolicyWindow             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_KERNEL_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow_v1 __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow;

/* "cuda/ccuda.pxd":688
 * ctypedef CUaccessPolicyWindow_v1 CUaccessPolicyWindow
 * 
 * cdef struct CUDA_KERNEL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUfunction func
 *     unsigned int gridDimX
 */
struct __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUfunction func;
  unsigned int gridDimX;
  unsigned int gridDimY;
  unsigned int gridDimZ;
  unsigned int blockDimX;
  unsigned int blockDimY;
  unsigned int blockDimZ;
  unsigned int sharedMemBytes;
  void **kernelParams;
  void **extra;
};

/* "cuda/ccuda.pxd":700
 *     void** extra
 * 
 * ctypedef CUDA_KERNEL_NODE_PARAMS_st CUDA_KERNEL_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_KERNEL_NODE_PARAMS_v1 CUDA_KERNEL_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":702
 * ctypedef CUDA_KERNEL_NODE_PARAMS_st CUDA_KERNEL_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_KERNEL_NODE_PARAMS_v1 CUDA_KERNEL_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEMSET_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_KERNEL_NODE_PARAMS;

/* "cuda/ccuda.pxd":704
 * ctypedef CUDA_KERNEL_NODE_PARAMS_v1 CUDA_KERNEL_NODE_PARAMS
 * 
 * cdef struct CUDA_MEMSET_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUdeviceptr dst
 *     size_t pitch
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUdeviceptr dst;
  size_t pitch;
  unsigned int value;
  unsigned int elementSize;
  size_t width;
  size_t height;
};

/* "cuda/ccuda.pxd":712
 *     size_t height
 * 
 * ctypedef CUDA_MEMSET_NODE_PARAMS_st CUDA_MEMSET_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_MEMSET_NODE_PARAMS_v1 CUDA_MEMSET_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":714
 * ctypedef CUDA_MEMSET_NODE_PARAMS_st CUDA_MEMSET_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_MEMSET_NODE_PARAMS_v1 CUDA_MEMSET_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_HOST_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS;

/* "cuda/ccuda.pxd":716
 * ctypedef CUDA_MEMSET_NODE_PARAMS_v1 CUDA_MEMSET_NODE_PARAMS
 * 
 * cdef struct CUDA_HOST_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUhostFn fn
 *     void* userData
 */
struct __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUhostFn fn;
  void *userData;
};

/* "cuda/ccuda.pxd":720
 *     void* userData
 * 
 * ctypedef CUDA_HOST_NODE_PARAMS_st CUDA_HOST_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_HOST_NODE_PARAMS_v1 CUDA_HOST_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":722
 * ctypedef CUDA_HOST_NODE_PARAMS_st CUDA_HOST_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_HOST_NODE_PARAMS_v1 CUDA_HOST_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphNodeType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_HOST_NODE_PARAMS;

/* "cuda/ccuda.pxd":738
 *     CU_GRAPH_NODE_TYPE_MEM_FREE = 11
 * 
 * ctypedef CUgraphNodeType_enum CUgraphNodeType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUsynchronizationPolicy_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphNodeType_enum __pyx_t_4cuda_5ccuda_CUgraphNodeType;

/* "cuda/ccuda.pxd":746
 *     CU_SYNC_POLICY_BLOCKING_SYNC = 4
 * 
 * ctypedef CUsynchronizationPolicy_enum CUsynchronizationPolicy             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUkernelNodeAttrID_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUsynchronizationPolicy_enum __pyx_t_4cuda_5ccuda_CUsynchronizationPolicy;

/* "cuda/ccuda.pxd":752
 *     CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
 * 
 * ctypedef CUkernelNodeAttrID_enum CUkernelNodeAttrID             # <<<<<<<<<<<<<<
 * 
 * cdef union CUkernelNodeAttrValue_union:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID_enum __pyx_t_4cuda_5ccuda_CUkernelNodeAttrID;

/* "cuda/ccuda.pxd":754
 * ctypedef CUkernelNodeAttrID_enum CUkernelNodeAttrID
 * 
 * cdef union CUkernelNodeAttrValue_union:             # <<<<<<<<<<<<<<
 *     CUaccessPolicyWindow accessPolicyWindow
 *     int cooperative
 */
union __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_union {
  __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow accessPolicyWindow;
  int cooperative;
};

/* "cuda/ccuda.pxd":758
 *     int cooperative
 * 
 * ctypedef CUkernelNodeAttrValue_union CUkernelNodeAttrValue_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUkernelNodeAttrValue_v1 CUkernelNodeAttrValue
 */
typedef union __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_union __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_v1;

/* "cuda/ccuda.pxd":760
 * ctypedef CUkernelNodeAttrValue_union CUkernelNodeAttrValue_v1
 * 
 * ctypedef CUkernelNodeAttrValue_v1 CUkernelNodeAttrValue             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamCaptureStatus_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue_v1 __pyx_t_4cuda_5ccuda_CUkernelNodeAttrValue;

/* "cuda/ccuda.pxd":767
 *     CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2
 * 
 * ctypedef CUstreamCaptureStatus_enum CUstreamCaptureStatus             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamCaptureMode_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus_enum __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus;

/* "cuda/ccuda.pxd":774
 *     CU_STREAM_CAPTURE_MODE_RELAXED = 2
 * 
 * ctypedef CUstreamCaptureMode_enum CUstreamCaptureMode             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUstreamAttrID_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamCaptureMode_enum __pyx_t_4cuda_5ccuda_CUstreamCaptureMode;

/* "cuda/ccuda.pxd":780
 *     CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 * 
 * ctypedef CUstreamAttrID_enum CUstreamAttrID             # <<<<<<<<<<<<<<
 * 
 * cdef union CUstreamAttrValue_union:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUstreamAttrID_enum __pyx_t_4cuda_5ccuda_CUstreamAttrID;

/* "cuda/ccuda.pxd":782
 * ctypedef CUstreamAttrID_enum CUstreamAttrID
 * 
 * cdef union CUstreamAttrValue_union:             # <<<<<<<<<<<<<<
 *     CUaccessPolicyWindow accessPolicyWindow
 *     CUsynchronizationPolicy syncPolicy
 */
union __pyx_t_4cuda_5ccuda_CUstreamAttrValue_union {
  __pyx_t_4cuda_5ccuda_CUaccessPolicyWindow accessPolicyWindow;
  __pyx_t_4cuda_5ccuda_CUsynchronizationPolicy syncPolicy;
};

/* "cuda/ccuda.pxd":786
 *     CUsynchronizationPolicy syncPolicy
 * 
 * ctypedef CUstreamAttrValue_union CUstreamAttrValue_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUstreamAttrValue_v1 CUstreamAttrValue
 */
typedef union __pyx_t_4cuda_5ccuda_CUstreamAttrValue_union __pyx_t_4cuda_5ccuda_CUstreamAttrValue_v1;

/* "cuda/ccuda.pxd":788
 * ctypedef CUstreamAttrValue_union CUstreamAttrValue_v1
 * 
 * ctypedef CUstreamAttrValue_v1 CUstreamAttrValue             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUdriverProcAddress_flags_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUstreamAttrValue_v1 __pyx_t_4cuda_5ccuda_CUstreamAttrValue;

/* "cuda/ccuda.pxd":795
 *     CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = 2
 * 
 * ctypedef CUdriverProcAddress_flags_enum CUdriverProcAddress_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUexecAffinityType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUdriverProcAddress_flags_enum __pyx_t_4cuda_5ccuda_CUdriverProcAddress_flags;

/* "cuda/ccuda.pxd":801
 *     CU_EXEC_AFFINITY_TYPE_MAX = 1
 * 
 * ctypedef CUexecAffinityType_enum CUexecAffinityType             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUexecAffinitySmCount_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUexecAffinityType_enum __pyx_t_4cuda_5ccuda_CUexecAffinityType;

/* "cuda/ccuda.pxd":803
 * ctypedef CUexecAffinityType_enum CUexecAffinityType
 * 
 * cdef struct CUexecAffinitySmCount_st:             # <<<<<<<<<<<<<<
 *     unsigned int val
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_st {
  unsigned int val;
};

/* "cuda/ccuda.pxd":806
 *     unsigned int val
 * 
 * ctypedef CUexecAffinitySmCount_st CUexecAffinitySmCount_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUexecAffinitySmCount_v1 CUexecAffinitySmCount
 */
typedef struct __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_st __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_v1;

/* "cuda/ccuda.pxd":808
 * ctypedef CUexecAffinitySmCount_st CUexecAffinitySmCount_v1
 * 
 * ctypedef CUexecAffinitySmCount_v1 CUexecAffinitySmCount             # <<<<<<<<<<<<<<
 * 
 * cdef union _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u:
 */
typedef __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount_v1 __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount;

/* "cuda/ccuda.pxd":810
 * ctypedef CUexecAffinitySmCount_v1 CUexecAffinitySmCount
 * 
 * cdef union _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u:             # <<<<<<<<<<<<<<
 *     CUexecAffinitySmCount smCount
 * 
 */
union __pyx_t_4cuda_5ccuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u {
  __pyx_t_4cuda_5ccuda_CUexecAffinitySmCount smCount;
};

/* "cuda/ccuda.pxd":813
 *     CUexecAffinitySmCount smCount
 * 
 * cdef struct CUexecAffinityParam_st:             # <<<<<<<<<<<<<<
 *     CUexecAffinityType type
 *     _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u param
 */
struct __pyx_t_4cuda_5ccuda_CUexecAffinityParam_st {
  __pyx_t_4cuda_5ccuda_CUexecAffinityType type;
  union __pyx_t_4cuda_5ccuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u param;
};

/* "cuda/ccuda.pxd":817
 *     _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u param
 * 
 * ctypedef CUexecAffinityParam_st CUexecAffinityParam_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUexecAffinityParam_v1 CUexecAffinityParam
 */
typedef struct __pyx_t_4cuda_5ccuda_CUexecAffinityParam_st __pyx_t_4cuda_5ccuda_CUexecAffinityParam_v1;

/* "cuda/ccuda.pxd":819
 * ctypedef CUexecAffinityParam_st CUexecAffinityParam_v1
 * 
 * ctypedef CUexecAffinityParam_v1 CUexecAffinityParam             # <<<<<<<<<<<<<<
 * 
 * cdef enum cudaError_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUexecAffinityParam_v1 __pyx_t_4cuda_5ccuda_CUexecAffinityParam;

/* "cuda/ccuda.pxd":910
 *     CUDA_ERROR_UNKNOWN = 999
 * 
 * ctypedef cudaError_enum CUresult             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUdevice_P2PAttribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_cudaError_enum __pyx_t_4cuda_5ccuda_CUresult;

/* "cuda/ccuda.pxd":919
 *     CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 4
 * 
 * ctypedef CUdevice_P2PAttribute_enum CUdevice_P2PAttribute             # <<<<<<<<<<<<<<
 * 
 * ctypedef void (*CUstreamCallback)(CUstream hStream, CUresult status, void* userData)
 */
typedef enum __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute_enum __pyx_t_4cuda_5ccuda_CUdevice_P2PAttribute;

/* "cuda/ccuda.pxd":921
 * ctypedef CUdevice_P2PAttribute_enum CUdevice_P2PAttribute
 * 
 * ctypedef void (*CUstreamCallback)(CUstream hStream, CUresult status, void* userData)             # <<<<<<<<<<<<<<
 * 
 * ctypedef size_t (*CUoccupancyB2DSize)(int blockSize)
 */
typedef void (*__pyx_t_4cuda_5ccuda_CUstreamCallback)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUresult, void *);

/* "cuda/ccuda.pxd":923
 * ctypedef void (*CUstreamCallback)(CUstream hStream, CUresult status, void* userData)
 * 
 * ctypedef size_t (*CUoccupancyB2DSize)(int blockSize)             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEMCPY2D_st:
 */
typedef size_t (*__pyx_t_4cuda_5ccuda_CUoccupancyB2DSize)(int);

/* "cuda/ccuda.pxd":925
 * ctypedef size_t (*CUoccupancyB2DSize)(int blockSize)
 * 
 * cdef struct CUDA_MEMCPY2D_st:             # <<<<<<<<<<<<<<
 *     size_t srcXInBytes
 *     size_t srcY
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_st {
  size_t srcXInBytes;
  size_t srcY;
  __pyx_t_4cuda_5ccuda_CUmemorytype srcMemoryType;
  void const *srcHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr srcDevice;
  __pyx_t_4cuda_5ccuda_CUarray srcArray;
  size_t srcPitch;
  size_t dstXInBytes;
  size_t dstY;
  __pyx_t_4cuda_5ccuda_CUmemorytype dstMemoryType;
  void *dstHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr dstDevice;
  __pyx_t_4cuda_5ccuda_CUarray dstArray;
  size_t dstPitch;
  size_t WidthInBytes;
  size_t Height;
};

/* "cuda/ccuda.pxd":943
 *     size_t Height
 * 
 * ctypedef CUDA_MEMCPY2D_st CUDA_MEMCPY2D_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_st __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2;

/* "cuda/ccuda.pxd":945
 * ctypedef CUDA_MEMCPY2D_st CUDA_MEMCPY2D_v2
 * 
 * ctypedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEMCPY3D_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2 __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D;

/* "cuda/ccuda.pxd":947
 * ctypedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D
 * 
 * cdef struct CUDA_MEMCPY3D_st:             # <<<<<<<<<<<<<<
 *     size_t srcXInBytes
 *     size_t srcY
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_st {
  size_t srcXInBytes;
  size_t srcY;
  size_t srcZ;
  size_t srcLOD;
  __pyx_t_4cuda_5ccuda_CUmemorytype srcMemoryType;
  void const *srcHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr srcDevice;
  __pyx_t_4cuda_5ccuda_CUarray srcArray;
  void *reserved0;
  size_t srcPitch;
  size_t srcHeight;
  size_t dstXInBytes;
  size_t dstY;
  size_t dstZ;
  size_t dstLOD;
  __pyx_t_4cuda_5ccuda_CUmemorytype dstMemoryType;
  void *dstHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr dstDevice;
  __pyx_t_4cuda_5ccuda_CUarray dstArray;
  void *reserved1;
  size_t dstPitch;
  size_t dstHeight;
  size_t WidthInBytes;
  size_t Height;
  size_t Depth;
};

/* "cuda/ccuda.pxd":974
 *     size_t Depth
 * 
 * ctypedef CUDA_MEMCPY3D_st CUDA_MEMCPY3D_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_MEMCPY3D_v2 CUDA_MEMCPY3D
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_st __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2;

/* "cuda/ccuda.pxd":976
 * ctypedef CUDA_MEMCPY3D_st CUDA_MEMCPY3D_v2
 * 
 * ctypedef CUDA_MEMCPY3D_v2 CUDA_MEMCPY3D             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEMCPY3D_PEER_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D;

/* "cuda/ccuda.pxd":978
 * ctypedef CUDA_MEMCPY3D_v2 CUDA_MEMCPY3D
 * 
 * cdef struct CUDA_MEMCPY3D_PEER_st:             # <<<<<<<<<<<<<<
 *     size_t srcXInBytes
 *     size_t srcY
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_st {
  size_t srcXInBytes;
  size_t srcY;
  size_t srcZ;
  size_t srcLOD;
  __pyx_t_4cuda_5ccuda_CUmemorytype srcMemoryType;
  void const *srcHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr srcDevice;
  __pyx_t_4cuda_5ccuda_CUarray srcArray;
  __pyx_t_4cuda_5ccuda_CUcontext srcContext;
  size_t srcPitch;
  size_t srcHeight;
  size_t dstXInBytes;
  size_t dstY;
  size_t dstZ;
  size_t dstLOD;
  __pyx_t_4cuda_5ccuda_CUmemorytype dstMemoryType;
  void *dstHost;
  __pyx_t_4cuda_5ccuda_CUdeviceptr dstDevice;
  __pyx_t_4cuda_5ccuda_CUarray dstArray;
  __pyx_t_4cuda_5ccuda_CUcontext dstContext;
  size_t dstPitch;
  size_t dstHeight;
  size_t WidthInBytes;
  size_t Height;
  size_t Depth;
};

/* "cuda/ccuda.pxd":1005
 *     size_t Depth
 * 
 * ctypedef CUDA_MEMCPY3D_PEER_st CUDA_MEMCPY3D_PEER_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_st __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_v1;

/* "cuda/ccuda.pxd":1007
 * ctypedef CUDA_MEMCPY3D_PEER_st CUDA_MEMCPY3D_PEER_v1
 * 
 * ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_ARRAY_DESCRIPTOR_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER_v1 __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER;

/* "cuda/ccuda.pxd":1009
 * ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER
 * 
 * cdef struct CUDA_ARRAY_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *     size_t Width
 *     size_t Height
 */
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_st {
  size_t Width;
  size_t Height;
  __pyx_t_4cuda_5ccuda_CUarray_format Format;
  unsigned int NumChannels;
};

/* "cuda/ccuda.pxd":1015
 *     unsigned int NumChannels
 * 
 * ctypedef CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_ARRAY_DESCRIPTOR_v2 CUDA_ARRAY_DESCRIPTOR
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_st __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_v2;

/* "cuda/ccuda.pxd":1017
 * ctypedef CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR_v2
 * 
 * ctypedef CUDA_ARRAY_DESCRIPTOR_v2 CUDA_ARRAY_DESCRIPTOR             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_ARRAY3D_DESCRIPTOR_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR_v2 __pyx_t_4cuda_5ccuda_CUDA_ARRAY_DESCRIPTOR;

/* "cuda/ccuda.pxd":1019
 * ctypedef CUDA_ARRAY_DESCRIPTOR_v2 CUDA_ARRAY_DESCRIPTOR
 * 
 * cdef struct CUDA_ARRAY3D_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *     size_t Width
 *     size_t Height
 */
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_st {
  size_t Width;
  size_t Height;
  size_t Depth;
  __pyx_t_4cuda_5ccuda_CUarray_format Format;
  unsigned int NumChannels;
  unsigned int Flags;
};

/* "cuda/ccuda.pxd":1027
 *     unsigned int Flags
 * 
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR_v2             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_st __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2;

/* "cuda/ccuda.pxd":1029
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR_v2
 * 
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR;

/* "cuda/ccuda.pxd":1031
 * ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR
 * 
 * cdef struct _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s:             # <<<<<<<<<<<<<<
 *     unsigned int width
 *     unsigned int height
 */
struct __pyx_t_4cuda_5ccuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s {
  unsigned int width;
  unsigned int height;
  unsigned int depth;
};

/* "cuda/ccuda.pxd":1036
 *     unsigned int depth
 * 
 * cdef struct CUDA_ARRAY_SPARSE_PROPERTIES_st:             # <<<<<<<<<<<<<<
 *     _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s tileExtent
 *     unsigned int miptailFirstLevel
 */
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_st {
  struct __pyx_t_4cuda_5ccuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s tileExtent;
  unsigned int miptailFirstLevel;
  unsigned PY_LONG_LONG miptailSize;
  unsigned int flags;
  unsigned int reserved[4];
};

/* "cuda/ccuda.pxd":1043
 *     unsigned int reserved[4]
 * 
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_st CUDA_ARRAY_SPARSE_PROPERTIES_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_st __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1;

/* "cuda/ccuda.pxd":1045
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_st CUDA_ARRAY_SPARSE_PROPERTIES_v1
 * 
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1 __pyx_t_4cuda_5ccuda_CUDA_ARRAY_SPARSE_PROPERTIES;

/* "cuda/ccuda.pxd":1047
 * ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES
 * 
 * cdef struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st:             # <<<<<<<<<<<<<<
 *     size_t size
 *     size_t alignment
 */
struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st {
  size_t size;
  size_t alignment;
  unsigned int reserved[4];
};

/* "cuda/ccuda.pxd":1052
 *     unsigned int reserved[4]
 * 
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_st CUDA_ARRAY_MEMORY_REQUIREMENTS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1;

/* "cuda/ccuda.pxd":1054
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_st CUDA_ARRAY_MEMORY_REQUIREMENTS_v1
 * 
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 __pyx_t_4cuda_5ccuda_CUDA_ARRAY_MEMORY_REQUIREMENTS;

/* "cuda/ccuda.pxd":1056
 * ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s:             # <<<<<<<<<<<<<<
 *     CUarray hArray
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s {
  __pyx_t_4cuda_5ccuda_CUarray hArray;
};

/* "cuda/ccuda.pxd":1059
 *     CUarray hArray
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s:             # <<<<<<<<<<<<<<
 *     CUmipmappedArray hMipmappedArray
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s {
  __pyx_t_4cuda_5ccuda_CUmipmappedArray hMipmappedArray;
};

/* "cuda/ccuda.pxd":1062
 *     CUmipmappedArray hMipmappedArray
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s:             # <<<<<<<<<<<<<<
 *     CUdeviceptr devPtr
 *     CUarray_format format
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s {
  __pyx_t_4cuda_5ccuda_CUdeviceptr devPtr;
  __pyx_t_4cuda_5ccuda_CUarray_format format;
  unsigned int numChannels;
  size_t sizeInBytes;
};

/* "cuda/ccuda.pxd":1068
 *     size_t sizeInBytes
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s:             # <<<<<<<<<<<<<<
 *     CUdeviceptr devPtr
 *     CUarray_format format
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s {
  __pyx_t_4cuda_5ccuda_CUdeviceptr devPtr;
  __pyx_t_4cuda_5ccuda_CUarray_format format;
  unsigned int numChannels;
  size_t width;
  size_t height;
  size_t pitchInBytes;
};

/* "cuda/ccuda.pxd":1076
 *     size_t pitchInBytes
 * 
 * cdef struct _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s:             # <<<<<<<<<<<<<<
 *     int reserved[32]
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s {
  int reserved[32];
};

/* "cuda/ccuda.pxd":1079
 *     int reserved[32]
 * 
 * cdef union _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u:             # <<<<<<<<<<<<<<
 *     _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s array
 *     _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s mipmap
 */
union __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u {
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s array;
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s mipmap;
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s linear;
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s pitch2D;
  struct __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s reserved;
};

/* "cuda/ccuda.pxd":1086
 *     _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s reserved
 * 
 * cdef struct CUDA_RESOURCE_DESC_st:             # <<<<<<<<<<<<<<
 *     CUresourcetype resType
 *     _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u res
 */
struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_st {
  __pyx_t_4cuda_5ccuda_CUresourcetype resType;
  union __pyx_t_4cuda_5ccuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u res;
  unsigned int flags;
};

/* "cuda/ccuda.pxd":1091
 *     unsigned int flags
 * 
 * ctypedef CUDA_RESOURCE_DESC_st CUDA_RESOURCE_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_RESOURCE_DESC_v1 CUDA_RESOURCE_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_st __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_v1;

/* "cuda/ccuda.pxd":1093
 * ctypedef CUDA_RESOURCE_DESC_st CUDA_RESOURCE_DESC_v1
 * 
 * ctypedef CUDA_RESOURCE_DESC_v1 CUDA_RESOURCE_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_TEXTURE_DESC_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC;

/* "cuda/ccuda.pxd":1095
 * ctypedef CUDA_RESOURCE_DESC_v1 CUDA_RESOURCE_DESC
 * 
 * cdef struct CUDA_TEXTURE_DESC_st:             # <<<<<<<<<<<<<<
 *     CUaddress_mode addressMode[3]
 *     CUfilter_mode filterMode
 */
struct __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_st {
  __pyx_t_4cuda_5ccuda_CUaddress_mode addressMode[3];
  __pyx_t_4cuda_5ccuda_CUfilter_mode filterMode;
  unsigned int flags;
  unsigned int maxAnisotropy;
  __pyx_t_4cuda_5ccuda_CUfilter_mode mipmapFilterMode;
  float mipmapLevelBias;
  float minMipmapLevelClamp;
  float maxMipmapLevelClamp;
  float borderColor[4];
  int reserved[12];
};

/* "cuda/ccuda.pxd":1107
 *     int reserved[12]
 * 
 * ctypedef CUDA_TEXTURE_DESC_st CUDA_TEXTURE_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_st __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_v1;

/* "cuda/ccuda.pxd":1109
 * ctypedef CUDA_TEXTURE_DESC_st CUDA_TEXTURE_DESC_v1
 * 
 * ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUresourceViewFormat_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC;

/* "cuda/ccuda.pxd":1148
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34
 * 
 * ctypedef CUresourceViewFormat_enum CUresourceViewFormat             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_RESOURCE_VIEW_DESC_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUresourceViewFormat_enum __pyx_t_4cuda_5ccuda_CUresourceViewFormat;

/* "cuda/ccuda.pxd":1150
 * ctypedef CUresourceViewFormat_enum CUresourceViewFormat
 * 
 * cdef struct CUDA_RESOURCE_VIEW_DESC_st:             # <<<<<<<<<<<<<<
 *     CUresourceViewFormat format
 *     size_t width
 */
struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_st {
  __pyx_t_4cuda_5ccuda_CUresourceViewFormat format;
  size_t width;
  size_t height;
  size_t depth;
  unsigned int firstMipmapLevel;
  unsigned int lastMipmapLevel;
  unsigned int firstLayer;
  unsigned int lastLayer;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1161
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_RESOURCE_VIEW_DESC_st CUDA_RESOURCE_VIEW_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_RESOURCE_VIEW_DESC_v1 CUDA_RESOURCE_VIEW_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_st __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_v1;

/* "cuda/ccuda.pxd":1163
 * ctypedef CUDA_RESOURCE_VIEW_DESC_st CUDA_RESOURCE_VIEW_DESC_v1
 * 
 * ctypedef CUDA_RESOURCE_VIEW_DESC_v1 CUDA_RESOURCE_VIEW_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC;

/* "cuda/ccuda.pxd":1165
 * ctypedef CUDA_RESOURCE_VIEW_DESC_v1 CUDA_RESOURCE_VIEW_DESC
 * 
 * cdef struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:             # <<<<<<<<<<<<<<
 *     unsigned long long p2pToken
 *     unsigned int vaSpaceToken
 */
struct __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st {
  unsigned PY_LONG_LONG p2pToken;
  unsigned int vaSpaceToken;
};

/* "cuda/ccuda.pxd":1169
 *     unsigned int vaSpaceToken
 * 
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 CUDA_POINTER_ATTRIBUTE_P2P_TOKENS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1;

/* "cuda/ccuda.pxd":1171
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1
 * 
 * ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 CUDA_POINTER_ATTRIBUTE_P2P_TOKENS             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS;

/* "cuda/ccuda.pxd":1178
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = 3
 * 
 * ctypedef CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_LAUNCH_PARAMS_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum __pyx_t_4cuda_5ccuda_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS;

/* "cuda/ccuda.pxd":1180
 * ctypedef CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS
 * 
 * cdef struct CUDA_LAUNCH_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUfunction function
 *     unsigned int gridDimX
 */
struct __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUfunction function;
  unsigned int gridDimX;
  unsigned int gridDimY;
  unsigned int gridDimZ;
  unsigned int blockDimX;
  unsigned int blockDimY;
  unsigned int blockDimZ;
  unsigned int sharedMemBytes;
  __pyx_t_4cuda_5ccuda_CUstream hStream;
  void **kernelParams;
};

/* "cuda/ccuda.pxd":1192
 *     void** kernelParams
 * 
 * ctypedef CUDA_LAUNCH_PARAMS_st CUDA_LAUNCH_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_LAUNCH_PARAMS_v1 CUDA_LAUNCH_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_v1;

/* "cuda/ccuda.pxd":1194
 * ctypedef CUDA_LAUNCH_PARAMS_st CUDA_LAUNCH_PARAMS_v1
 * 
 * ctypedef CUDA_LAUNCH_PARAMS_v1 CUDA_LAUNCH_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUexternalMemoryHandleType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_LAUNCH_PARAMS;

/* "cuda/ccuda.pxd":1206
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8
 * 
 * ctypedef CUexternalMemoryHandleType_enum CUexternalMemoryHandleType             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUexternalMemoryHandleType_enum __pyx_t_4cuda_5ccuda_CUexternalMemoryHandleType;

/* "cuda/ccuda.pxd":1208
 * ctypedef CUexternalMemoryHandleType_enum CUexternalMemoryHandleType
 * 
 * cdef struct _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s:             # <<<<<<<<<<<<<<
 *     void* handle
 *     void* name
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s {
  void *handle;
  void *name;
};

/* "cuda/ccuda.pxd":1212
 *     void* name
 * 
 * cdef union _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u:             # <<<<<<<<<<<<<<
 *     int fd
 *     _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s win32
 */
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u {
  int fd;
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s win32;
  void *nvSciBufObject;
};

/* "cuda/ccuda.pxd":1217
 *     void* nvSciBufObject
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *     CUexternalMemoryHandleType type
 *     _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u handle
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st {
  __pyx_t_4cuda_5ccuda_CUexternalMemoryHandleType type;
  union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u handle;
  unsigned PY_LONG_LONG size;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1224
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 CUDA_EXTERNAL_MEMORY_HANDLE_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1;

/* "cuda/ccuda.pxd":1226
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 CUDA_EXTERNAL_MEMORY_HANDLE_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC;

/* "cuda/ccuda.pxd":1228
 * ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 CUDA_EXTERNAL_MEMORY_HANDLE_DESC
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:             # <<<<<<<<<<<<<<
 *     unsigned long long offset
 *     unsigned long long size
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st {
  unsigned PY_LONG_LONG offset;
  unsigned PY_LONG_LONG size;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1234
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 CUDA_EXTERNAL_MEMORY_BUFFER_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1;

/* "cuda/ccuda.pxd":1236
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 CUDA_EXTERNAL_MEMORY_BUFFER_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC;

/* "cuda/ccuda.pxd":1238
 * ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 CUDA_EXTERNAL_MEMORY_BUFFER_DESC
 * 
 * cdef struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:             # <<<<<<<<<<<<<<
 *     unsigned long long offset
 *     CUDA_ARRAY3D_DESCRIPTOR arrayDesc
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st {
  unsigned PY_LONG_LONG offset;
  __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR arrayDesc;
  unsigned int numLevels;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1244
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1;

/* "cuda/ccuda.pxd":1246
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1
 * 
 * ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUexternalSemaphoreHandleType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC;

/* "cuda/ccuda.pxd":1260
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = 10
 * 
 * ctypedef CUexternalSemaphoreHandleType_enum CUexternalSemaphoreHandleType             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUexternalSemaphoreHandleType_enum __pyx_t_4cuda_5ccuda_CUexternalSemaphoreHandleType;

/* "cuda/ccuda.pxd":1262
 * ctypedef CUexternalSemaphoreHandleType_enum CUexternalSemaphoreHandleType
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s:             # <<<<<<<<<<<<<<
 *     void* handle
 *     void* name
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s {
  void *handle;
  void *name;
};

/* "cuda/ccuda.pxd":1266
 *     void* name
 * 
 * cdef union _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u:             # <<<<<<<<<<<<<<
 *     int fd
 *     _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s win32
 */
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u {
  int fd;
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s win32;
  void *nvSciSyncObj;
};

/* "cuda/ccuda.pxd":1271
 *     void* nvSciSyncObj
 * 
 * cdef struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *     CUexternalSemaphoreHandleType type
 *     _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u handle
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st {
  __pyx_t_4cuda_5ccuda_CUexternalSemaphoreHandleType type;
  union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u handle;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1277
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1;

/* "cuda/ccuda.pxd":1279
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC;

/* "cuda/ccuda.pxd":1281
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s:             # <<<<<<<<<<<<<<
 *     unsigned long long value
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s {
  unsigned PY_LONG_LONG value;
};

/* "cuda/ccuda.pxd":1284
 *     unsigned long long value
 * 
 * cdef union _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u:             # <<<<<<<<<<<<<<
 *     void* fence
 *     unsigned long long reserved
 */
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u {
  void *fence;
  unsigned PY_LONG_LONG reserved;
};

/* "cuda/ccuda.pxd":1288
 *     unsigned long long reserved
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s:             # <<<<<<<<<<<<<<
 *     unsigned long long key
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s {
  unsigned PY_LONG_LONG key;
};

/* "cuda/ccuda.pxd":1291
 *     unsigned long long key
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s:             # <<<<<<<<<<<<<<
 *     _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s fence
 *     _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u nvSciSync
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s {
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s fence;
  union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u nvSciSync;
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s keyedMutex;
  unsigned int reserved[12];
};

/* "cuda/ccuda.pxd":1297
 *     unsigned int reserved[12]
 * 
 * cdef struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:             # <<<<<<<<<<<<<<
 *     _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s params
 *     unsigned int flags
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st {
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s params;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1302
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1;

/* "cuda/ccuda.pxd":1304
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS;

/* "cuda/ccuda.pxd":1306
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s:             # <<<<<<<<<<<<<<
 *     unsigned long long value
 * 
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s {
  unsigned PY_LONG_LONG value;
};

/* "cuda/ccuda.pxd":1309
 *     unsigned long long value
 * 
 * cdef union _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u:             # <<<<<<<<<<<<<<
 *     void* fence
 *     unsigned long long reserved
 */
union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u {
  void *fence;
  unsigned PY_LONG_LONG reserved;
};

/* "cuda/ccuda.pxd":1313
 *     unsigned long long reserved
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s:             # <<<<<<<<<<<<<<
 *     unsigned long long key
 *     unsigned int timeoutMs
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s {
  unsigned PY_LONG_LONG key;
  unsigned int timeoutMs;
};

/* "cuda/ccuda.pxd":1317
 *     unsigned int timeoutMs
 * 
 * cdef struct _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s:             # <<<<<<<<<<<<<<
 *     _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s fence
 *     _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u nvSciSync
 */
struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s {
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s fence;
  union __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u nvSciSync;
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s keyedMutex;
  unsigned int reserved[10];
};

/* "cuda/ccuda.pxd":1323
 *     unsigned int reserved[10]
 * 
 * cdef struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:             # <<<<<<<<<<<<<<
 *     _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s params
 *     unsigned int flags
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st {
  struct __pyx_t_4cuda_5ccuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s params;
  unsigned int flags;
  unsigned int reserved[16];
};

/* "cuda/ccuda.pxd":1328
 *     unsigned int reserved[16]
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1;

/* "cuda/ccuda.pxd":1330
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1
 * 
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS;

/* "cuda/ccuda.pxd":1332
 * ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS
 * 
 * cdef struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUexternalSemaphore* extSemArray
 *     const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUexternalSemaphore *extSemArray;
  __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *paramsArray;
  unsigned int numExtSems;
};

/* "cuda/ccuda.pxd":1337
 *     unsigned int numExtSems
 * 
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 CUDA_EXT_SEM_SIGNAL_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":1339
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 CUDA_EXT_SEM_SIGNAL_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS;

/* "cuda/ccuda.pxd":1341
 * ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 CUDA_EXT_SEM_SIGNAL_NODE_PARAMS
 * 
 * cdef struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUexternalSemaphore* extSemArray
 *     const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray
 */
struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUexternalSemaphore *extSemArray;
  __pyx_t_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *paramsArray;
  unsigned int numExtSems;
};

/* "cuda/ccuda.pxd":1346
 *     unsigned int numExtSems
 * 
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1;

/* "cuda/ccuda.pxd":1348
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1
 * 
 * ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long CUmemGenericAllocationHandle_v1
 */
typedef __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 __pyx_t_4cuda_5ccuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS;

/* "cuda/ccuda.pxd":1361
 *     CU_MEM_HANDLE_TYPE_MAX = 2147483647
 * 
 * ctypedef CUmemAllocationHandleType_enum CUmemAllocationHandleType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAccess_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType_enum __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType;

/* "cuda/ccuda.pxd":1369
 *     CU_MEM_ACCESS_FLAGS_PROT_MAX = 2147483647
 * 
 * ctypedef CUmemAccess_flags_enum CUmemAccess_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemLocationType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAccess_flags_enum __pyx_t_4cuda_5ccuda_CUmemAccess_flags;

/* "cuda/ccuda.pxd":1376
 *     CU_MEM_LOCATION_TYPE_MAX = 2147483647
 * 
 * ctypedef CUmemLocationType_enum CUmemLocationType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemLocationType_enum __pyx_t_4cuda_5ccuda_CUmemLocationType;

/* "cuda/ccuda.pxd":1383
 *     CU_MEM_ALLOCATION_TYPE_MAX = 2147483647
 * 
 * ctypedef CUmemAllocationType_enum CUmemAllocationType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationGranularity_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAllocationType_enum __pyx_t_4cuda_5ccuda_CUmemAllocationType;

/* "cuda/ccuda.pxd":1389
 *     CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1
 * 
 * ctypedef CUmemAllocationGranularity_flags_enum CUmemAllocationGranularity_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUarraySparseSubresourceType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags_enum __pyx_t_4cuda_5ccuda_CUmemAllocationGranularity_flags;

/* "cuda/ccuda.pxd":1395
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1
 * 
 * ctypedef CUarraySparseSubresourceType_enum CUarraySparseSubresourceType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemOperationType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUarraySparseSubresourceType_enum __pyx_t_4cuda_5ccuda_CUarraySparseSubresourceType;

/* "cuda/ccuda.pxd":1401
 *     CU_MEM_OPERATION_TYPE_UNMAP = 2
 * 
 * ctypedef CUmemOperationType_enum CUmemOperationType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemHandleType_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemOperationType_enum __pyx_t_4cuda_5ccuda_CUmemOperationType;

/* "cuda/ccuda.pxd":1406
 *     CU_MEM_HANDLE_TYPE_GENERIC = 0
 * 
 * ctypedef CUmemHandleType_enum CUmemHandleType             # <<<<<<<<<<<<<<
 * 
 * cdef union _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemHandleType_enum __pyx_t_4cuda_5ccuda_CUmemHandleType;

/* "cuda/ccuda.pxd":1408
 * ctypedef CUmemHandleType_enum CUmemHandleType
 * 
 * cdef union _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u:             # <<<<<<<<<<<<<<
 *     CUmipmappedArray mipmap
 *     CUarray array
 */
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u {
  __pyx_t_4cuda_5ccuda_CUmipmappedArray mipmap;
  __pyx_t_4cuda_5ccuda_CUarray array;
};

/* "cuda/ccuda.pxd":1412
 *     CUarray array
 * 
 * cdef struct _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s:             # <<<<<<<<<<<<<<
 *     unsigned int level
 *     unsigned int layer
 */
struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s {
  unsigned int level;
  unsigned int layer;
  unsigned int offsetX;
  unsigned int offsetY;
  unsigned int offsetZ;
  unsigned int extentWidth;
  unsigned int extentHeight;
  unsigned int extentDepth;
};

/* "cuda/ccuda.pxd":1422
 *     unsigned int extentDepth
 * 
 * cdef struct _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s:             # <<<<<<<<<<<<<<
 *     unsigned int layer
 *     unsigned long long offset
 */
struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s {
  unsigned int layer;
  unsigned PY_LONG_LONG offset;
  unsigned PY_LONG_LONG size;
};

/* "cuda/ccuda.pxd":1427
 *     unsigned long long size
 * 
 * cdef union _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u:             # <<<<<<<<<<<<<<
 *     _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s sparseLevel
 *     _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s miptail
 */
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u {
  struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s sparseLevel;
  struct __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s miptail;
};

/* "cuda/ccuda.pxd":1431
 *     _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s miptail
 * 
 * cdef union _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u:             # <<<<<<<<<<<<<<
 *     CUmemGenericAllocationHandle memHandle
 * 
 */
union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u {
  __pyx_t_4cuda_5ccuda_CUmemGenericAllocationHandle memHandle;
};

/* "cuda/ccuda.pxd":1434
 *     CUmemGenericAllocationHandle memHandle
 * 
 * cdef struct CUarrayMapInfo_st:             # <<<<<<<<<<<<<<
 *     CUresourcetype resourceType
 *     _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u resource
 */
struct __pyx_t_4cuda_5ccuda_CUarrayMapInfo_st {
  __pyx_t_4cuda_5ccuda_CUresourcetype resourceType;
  union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u resource;
  __pyx_t_4cuda_5ccuda_CUarraySparseSubresourceType subresourceType;
  union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u subresource;
  __pyx_t_4cuda_5ccuda_CUmemOperationType memOperationType;
  __pyx_t_4cuda_5ccuda_CUmemHandleType memHandleType;
  union __pyx_t_4cuda_5ccuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u memHandle;
  unsigned PY_LONG_LONG offset;
  unsigned int deviceBitMask;
  unsigned int flags;
  unsigned int reserved[2];
};

/* "cuda/ccuda.pxd":1447
 *     unsigned int reserved[2]
 * 
 * ctypedef CUarrayMapInfo_st CUarrayMapInfo_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUarrayMapInfo_v1 CUarrayMapInfo
 */
typedef struct __pyx_t_4cuda_5ccuda_CUarrayMapInfo_st __pyx_t_4cuda_5ccuda_CUarrayMapInfo_v1;

/* "cuda/ccuda.pxd":1449
 * ctypedef CUarrayMapInfo_st CUarrayMapInfo_v1
 * 
 * ctypedef CUarrayMapInfo_v1 CUarrayMapInfo             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUmemLocation_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUarrayMapInfo_v1 __pyx_t_4cuda_5ccuda_CUarrayMapInfo;

/* "cuda/ccuda.pxd":1451
 * ctypedef CUarrayMapInfo_v1 CUarrayMapInfo
 * 
 * cdef struct CUmemLocation_st:             # <<<<<<<<<<<<<<
 *     CUmemLocationType type
 *     int id
 */
struct __pyx_t_4cuda_5ccuda_CUmemLocation_st {
  __pyx_t_4cuda_5ccuda_CUmemLocationType type;
  int id;
};

/* "cuda/ccuda.pxd":1455
 *     int id
 * 
 * ctypedef CUmemLocation_st CUmemLocation_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemLocation_v1 CUmemLocation
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemLocation_st __pyx_t_4cuda_5ccuda_CUmemLocation_v1;

/* "cuda/ccuda.pxd":1457
 * ctypedef CUmemLocation_st CUmemLocation_v1
 * 
 * ctypedef CUmemLocation_v1 CUmemLocation             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemAllocationCompType_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemLocation_v1 __pyx_t_4cuda_5ccuda_CUmemLocation;

/* "cuda/ccuda.pxd":1463
 *     CU_MEM_ALLOCATION_COMP_GENERIC = 1
 * 
 * ctypedef CUmemAllocationCompType_enum CUmemAllocationCompType             # <<<<<<<<<<<<<<
 * 
 * cdef struct _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemAllocationCompType_enum __pyx_t_4cuda_5ccuda_CUmemAllocationCompType;

/* "cuda/ccuda.pxd":1465
 * ctypedef CUmemAllocationCompType_enum CUmemAllocationCompType
 * 
 * cdef struct _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s:             # <<<<<<<<<<<<<<
 *     unsigned char compressionType
 *     unsigned char gpuDirectRDMACapable
 */
struct __pyx_t_4cuda_5ccuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s {
  unsigned char compressionType;
  unsigned char gpuDirectRDMACapable;
  unsigned short usage;
  unsigned char reserved[4];
};

/* "cuda/ccuda.pxd":1471
 *     unsigned char reserved[4]
 * 
 * cdef struct CUmemAllocationProp_st:             # <<<<<<<<<<<<<<
 *     CUmemAllocationType type
 *     CUmemAllocationHandleType requestedHandleTypes
 */
struct __pyx_t_4cuda_5ccuda_CUmemAllocationProp_st {
  __pyx_t_4cuda_5ccuda_CUmemAllocationType type;
  __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType requestedHandleTypes;
  __pyx_t_4cuda_5ccuda_CUmemLocation location;
  void *win32HandleMetaData;
  struct __pyx_t_4cuda_5ccuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s allocFlags;
};

/* "cuda/ccuda.pxd":1478
 *     _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s allocFlags
 * 
 * ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemAllocationProp_v1 CUmemAllocationProp
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemAllocationProp_st __pyx_t_4cuda_5ccuda_CUmemAllocationProp_v1;

/* "cuda/ccuda.pxd":1480
 * ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1
 * 
 * ctypedef CUmemAllocationProp_v1 CUmemAllocationProp             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUmemAccessDesc_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemAllocationProp_v1 __pyx_t_4cuda_5ccuda_CUmemAllocationProp;

/* "cuda/ccuda.pxd":1482
 * ctypedef CUmemAllocationProp_v1 CUmemAllocationProp
 * 
 * cdef struct CUmemAccessDesc_st:             # <<<<<<<<<<<<<<
 *     CUmemLocation location
 *     CUmemAccess_flags flags
 */
struct __pyx_t_4cuda_5ccuda_CUmemAccessDesc_st {
  __pyx_t_4cuda_5ccuda_CUmemLocation location;
  __pyx_t_4cuda_5ccuda_CUmemAccess_flags flags;
};

/* "cuda/ccuda.pxd":1486
 *     CUmemAccess_flags flags
 * 
 * ctypedef CUmemAccessDesc_st CUmemAccessDesc_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemAccessDesc_v1 CUmemAccessDesc
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemAccessDesc_st __pyx_t_4cuda_5ccuda_CUmemAccessDesc_v1;

/* "cuda/ccuda.pxd":1488
 * ctypedef CUmemAccessDesc_st CUmemAccessDesc_v1
 * 
 * ctypedef CUmemAccessDesc_v1 CUmemAccessDesc             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphExecUpdateResult_enum:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemAccessDesc_v1 __pyx_t_4cuda_5ccuda_CUmemAccessDesc;

/* "cuda/ccuda.pxd":1501
 *     CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = 8
 * 
 * ctypedef CUgraphExecUpdateResult_enum CUgraphExecUpdateResult             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUmemPool_attribute_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult_enum __pyx_t_4cuda_5ccuda_CUgraphExecUpdateResult;

/* "cuda/ccuda.pxd":1513
 *     CU_MEMPOOL_ATTR_USED_MEM_HIGH = 8
 * 
 * ctypedef CUmemPool_attribute_enum CUmemPool_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUmemPoolProps_st:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUmemPool_attribute_enum __pyx_t_4cuda_5ccuda_CUmemPool_attribute;

/* "cuda/ccuda.pxd":1515
 * ctypedef CUmemPool_attribute_enum CUmemPool_attribute
 * 
 * cdef struct CUmemPoolProps_st:             # <<<<<<<<<<<<<<
 *     CUmemAllocationType allocType
 *     CUmemAllocationHandleType handleTypes
 */
struct __pyx_t_4cuda_5ccuda_CUmemPoolProps_st {
  __pyx_t_4cuda_5ccuda_CUmemAllocationType allocType;
  __pyx_t_4cuda_5ccuda_CUmemAllocationHandleType handleTypes;
  __pyx_t_4cuda_5ccuda_CUmemLocation location;
  void *win32SecurityAttributes;
  unsigned char reserved[64];
};

/* "cuda/ccuda.pxd":1522
 *     unsigned char reserved[64]
 * 
 * ctypedef CUmemPoolProps_st CUmemPoolProps_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemPoolProps_v1 CUmemPoolProps
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemPoolProps_st __pyx_t_4cuda_5ccuda_CUmemPoolProps_v1;

/* "cuda/ccuda.pxd":1524
 * ctypedef CUmemPoolProps_st CUmemPoolProps_v1
 * 
 * ctypedef CUmemPoolProps_v1 CUmemPoolProps             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUmemPoolPtrExportData_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemPoolProps_v1 __pyx_t_4cuda_5ccuda_CUmemPoolProps;

/* "cuda/ccuda.pxd":1526
 * ctypedef CUmemPoolProps_v1 CUmemPoolProps
 * 
 * cdef struct CUmemPoolPtrExportData_st:             # <<<<<<<<<<<<<<
 *     unsigned char reserved[64]
 * 
 */
struct __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_st {
  unsigned char reserved[64];
};

/* "cuda/ccuda.pxd":1529
 *     unsigned char reserved[64]
 * 
 * ctypedef CUmemPoolPtrExportData_st CUmemPoolPtrExportData_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUmemPoolPtrExportData_v1 CUmemPoolPtrExportData
 */
typedef struct __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_st __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_v1;

/* "cuda/ccuda.pxd":1531
 * ctypedef CUmemPoolPtrExportData_st CUmemPoolPtrExportData_v1
 * 
 * ctypedef CUmemPoolPtrExportData_v1 CUmemPoolPtrExportData             # <<<<<<<<<<<<<<
 * 
 * cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_st:
 */
typedef __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData_v1 __pyx_t_4cuda_5ccuda_CUmemPoolPtrExportData;

/* "cuda/ccuda.pxd":1533
 * ctypedef CUmemPoolPtrExportData_v1 CUmemPoolPtrExportData
 * 
 * cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     CUmemPoolProps poolProps
 *     const CUmemAccessDesc* accessDescs
 */
struct __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS_st {
  __pyx_t_4cuda_5ccuda_CUmemPoolProps poolProps;
  __pyx_t_4cuda_5ccuda_CUmemAccessDesc const *accessDescs;
  size_t accessDescCount;
  size_t bytesize;
  __pyx_t_4cuda_5ccuda_CUdeviceptr dptr;
};

/* "cuda/ccuda.pxd":1540
 *     CUdeviceptr dptr
 * 
 * ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_st CUDA_MEM_ALLOC_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphMem_attribute_enum:
 */
typedef struct __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS_st __pyx_t_4cuda_5ccuda_CUDA_MEM_ALLOC_NODE_PARAMS;

/* "cuda/ccuda.pxd":1548
 *     CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = 3
 * 
 * ctypedef CUgraphMem_attribute_enum CUgraphMem_attribute             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUflushGPUDirectRDMAWritesOptions_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphMem_attribute_enum __pyx_t_4cuda_5ccuda_CUgraphMem_attribute;

/* "cuda/ccuda.pxd":1554
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 2
 * 
 * ctypedef CUflushGPUDirectRDMAWritesOptions_enum CUflushGPUDirectRDMAWritesOptions             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUGPUDirectRDMAWritesOrdering_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions_enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesOptions;

/* "cuda/ccuda.pxd":1561
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = 200
 * 
 * ctypedef CUGPUDirectRDMAWritesOrdering_enum CUGPUDirectRDMAWritesOrdering             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUflushGPUDirectRDMAWritesScope_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGPUDirectRDMAWritesOrdering_enum __pyx_t_4cuda_5ccuda_CUGPUDirectRDMAWritesOrdering;

/* "cuda/ccuda.pxd":1567
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 200
 * 
 * ctypedef CUflushGPUDirectRDMAWritesScope_enum CUflushGPUDirectRDMAWritesScope             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUflushGPUDirectRDMAWritesTarget_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope_enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesScope;

/* "cuda/ccuda.pxd":1572
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0
 * 
 * ctypedef CUflushGPUDirectRDMAWritesTarget_enum CUflushGPUDirectRDMAWritesTarget             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphDebugDot_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget_enum __pyx_t_4cuda_5ccuda_CUflushGPUDirectRDMAWritesTarget;

/* "cuda/ccuda.pxd":1589
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = 4096
 * 
 * ctypedef CUgraphDebugDot_flags_enum CUgraphDebugDot_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUuserObject_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphDebugDot_flags_enum __pyx_t_4cuda_5ccuda_CUgraphDebugDot_flags;

/* "cuda/ccuda.pxd":1594
 *     CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = 1
 * 
 * ctypedef CUuserObject_flags_enum CUuserObject_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUuserObjectRetain_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUuserObject_flags_enum __pyx_t_4cuda_5ccuda_CUuserObject_flags;

/* "cuda/ccuda.pxd":1599
 *     CU_GRAPH_USER_OBJECT_MOVE = 1
 * 
 * ctypedef CUuserObjectRetain_flags_enum CUuserObjectRetain_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUgraphInstantiate_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUuserObjectRetain_flags_enum __pyx_t_4cuda_5ccuda_CUuserObjectRetain_flags;

/* "cuda/ccuda.pxd":1604
 *     CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1
 * 
 * ctypedef CUgraphInstantiate_flags_enum CUgraphInstantiate_flags             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef enum __pyx_t_4cuda_5ccuda_CUgraphInstantiate_flags_enum __pyx_t_4cuda_5ccuda_CUgraphInstantiate_flags;

/* "cuda/ccuda.pxd":2318
 *     CU_OUT_CSV = 1
 * 
 * ctypedef CUoutput_mode_enum CUoutput_mode             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef enum __pyx_t_4cuda_5ccuda_CUoutput_mode_enum __pyx_t_4cuda_5ccuda_CUoutput_mode;

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

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

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

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

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

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

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

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

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

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

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

/* "cuda/ccuda.pxd":2554
 *     CU_GL_DEVICE_LIST_NEXT_FRAME = 3
 * 
 * ctypedef CUGLDeviceList_enum CUGLDeviceList             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum __pyx_t_4cuda_5ccuda_CUGLDeviceList;

/* "cuda/ccuda.pxd":2563
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
 * 
 * ctypedef CUGLmap_flags_enum CUGLmap_flags             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_VERSION = 11060
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum __pyx_t_4cuda_5ccuda_CUGLmap_flags;
struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState;
struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData_st;
typedef struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData_st __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData_st;

/* "cuda/_lib/ccudart/utils.pyx":14
 * cimport cuda._cuda.ccuda as ccuda
 * 
 * cdef struct cudaArrayLocalState:             # <<<<<<<<<<<<<<
 *     ccuda.CUarray array
 *     cudaChannelFormatDesc desc
 */
struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState {
  __pyx_t_4cuda_5ccuda_CUarray array;
  struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc desc;
  size_t depth;
  size_t height;
  size_t width;
  size_t elementSize;
  size_t widthInBytes;
};

/* "cuda/_lib/ccudart/utils.pyx":23
 *     size_t widthInBytes
 * 
 * ctypedef struct cudaStreamCallbackData_st:             # <<<<<<<<<<<<<<
 *     cudaStreamCallback_t callback
 *     void *userData
 */
struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData_st {
  __pyx_t_4cuda_7ccudart_cudaStreamCallback_t callback;
  void *userData;
};

/* "cuda/_lib/ccudart/utils.pyx":27
 *     void *userData
 * 
 * ctypedef cudaStreamCallbackData_st cudaStreamCallbackData             # <<<<<<<<<<<<<<
 * 
 * cdef class cudaPythonGlobal:
 */
typedef __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData_st __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData;

/* "cuda/_lib/ccudart/utils.pxd":14
 * cimport cuda._cuda.ccuda as ccuda
 * 
 * cdef class cudaPythonGlobal:             # <<<<<<<<<<<<<<
 *     cdef bint _cudaPythonInit
 *     cdef int _numDevices
 */
struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal {
  PyObject_HEAD
  struct __pyx_vtabstruct_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_vtab;
  int _cudaPythonInit;
  int _numDevices;
  __pyx_t_4cuda_5ccuda_CUdevice *_driverDevice;
  __pyx_t_4cuda_5ccuda_CUcontext *_driverContext;
  bool *_deviceInit;
  struct __pyx_t_4cuda_7ccudart_cudaDeviceProp *_deviceProperties;
  __pyx_t_4cuda_7ccudart_cudaError_t _lastError;
  int CUDART_VERSION;
};



/* "cuda/_lib/ccudart/utils.pyx":29
 * ctypedef cudaStreamCallbackData_st cudaStreamCallbackData
 * 
 * cdef class cudaPythonGlobal:             # <<<<<<<<<<<<<<
 *     def __cinit__(self):
 *         self._cudaPythonInit = False
 */

struct __pyx_vtabstruct_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal {
  __pyx_t_4cuda_7ccudart_cudaError_t (*lazyInit)(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *);
  __pyx_t_4cuda_7ccudart_cudaError_t (*lazyInitDevice)(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *, int);
};
static struct __pyx_vtabstruct_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_vtabptr_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal;

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

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

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

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

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

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

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

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

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

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

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

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

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

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

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

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

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

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

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

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

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

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

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

/* CppExceptionConversion.proto */
#ifndef __Pyx_CppExn2PyErr
#include <new>
#include <typeinfo>
#include <stdexcept>
#include <ios>
static void __Pyx_CppExn2PyErr() {
  try {
    if (PyErr_Occurred())
      ; // let the latest Python exn pass through and ignore the current one
    else
      throw;
  } catch (const std::bad_alloc& exn) {
    PyErr_SetString(PyExc_MemoryError, exn.what());
  } catch (const std::bad_cast& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::bad_typeid& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::domain_error& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::invalid_argument& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::ios_base::failure& exn) {
    PyErr_SetString(PyExc_IOError, exn.what());
  } catch (const std::out_of_range& exn) {
    PyErr_SetString(PyExc_IndexError, exn.what());
  } catch (const std::overflow_error& exn) {
    PyErr_SetString(PyExc_OverflowError, exn.what());
  } catch (const std::range_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::underflow_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::exception& exn) {
    PyErr_SetString(PyExc_RuntimeError, exn.what());
  }
  catch (...)
  {
    PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
  }
}
#endif

/* 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_unsigned_int(unsigned int value);

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

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

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

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

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

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

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

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

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

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_lazyInit(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self); /* proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_lazyInitDevice(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self, int __pyx_v_deviceOrdinal); /* proto*/

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

/* 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_cudaMemcpyToArray)(__pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, void const *, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t (*__pyx_f_4cuda_7ccudart_cudaMemcpyFromArray)(void *, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind); /*proto*/
static struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr (*__pyx_f_4cuda_7ccudart_make_cudaPitchedPtr)(void *, size_t, size_t, size_t); /*proto*/

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

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

/* Module declarations from 'libcpp' */

/* Module declarations from 'cuda.ccuda' */

/* Module declarations from 'cuda._cuda.ccuda' */
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuInit)(unsigned int); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet)(__pyx_t_4cuda_5ccuda_CUdevice *, int); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount)(int *); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName)(char *, int, __pyx_t_4cuda_5ccuda_CUdevice); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid)(__pyx_t_4cuda_5ccuda_CUuuid *, __pyx_t_4cuda_5ccuda_CUdevice); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2)(size_t *, __pyx_t_4cuda_5ccuda_CUdevice); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute)(int *, __pyx_t_4cuda_5ccuda_CUdevice_attribute, __pyx_t_4cuda_5ccuda_CUdevice); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain)(__pyx_t_4cuda_5ccuda_CUcontext *, __pyx_t_4cuda_5ccuda_CUdevice); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent)(__pyx_t_4cuda_5ccuda_CUcontext); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent)(__pyx_t_4cuda_5ccuda_CUcontext *); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2)(__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t *, size_t, size_t, unsigned int); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc)(void **, size_t, unsigned int); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2)(__pyx_t_4cuda_5ccuda_CUdeviceptr, void const *, size_t); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2)(void *, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2)(__pyx_t_4cuda_5ccuda_CUdeviceptr, void const *, size_t, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2)(void *, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2)(__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync)(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2)(__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned char, size_t); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned char, size_t, size_t); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async)(__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned char, size_t, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async)(__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned char, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR const *); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2)(__pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR *, __pyx_t_4cuda_5ccuda_CUarray); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate)(__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel)(__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUmipmappedArray, unsigned int); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCallback, void *, unsigned int); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *, __pyx_t_4cuda_5ccuda_cuuint64_t *); /*proto*/
static __pyx_t_4cuda_5ccuda_CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2)(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *, __pyx_t_4cuda_5ccuda_cuuint64_t *, __pyx_t_4cuda_5ccuda_CUgraph *, __pyx_t_4cuda_5ccuda_CUgraphNode const **, size_t *); /*proto*/

/* Module declarations from 'cuda._lib.ccudart.utils' */
static PyTypeObject *__pyx_ptype_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal = 0;
static struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global = 0;
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils__setLastError(__pyx_t_4cuda_7ccudart_cudaError_t); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo(struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *, int *, __pyx_t_4cuda_5ccuda_CUarray_format *); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelFormatDescFromDriverDesc(struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc *, size_t *, size_t *, size_t *, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 const *); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromHost2D(__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice2D(__pyx_t_4cuda_5ccuda_CUmemorytype, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToHost2D(__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char *, size_t, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice2D(__pyx_t_4cuda_5ccuda_CUmemorytype, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToArray2D(__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, __pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, size_t, size_t); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memsetPtr(char *, int, size_t, __pyx_t_4cuda_7ccudart_cudaStream_t, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memset2DPtr(char *, size_t, int, size_t, size_t, __pyx_t_4cuda_7ccudart_cudaStream_t, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromHost(__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice(__pyx_t_4cuda_5ccuda_CUmemorytype, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToHost(__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char *, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice(__pyx_t_4cuda_5ccuda_CUmemorytype, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_toDriverMemCopy3DParams(struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms const *, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D *); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DPtr(char *, size_t, char const *, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind, __pyx_t_4cuda_7ccudart_cudaStream_t, bool); /*proto*/
static int __pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *, int, int, int, int, int); /*proto*/
static void __pyx_f_4cuda_4_lib_7ccudart_5utils_cudaStreamRtCallbackWrapper(__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUresult, void *); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_toRuntimeStreamCaptureStatus(__pyx_t_4cuda_5ccuda_CUstreamCaptureStatus, enum __pyx_t_4cuda_7ccudart_cudaStreamCaptureStatus *); /*proto*/
static __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum, enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum); /*proto*/
static __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2 __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy2DInit(enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum, enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_bytesPerElement(size_t *, int, __pyx_t_4cuda_5ccuda_CUarray_format); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getArrayBlockExtent(struct __pyx_t_4cuda_7ccudart_cudaExtent *, __pyx_t_4cuda_5ccuda_CUarray_format); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState(struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState *, __pyx_t_4cuda_7ccudart_cudaArray_const_t); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToArray(__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, __pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, size_t); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat(__pyx_t_4cuda_7ccudart_cudaArray_const_t, int &, __pyx_t_4cuda_5ccuda_CUarray_format *); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3DPeer(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER *, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 *, __pyx_t_4cuda_5ccuda_CUstream, bool); /*proto*/
static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getElementSize(size_t *, __pyx_t_4cuda_7ccudart_cudaArray_t); /*proto*/
#define __Pyx_MODULE_NAME "cuda._lib.ccudart.utils"
extern int __pyx_module_is_main_cuda___lib__ccudart__utils;
int __pyx_module_is_main_cuda___lib__ccudart__utils = 0;

/* Implementation of 'cuda._lib.ccudart.utils' */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_cudaPythonGlobal[] = "cudaPythonGlobal";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_cuda__lib_ccudart_utils[] = "cuda._lib.ccudart.utils";
static const char __pyx_k_cudaPythonGlobal___reduce_cython[] = "cudaPythonGlobal.__reduce_cython__";
static const char __pyx_k_cudaPythonGlobal___setstate_cyth[] = "cudaPythonGlobal.__setstate_cython__";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_cudaPythonGlobal;
static PyObject *__pyx_n_s_cudaPythonGlobal___reduce_cython;
static PyObject *__pyx_n_s_cudaPythonGlobal___setstate_cyth;
static PyObject *__pyx_n_s_cuda__lib_ccudart_utils;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_test;
static int __pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal___cinit__(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self); /* proto */
static void __pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_2__dealloc__(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_codeobj__3;
/* Late includes */

/* "cuda/_lib/ccudart/utils.pyx":30
 * 
 * cdef class cudaPythonGlobal:
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._cudaPythonInit = False
 *         self._numDevices = 0
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal___cinit__(((struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)__pyx_v_self));

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

static int __pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal___cinit__(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[1], 30, 0, __PYX_ERR(1, 30, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":31
 * cdef class cudaPythonGlobal:
 *     def __cinit__(self):
 *         self._cudaPythonInit = False             # <<<<<<<<<<<<<<
 *         self._numDevices = 0
 *         self._driverDevice = NULL
 */
  __pyx_v_self->_cudaPythonInit = 0;

  /* "cuda/_lib/ccudart/utils.pyx":32
 *     def __cinit__(self):
 *         self._cudaPythonInit = False
 *         self._numDevices = 0             # <<<<<<<<<<<<<<
 *         self._driverDevice = NULL
 *         self._driverContext = NULL
 */
  __pyx_v_self->_numDevices = 0;

  /* "cuda/_lib/ccudart/utils.pyx":33
 *         self._cudaPythonInit = False
 *         self._numDevices = 0
 *         self._driverDevice = NULL             # <<<<<<<<<<<<<<
 *         self._driverContext = NULL
 *         self._deviceInit = NULL
 */
  __pyx_v_self->_driverDevice = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":34
 *         self._numDevices = 0
 *         self._driverDevice = NULL
 *         self._driverContext = NULL             # <<<<<<<<<<<<<<
 *         self._deviceInit = NULL
 *         self._deviceProperties = NULL
 */
  __pyx_v_self->_driverContext = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":35
 *         self._driverDevice = NULL
 *         self._driverContext = NULL
 *         self._deviceInit = NULL             # <<<<<<<<<<<<<<
 *         self._deviceProperties = NULL
 *         self.CUDART_VERSION = 11060
 */
  __pyx_v_self->_deviceInit = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":36
 *         self._driverContext = NULL
 *         self._deviceInit = NULL
 *         self._deviceProperties = NULL             # <<<<<<<<<<<<<<
 *         self.CUDART_VERSION = 11060
 * 
 */
  __pyx_v_self->_deviceProperties = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":37
 *         self._deviceInit = NULL
 *         self._deviceProperties = NULL
 *         self.CUDART_VERSION = 11060             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->CUDART_VERSION = 0x2B34;

  /* "cuda/_lib/ccudart/utils.pyx":30
 * 
 * cdef class cudaPythonGlobal:
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._cudaPythonInit = False
 *         self._numDevices = 0
 */

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

/* "cuda/_lib/ccudart/utils.pyx":39
 *         self.CUDART_VERSION = 11060
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._driverDevice is not NULL:
 *             free(self._driverDevice)
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_2__dealloc__(((struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)__pyx_v_self));

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

static void __pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_2__dealloc__(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 39, 0, __PYX_ERR(1, 39, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":40
 * 
 *     def __dealloc__(self):
 *         if self._driverDevice is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._driverDevice)
 *         if self._driverContext is not NULL:
 */
  __pyx_t_1 = ((__pyx_v_self->_driverDevice != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":41
 *     def __dealloc__(self):
 *         if self._driverDevice is not NULL:
 *             free(self._driverDevice)             # <<<<<<<<<<<<<<
 *         if self._driverContext is not NULL:
 *             free(self._driverContext)
 */
    free(__pyx_v_self->_driverDevice);

    /* "cuda/_lib/ccudart/utils.pyx":40
 * 
 *     def __dealloc__(self):
 *         if self._driverDevice is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._driverDevice)
 *         if self._driverContext is not NULL:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":42
 *         if self._driverDevice is not NULL:
 *             free(self._driverDevice)
 *         if self._driverContext is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._driverContext)
 *         if self._deviceInit is not NULL:
 */
  __pyx_t_1 = ((__pyx_v_self->_driverContext != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":43
 *             free(self._driverDevice)
 *         if self._driverContext is not NULL:
 *             free(self._driverContext)             # <<<<<<<<<<<<<<
 *         if self._deviceInit is not NULL:
 *             free(self._deviceInit)
 */
    free(__pyx_v_self->_driverContext);

    /* "cuda/_lib/ccudart/utils.pyx":42
 *         if self._driverDevice is not NULL:
 *             free(self._driverDevice)
 *         if self._driverContext is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._driverContext)
 *         if self._deviceInit is not NULL:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":44
 *         if self._driverContext is not NULL:
 *             free(self._driverContext)
 *         if self._deviceInit is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._deviceInit)
 *         if self._deviceProperties is not NULL:
 */
  __pyx_t_1 = ((__pyx_v_self->_deviceInit != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":45
 *             free(self._driverContext)
 *         if self._deviceInit is not NULL:
 *             free(self._deviceInit)             # <<<<<<<<<<<<<<
 *         if self._deviceProperties is not NULL:
 *             free(self._deviceProperties)
 */
    free(__pyx_v_self->_deviceInit);

    /* "cuda/_lib/ccudart/utils.pyx":44
 *         if self._driverContext is not NULL:
 *             free(self._driverContext)
 *         if self._deviceInit is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._deviceInit)
 *         if self._deviceProperties is not NULL:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":46
 *         if self._deviceInit is not NULL:
 *             free(self._deviceInit)
 *         if self._deviceProperties is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._deviceProperties)
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->_deviceProperties != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":47
 *             free(self._deviceInit)
 *         if self._deviceProperties is not NULL:
 *             free(self._deviceProperties)             # <<<<<<<<<<<<<<
 * 
 *     cdef cudaError_t lazyInit(self) nogil:
 */
    free(__pyx_v_self->_deviceProperties);

    /* "cuda/_lib/ccudart/utils.pyx":46
 *         if self._deviceInit is not NULL:
 *             free(self._deviceInit)
 *         if self._deviceProperties is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._deviceProperties)
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":39
 *         self.CUDART_VERSION = 11060
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._driverDevice is not NULL:
 *             free(self._driverDevice)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.cudaPythonGlobal.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/_lib/ccudart/utils.pyx":49
 *             free(self._deviceProperties)
 * 
 *     cdef cudaError_t lazyInit(self) nogil:             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUcontext context
 *         if self._cudaPythonInit:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_lazyInit(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self) {
  __pyx_t_4cuda_5ccuda_CUcontext __pyx_v_context;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err_rt;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("lazyInit", __pyx_f[1], 49, 1, __PYX_ERR(1, 49, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":51
 *     cdef cudaError_t lazyInit(self) nogil:
 *         cdef ccuda.CUcontext context
 *         if self._cudaPythonInit:             # <<<<<<<<<<<<<<
 *             err = ccuda._cuCtxGetCurrent(&context)
 *             if err == ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT or (err == ccuda.cudaError_enum.CUDA_SUCCESS and context == NULL):
 */
  __pyx_t_1 = (__pyx_v_self->_cudaPythonInit != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":52
 *         cdef ccuda.CUcontext context
 *         if self._cudaPythonInit:
 *             err = ccuda._cuCtxGetCurrent(&context)             # <<<<<<<<<<<<<<
 *             if err == ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT or (err == ccuda.cudaError_enum.CUDA_SUCCESS and context == NULL):
 *                 if self._numDevices > 0:
 */
    __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent((&__pyx_v_context)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 52, __pyx_L1_error)
    __pyx_v_err = __pyx_t_2;

    /* "cuda/_lib/ccudart/utils.pyx":53
 *         if self._cudaPythonInit:
 *             err = ccuda._cuCtxGetCurrent(&context)
 *             if err == ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT or (err == ccuda.cudaError_enum.CUDA_SUCCESS and context == NULL):             # <<<<<<<<<<<<<<
 *                 if self._numDevices > 0:
 *                     ccuda._cuCtxSetCurrent(self._driverContext[0])
 */
    __pyx_t_3 = ((__pyx_v_err == __pyx_e_4cuda_5ccuda_CUDA_ERROR_INVALID_CONTEXT) != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = ((__pyx_v_err == __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = ((__pyx_v_context == NULL) != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":54
 *             err = ccuda._cuCtxGetCurrent(&context)
 *             if err == ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT or (err == ccuda.cudaError_enum.CUDA_SUCCESS and context == NULL):
 *                 if self._numDevices > 0:             # <<<<<<<<<<<<<<
 *                     ccuda._cuCtxSetCurrent(self._driverContext[0])
 *             return cudaSuccess
 */
      __pyx_t_1 = ((__pyx_v_self->_numDevices > 0) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":55
 *             if err == ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT or (err == ccuda.cudaError_enum.CUDA_SUCCESS and context == NULL):
 *                 if self._numDevices > 0:
 *                     ccuda._cuCtxSetCurrent(self._driverContext[0])             # <<<<<<<<<<<<<<
 *             return cudaSuccess
 *         err = ccuda._cuInit(0)
 */
        __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent((__pyx_v_self->_driverContext[0])); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 55, __pyx_L1_error)

        /* "cuda/_lib/ccudart/utils.pyx":54
 *             err = ccuda._cuCtxGetCurrent(&context)
 *             if err == ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT or (err == ccuda.cudaError_enum.CUDA_SUCCESS and context == NULL):
 *                 if self._numDevices > 0:             # <<<<<<<<<<<<<<
 *                     ccuda._cuCtxSetCurrent(self._driverContext[0])
 *             return cudaSuccess
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":53
 *         if self._cudaPythonInit:
 *             err = ccuda._cuCtxGetCurrent(&context)
 *             if err == ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT or (err == ccuda.cudaError_enum.CUDA_SUCCESS and context == NULL):             # <<<<<<<<<<<<<<
 *                 if self._numDevices > 0:
 *                     ccuda._cuCtxSetCurrent(self._driverContext[0])
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":56
 *                 if self._numDevices > 0:
 *                     ccuda._cuCtxSetCurrent(self._driverContext[0])
 *             return cudaSuccess             # <<<<<<<<<<<<<<
 *         err = ccuda._cuInit(0)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":51
 *     cdef cudaError_t lazyInit(self) nogil:
 *         cdef ccuda.CUcontext context
 *         if self._cudaPythonInit:             # <<<<<<<<<<<<<<
 *             err = ccuda._cuCtxGetCurrent(&context)
 *             if err == ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT or (err == ccuda.cudaError_enum.CUDA_SUCCESS and context == NULL):
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":57
 *                     ccuda._cuCtxSetCurrent(self._driverContext[0])
 *             return cudaSuccess
 *         err = ccuda._cuInit(0)             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return <cudaError_t>err
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuInit(0); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 57, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":58
 *             return cudaSuccess
 *         err = ccuda._cuInit(0)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return <cudaError_t>err
 *         err = ccuda._cuDeviceGetCount(&self._numDevices)
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":59
 *         err = ccuda._cuInit(0)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return <cudaError_t>err             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetCount(&self._numDevices)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_v_err);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":58
 *             return cudaSuccess
 *         err = ccuda._cuInit(0)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return <cudaError_t>err
 *         err = ccuda._cuDeviceGetCount(&self._numDevices)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":60
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return <cudaError_t>err
 *         err = ccuda._cuDeviceGetCount(&self._numDevices)             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount((&__pyx_v_self->_numDevices)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 60, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":61
 *             return <cudaError_t>err
 *         err = ccuda._cuDeviceGetCount(&self._numDevices)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":62
 *         err = ccuda._cuDeviceGetCount(&self._numDevices)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         self._driverDevice = <ccuda.CUdevice *>calloc(self._numDevices, sizeof(ccuda.CUdevice))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":61
 *             return <cudaError_t>err
 *         err = ccuda._cuDeviceGetCount(&self._numDevices)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":64
 *             return cudaErrorInitializationError
 * 
 *         self._driverDevice = <ccuda.CUdevice *>calloc(self._numDevices, sizeof(ccuda.CUdevice))             # <<<<<<<<<<<<<<
 *         if self._driverDevice == NULL:
 *             return cudaErrorMemoryAllocation
 */
  __pyx_v_self->_driverDevice = ((__pyx_t_4cuda_5ccuda_CUdevice *)calloc(__pyx_v_self->_numDevices, (sizeof(__pyx_t_4cuda_5ccuda_CUdevice))));

  /* "cuda/_lib/ccudart/utils.pyx":65
 * 
 *         self._driverDevice = <ccuda.CUdevice *>calloc(self._numDevices, sizeof(ccuda.CUdevice))
 *         if self._driverDevice == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorMemoryAllocation
 *         self._driverContext = <ccuda.CUcontext *>calloc(self._numDevices, sizeof(ccuda.CUcontext))
 */
  __pyx_t_1 = ((__pyx_v_self->_driverDevice == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":66
 *         self._driverDevice = <ccuda.CUdevice *>calloc(self._numDevices, sizeof(ccuda.CUdevice))
 *         if self._driverDevice == NULL:
 *             return cudaErrorMemoryAllocation             # <<<<<<<<<<<<<<
 *         self._driverContext = <ccuda.CUcontext *>calloc(self._numDevices, sizeof(ccuda.CUcontext))
 *         if self._driverContext == NULL:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorMemoryAllocation;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":65
 * 
 *         self._driverDevice = <ccuda.CUdevice *>calloc(self._numDevices, sizeof(ccuda.CUdevice))
 *         if self._driverDevice == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorMemoryAllocation
 *         self._driverContext = <ccuda.CUcontext *>calloc(self._numDevices, sizeof(ccuda.CUcontext))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":67
 *         if self._driverDevice == NULL:
 *             return cudaErrorMemoryAllocation
 *         self._driverContext = <ccuda.CUcontext *>calloc(self._numDevices, sizeof(ccuda.CUcontext))             # <<<<<<<<<<<<<<
 *         if self._driverContext == NULL:
 *             return cudaErrorMemoryAllocation
 */
  __pyx_v_self->_driverContext = ((__pyx_t_4cuda_5ccuda_CUcontext *)calloc(__pyx_v_self->_numDevices, (sizeof(__pyx_t_4cuda_5ccuda_CUcontext))));

  /* "cuda/_lib/ccudart/utils.pyx":68
 *             return cudaErrorMemoryAllocation
 *         self._driverContext = <ccuda.CUcontext *>calloc(self._numDevices, sizeof(ccuda.CUcontext))
 *         if self._driverContext == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorMemoryAllocation
 *         self._deviceProperties = <cudaDeviceProp *>calloc(self._numDevices, sizeof(cudaDeviceProp))
 */
  __pyx_t_1 = ((__pyx_v_self->_driverContext == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":69
 *         self._driverContext = <ccuda.CUcontext *>calloc(self._numDevices, sizeof(ccuda.CUcontext))
 *         if self._driverContext == NULL:
 *             return cudaErrorMemoryAllocation             # <<<<<<<<<<<<<<
 *         self._deviceProperties = <cudaDeviceProp *>calloc(self._numDevices, sizeof(cudaDeviceProp))
 *         if self._deviceProperties == NULL:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorMemoryAllocation;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":68
 *             return cudaErrorMemoryAllocation
 *         self._driverContext = <ccuda.CUcontext *>calloc(self._numDevices, sizeof(ccuda.CUcontext))
 *         if self._driverContext == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorMemoryAllocation
 *         self._deviceProperties = <cudaDeviceProp *>calloc(self._numDevices, sizeof(cudaDeviceProp))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":70
 *         if self._driverContext == NULL:
 *             return cudaErrorMemoryAllocation
 *         self._deviceProperties = <cudaDeviceProp *>calloc(self._numDevices, sizeof(cudaDeviceProp))             # <<<<<<<<<<<<<<
 *         if self._deviceProperties == NULL:
 *             return cudaErrorMemoryAllocation
 */
  __pyx_v_self->_deviceProperties = ((struct __pyx_t_4cuda_7ccudart_cudaDeviceProp *)calloc(__pyx_v_self->_numDevices, (sizeof(struct __pyx_t_4cuda_7ccudart_cudaDeviceProp))));

  /* "cuda/_lib/ccudart/utils.pyx":71
 *             return cudaErrorMemoryAllocation
 *         self._deviceProperties = <cudaDeviceProp *>calloc(self._numDevices, sizeof(cudaDeviceProp))
 *         if self._deviceProperties == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorMemoryAllocation
 *         self._deviceInit = <bool *>calloc(self._numDevices, sizeof(bool))
 */
  __pyx_t_1 = ((__pyx_v_self->_deviceProperties == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":72
 *         self._deviceProperties = <cudaDeviceProp *>calloc(self._numDevices, sizeof(cudaDeviceProp))
 *         if self._deviceProperties == NULL:
 *             return cudaErrorMemoryAllocation             # <<<<<<<<<<<<<<
 *         self._deviceInit = <bool *>calloc(self._numDevices, sizeof(bool))
 *         if self._deviceInit == NULL:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorMemoryAllocation;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":71
 *             return cudaErrorMemoryAllocation
 *         self._deviceProperties = <cudaDeviceProp *>calloc(self._numDevices, sizeof(cudaDeviceProp))
 *         if self._deviceProperties == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorMemoryAllocation
 *         self._deviceInit = <bool *>calloc(self._numDevices, sizeof(bool))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":73
 *         if self._deviceProperties == NULL:
 *             return cudaErrorMemoryAllocation
 *         self._deviceInit = <bool *>calloc(self._numDevices, sizeof(bool))             # <<<<<<<<<<<<<<
 *         if self._deviceInit == NULL:
 *             return cudaErrorMemoryAllocation
 */
  __pyx_v_self->_deviceInit = ((bool *)calloc(__pyx_v_self->_numDevices, (sizeof(bool))));

  /* "cuda/_lib/ccudart/utils.pyx":74
 *             return cudaErrorMemoryAllocation
 *         self._deviceInit = <bool *>calloc(self._numDevices, sizeof(bool))
 *         if self._deviceInit == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorMemoryAllocation
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->_deviceInit == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":75
 *         self._deviceInit = <bool *>calloc(self._numDevices, sizeof(bool))
 *         if self._deviceInit == NULL:
 *             return cudaErrorMemoryAllocation             # <<<<<<<<<<<<<<
 * 
 *         err_rt = self.lazyInitDevice(0)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorMemoryAllocation;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":74
 *             return cudaErrorMemoryAllocation
 *         self._deviceInit = <bool *>calloc(self._numDevices, sizeof(bool))
 *         if self._deviceInit == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorMemoryAllocation
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":77
 *             return cudaErrorMemoryAllocation
 * 
 *         err_rt = self.lazyInitDevice(0)             # <<<<<<<<<<<<<<
 *         if err_rt != cudaSuccess:
 *             return cudaErrorInitializationError
 */
  __pyx_v_err_rt = ((struct __pyx_vtabstruct_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)__pyx_v_self->__pyx_vtab)->lazyInitDevice(__pyx_v_self, 0);

  /* "cuda/_lib/ccudart/utils.pyx":78
 * 
 *         err_rt = self.lazyInitDevice(0)
 *         if err_rt != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err_rt != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":79
 *         err_rt = self.lazyInitDevice(0)
 *         if err_rt != cudaSuccess:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuCtxSetCurrent(self._driverContext[0])
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":78
 * 
 *         err_rt = self.lazyInitDevice(0)
 *         if err_rt != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":81
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuCtxSetCurrent(self._driverContext[0])             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent((__pyx_v_self->_driverContext[0])); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 81, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":82
 * 
 *         err = ccuda._cuCtxSetCurrent(self._driverContext[0])
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._cudaPythonInit = True
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":83
 *         err = ccuda._cuCtxSetCurrent(self._driverContext[0])
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._cudaPythonInit = True
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":82
 * 
 *         err = ccuda._cuCtxSetCurrent(self._driverContext[0])
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._cudaPythonInit = True
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":84
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._cudaPythonInit = True             # <<<<<<<<<<<<<<
 * 
 *     cdef cudaError_t lazyInitDevice(self, int deviceOrdinal) nogil:
 */
  __pyx_v_self->_cudaPythonInit = 1;

  /* "cuda/_lib/ccudart/utils.pyx":49
 *             free(self._deviceProperties)
 * 
 *     cdef cudaError_t lazyInit(self) nogil:             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUcontext context
 *         if self._cudaPythonInit:
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.cudaPythonGlobal.lazyInit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":86
 *         self._cudaPythonInit = True
 * 
 *     cdef cudaError_t lazyInitDevice(self, int deviceOrdinal) nogil:             # <<<<<<<<<<<<<<
 *         if self._deviceInit[deviceOrdinal]:
 *             return cudaSuccess
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_lazyInitDevice(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_v_self, int __pyx_v_deviceOrdinal) {
  __pyx_t_4cuda_5ccuda_CUresult __pyx_v_err;
  int __pyx_v_surfaceAlignment;
  int __pyx_v_texturePitchAlignment;
  int __pyx_v_sharedMemPerBlock;
  int __pyx_v_sharedMemPerBlockOptin;
  int __pyx_v_sharedMemPerMultiprocessor;
  int __pyx_v_memPitch;
  int __pyx_v_totalConstMem;
  int __pyx_v_textureAlignment;
  int __pyx_v_reservedSharedMemPerBlock;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("lazyInitDevice", __pyx_f[1], 86, 1, __PYX_ERR(1, 86, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":87
 * 
 *     cdef cudaError_t lazyInitDevice(self, int deviceOrdinal) nogil:
 *         if self._deviceInit[deviceOrdinal]:             # <<<<<<<<<<<<<<
 *             return cudaSuccess
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->_deviceInit[__pyx_v_deviceOrdinal]) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":88
 *     cdef cudaError_t lazyInitDevice(self, int deviceOrdinal) nogil:
 *         if self._deviceInit[deviceOrdinal]:
 *             return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGet(&self._driverDevice[deviceOrdinal], deviceOrdinal)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":87
 * 
 *     cdef cudaError_t lazyInitDevice(self, int deviceOrdinal) nogil:
 *         if self._deviceInit[deviceOrdinal]:             # <<<<<<<<<<<<<<
 *             return cudaSuccess
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":90
 *             return cudaSuccess
 * 
 *         err = ccuda._cuDeviceGet(&self._driverDevice[deviceOrdinal], deviceOrdinal)             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet((&(__pyx_v_self->_driverDevice[__pyx_v_deviceOrdinal])), __pyx_v_deviceOrdinal); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 90, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":91
 * 
 *         err = ccuda._cuDeviceGet(&self._driverDevice[deviceOrdinal], deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDevicePrimaryCtxRetain(&self._driverContext[deviceOrdinal], self._driverDevice[deviceOrdinal])
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":92
 *         err = ccuda._cuDeviceGet(&self._driverDevice[deviceOrdinal], deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDevicePrimaryCtxRetain(&self._driverContext[deviceOrdinal], self._driverDevice[deviceOrdinal])
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":91
 * 
 *         err = ccuda._cuDeviceGet(&self._driverDevice[deviceOrdinal], deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDevicePrimaryCtxRetain(&self._driverContext[deviceOrdinal], self._driverDevice[deviceOrdinal])
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":93
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDevicePrimaryCtxRetain(&self._driverContext[deviceOrdinal], self._driverDevice[deviceOrdinal])             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain((&(__pyx_v_self->_driverContext[__pyx_v_deviceOrdinal])), (__pyx_v_self->_driverDevice[__pyx_v_deviceOrdinal])); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 93, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":94
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDevicePrimaryCtxRetain(&self._driverContext[deviceOrdinal], self._driverDevice[deviceOrdinal])
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":95
 *         err = ccuda._cuDevicePrimaryCtxRetain(&self._driverContext[deviceOrdinal], self._driverDevice[deviceOrdinal])
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetName(self._deviceProperties[deviceOrdinal].name, sizeof(self._deviceProperties[deviceOrdinal].name), <ccuda.CUdevice>deviceOrdinal)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":94
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDevicePrimaryCtxRetain(&self._driverContext[deviceOrdinal], self._driverDevice[deviceOrdinal])
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":97
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetName(self._deviceProperties[deviceOrdinal].name, sizeof(self._deviceProperties[deviceOrdinal].name), <ccuda.CUdevice>deviceOrdinal)             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).name, (sizeof((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).name)), ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 97, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":98
 * 
 *         err = ccuda._cuDeviceGetName(self._deviceProperties[deviceOrdinal].name, sizeof(self._deviceProperties[deviceOrdinal].name), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":99
 *         err = ccuda._cuDeviceGetName(self._deviceProperties[deviceOrdinal].name, sizeof(self._deviceProperties[deviceOrdinal].name), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":98
 * 
 *         err = ccuda._cuDeviceGetName(self._deviceProperties[deviceOrdinal].name, sizeof(self._deviceProperties[deviceOrdinal].name), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":101
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).totalGlobalMem), ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 101, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":102
 * 
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":103
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":102
 * 
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":105
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).totalGlobalMem), ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 105, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":106
 * 
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":107
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].major), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":106
 * 
 *         err = ccuda._cuDeviceTotalMem_v2(&(self._deviceProperties[deviceOrdinal].totalGlobalMem), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":109
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].major), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).major), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 109, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":110
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].major), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":111
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].major), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].minor), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":110
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].major), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":113
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].minor), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).minor), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 113, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":114
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].minor), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":115
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].minor), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].deviceOverlap), ccuda.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":114
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].minor), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":117
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].deviceOverlap), ccuda.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).deviceOverlap), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 117, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":118
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].deviceOverlap), ccuda.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":119
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].deviceOverlap), ccuda.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].asyncEngineCount), ccuda.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":118
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].deviceOverlap), ccuda.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":121
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].asyncEngineCount), ccuda.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).asyncEngineCount), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 121, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":122
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].asyncEngineCount), ccuda.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":123
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].asyncEngineCount), ccuda.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiProcessorCount), ccuda.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":122
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].asyncEngineCount), ccuda.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":125
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiProcessorCount), ccuda.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).multiProcessorCount), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 125, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":126
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiProcessorCount), ccuda.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":127
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiProcessorCount), ccuda.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].kernelExecTimeoutEnabled), ccuda.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":126
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiProcessorCount), ccuda.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":129
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].kernelExecTimeoutEnabled), ccuda.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).kernelExecTimeoutEnabled), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 129, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":130
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].kernelExecTimeoutEnabled), ccuda.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":131
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].kernelExecTimeoutEnabled), ccuda.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].integrated), ccuda.CU_DEVICE_ATTRIBUTE_INTEGRATED, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":130
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].kernelExecTimeoutEnabled), ccuda.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":133
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].integrated), ccuda.CU_DEVICE_ATTRIBUTE_INTEGRATED, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).integrated), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_INTEGRATED, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 133, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":134
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].integrated), ccuda.CU_DEVICE_ATTRIBUTE_INTEGRATED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":135
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].integrated), ccuda.CU_DEVICE_ATTRIBUTE_INTEGRATED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canMapHostMemory), ccuda.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":134
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].integrated), ccuda.CU_DEVICE_ATTRIBUTE_INTEGRATED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":137
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canMapHostMemory), ccuda.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).canMapHostMemory), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 137, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":138
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canMapHostMemory), ccuda.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":139
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canMapHostMemory), ccuda.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":138
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canMapHostMemory), ccuda.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":141
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture1D), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 141, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":142
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":143
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DMipmap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":142
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":145
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DMipmap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture1DMipmap), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 145, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":146
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DMipmap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":147
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DMipmap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLinear), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":146
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DMipmap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":149
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLinear), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture1DLinear), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 149, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":150
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLinear), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":151
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLinear), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":150
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLinear), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":153
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2D[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 153, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":154
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":155
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":154
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":157
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2D[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 157, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":158
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":159
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":158
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":161
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DMipmap[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 161, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":162
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":163
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":162
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":165
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DMipmap[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 165, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":166
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":167
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":166
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DMipmap[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":169
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DLinear[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 169, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":170
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":171
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":170
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":173
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DLinear[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 173, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":174
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":175
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":174
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":177
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DLinear[2])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 177, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":178
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":179
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":178
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLinear[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":181
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DGather[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 181, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":182
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":183
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":182
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":185
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DGather[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 185, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":186
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":187
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":186
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DGather[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":189
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture3D[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 189, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":190
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":191
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":190
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":193
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture3D[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 193, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":194
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":195
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":194
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":197
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture3D[2])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 197, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":198
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":199
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":198
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":201
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture3DAlt[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 201, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":202
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":203
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":202
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":205
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture3DAlt[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 205, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":206
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":207
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":206
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":209
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture3DAlt[2])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 209, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":210
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":211
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":210
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture3DAlt[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":213
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTextureCubemap), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 213, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":214
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":215
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":214
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":217
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture1DLayered[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 217, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":218
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":219
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":218
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":221
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture1DLayered[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 221, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":222
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":223
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":222
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":225
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DLayered[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 225, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":226
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":227
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":226
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":229
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DLayered[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 229, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":230
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":231
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":230
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":233
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTexture2DLayered[2])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 233, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":234
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":235
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":234
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTexture2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":237
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTextureCubemapLayered[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 237, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":238
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":239
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":238
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":241
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxTextureCubemapLayered[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 241, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":242
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":243
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":242
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxTextureCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":245
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface1D), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 245, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":246
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":247
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":246
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1D), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":249
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface2D[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 249, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":250
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":251
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":250
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":253
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface2D[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 253, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":254
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":255
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":254
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":257
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface3D[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 257, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":258
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":259
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":258
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":261
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface3D[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 261, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":262
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":263
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":262
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":265
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface3D[2])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 265, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":266
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":267
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":266
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface3D[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":269
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface1DLayered[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 269, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":270
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":271
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":270
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":273
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface1DLayered[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 273, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":274
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":275
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":274
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface1DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":277
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface2DLayered[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 277, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":278
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":279
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":278
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":281
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface2DLayered[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 281, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":282
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":283
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":282
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":285
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurface2DLayered[2])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 285, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":286
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":287
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":286
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurface2DLayered[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":289
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurfaceCubemap), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 289, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":290
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":291
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":290
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemap), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":293
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurfaceCubemapLayered[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 293, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":294
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":295
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":294
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":297
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxSurfaceCubemapLayered[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 297, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":298
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":299
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentKernels), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":298
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxSurfaceCubemapLayered[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":301
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentKernels), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).concurrentKernels), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 301, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":302
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentKernels), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":303
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentKernels), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].ECCEnabled), ccuda.CU_DEVICE_ATTRIBUTE_ECC_ENABLED, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":302
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentKernels), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":305
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].ECCEnabled), ccuda.CU_DEVICE_ATTRIBUTE_ECC_ENABLED, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).ECCEnabled), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_ECC_ENABLED, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 305, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":306
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].ECCEnabled), ccuda.CU_DEVICE_ATTRIBUTE_ECC_ENABLED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":307
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].ECCEnabled), ccuda.CU_DEVICE_ATTRIBUTE_ECC_ENABLED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciBusID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":306
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].ECCEnabled), ccuda.CU_DEVICE_ATTRIBUTE_ECC_ENABLED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":309
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciBusID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).pciBusID), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 309, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":310
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciBusID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":311
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciBusID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDeviceID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":310
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciBusID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":313
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDeviceID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).pciDeviceID), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 313, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":314
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDeviceID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":315
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDeviceID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDomainID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":314
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDeviceID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":317
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDomainID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).pciDomainID), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 317, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":318
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDomainID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":319
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDomainID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].tccDriver), ccuda.CU_DEVICE_ATTRIBUTE_TCC_DRIVER, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":318
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pciDomainID), ccuda.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":321
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].tccDriver), ccuda.CU_DEVICE_ATTRIBUTE_TCC_DRIVER, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).tccDriver), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TCC_DRIVER, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 321, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":322
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].tccDriver), ccuda.CU_DEVICE_ATTRIBUTE_TCC_DRIVER, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":323
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].tccDriver), ccuda.CU_DEVICE_ATTRIBUTE_TCC_DRIVER, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].unifiedAddressing), ccuda.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":322
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].tccDriver), ccuda.CU_DEVICE_ATTRIBUTE_TCC_DRIVER, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":325
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].unifiedAddressing), ccuda.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).unifiedAddressing), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 325, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":326
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].unifiedAddressing), ccuda.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":327
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].unifiedAddressing), ccuda.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryClockRate), ccuda.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":326
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].unifiedAddressing), ccuda.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":329
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryClockRate), ccuda.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).memoryClockRate), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 329, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":330
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryClockRate), ccuda.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":331
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryClockRate), ccuda.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryBusWidth), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":330
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryClockRate), ccuda.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":333
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryBusWidth), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).memoryBusWidth), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 333, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":334
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryBusWidth), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":335
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryBusWidth), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].l2CacheSize), ccuda.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":334
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].memoryBusWidth), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":337
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].l2CacheSize), ccuda.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).l2CacheSize), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 337, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":338
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].l2CacheSize), ccuda.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":339
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].l2CacheSize), ccuda.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].persistingL2CacheMaxSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":338
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].l2CacheSize), ccuda.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":341
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].persistingL2CacheMaxSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).persistingL2CacheMaxSize), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 341, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":342
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].persistingL2CacheMaxSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":343
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].persistingL2CacheMaxSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":342
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].persistingL2CacheMaxSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":345
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxThreadsPerMultiProcessor), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 345, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":346
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":347
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         cdef int surfaceAlignment
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":346
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":350
 * 
 *         cdef int surfaceAlignment
 *         err = ccuda._cuDeviceGetAttribute(&(surfaceAlignment), ccuda.CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_surfaceAlignment), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 350, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":351
 *         cdef int surfaceAlignment
 *         err = ccuda._cuDeviceGetAttribute(&(surfaceAlignment), ccuda.CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].surfaceAlignment = surfaceAlignment
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":352
 *         err = ccuda._cuDeviceGetAttribute(&(surfaceAlignment), ccuda.CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].surfaceAlignment = surfaceAlignment
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":351
 *         cdef int surfaceAlignment
 *         err = ccuda._cuDeviceGetAttribute(&(surfaceAlignment), ccuda.CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].surfaceAlignment = surfaceAlignment
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":353
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].surfaceAlignment = surfaceAlignment             # <<<<<<<<<<<<<<
 * 
 *         cdef int texturePitchAlignment
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).surfaceAlignment = __pyx_v_surfaceAlignment;

  /* "cuda/_lib/ccudart/utils.pyx":356
 * 
 *         cdef int texturePitchAlignment
 *         err = ccuda._cuDeviceGetAttribute(&texturePitchAlignment, ccuda.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_texturePitchAlignment), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 356, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":357
 *         cdef int texturePitchAlignment
 *         err = ccuda._cuDeviceGetAttribute(&texturePitchAlignment, ccuda.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].texturePitchAlignment = texturePitchAlignment
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":358
 *         err = ccuda._cuDeviceGetAttribute(&texturePitchAlignment, ccuda.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].texturePitchAlignment = texturePitchAlignment
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":357
 *         cdef int texturePitchAlignment
 *         err = ccuda._cuDeviceGetAttribute(&texturePitchAlignment, ccuda.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].texturePitchAlignment = texturePitchAlignment
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":359
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].texturePitchAlignment = texturePitchAlignment             # <<<<<<<<<<<<<<
 * 
 *         cdef int sharedMemPerBlock
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).texturePitchAlignment = __pyx_v_texturePitchAlignment;

  /* "cuda/_lib/ccudart/utils.pyx":362
 * 
 *         cdef int sharedMemPerBlock
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerBlock, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_sharedMemPerBlock), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 362, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":363
 *         cdef int sharedMemPerBlock
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerBlock, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerBlock = sharedMemPerBlock
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":364
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerBlock, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].sharedMemPerBlock = sharedMemPerBlock
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":363
 *         cdef int sharedMemPerBlock
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerBlock, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerBlock = sharedMemPerBlock
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":365
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerBlock = sharedMemPerBlock             # <<<<<<<<<<<<<<
 * 
 *         cdef int sharedMemPerBlockOptin
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).sharedMemPerBlock = __pyx_v_sharedMemPerBlock;

  /* "cuda/_lib/ccudart/utils.pyx":368
 * 
 *         cdef int sharedMemPerBlockOptin
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerBlockOptin, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_sharedMemPerBlockOptin), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 368, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":369
 *         cdef int sharedMemPerBlockOptin
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerBlockOptin, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerBlockOptin = sharedMemPerBlockOptin
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":370
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerBlockOptin, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].sharedMemPerBlockOptin = sharedMemPerBlockOptin
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":369
 *         cdef int sharedMemPerBlockOptin
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerBlockOptin, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerBlockOptin = sharedMemPerBlockOptin
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":371
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerBlockOptin = sharedMemPerBlockOptin             # <<<<<<<<<<<<<<
 * 
 *         cdef int sharedMemPerMultiprocessor
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).sharedMemPerBlockOptin = __pyx_v_sharedMemPerBlockOptin;

  /* "cuda/_lib/ccudart/utils.pyx":374
 * 
 *         cdef int sharedMemPerMultiprocessor
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerMultiprocessor, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_sharedMemPerMultiprocessor), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 374, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":375
 *         cdef int sharedMemPerMultiprocessor
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerMultiprocessor, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerMultiprocessor = sharedMemPerMultiprocessor
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":376
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerMultiprocessor, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].sharedMemPerMultiprocessor = sharedMemPerMultiprocessor
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":375
 *         cdef int sharedMemPerMultiprocessor
 *         err = ccuda._cuDeviceGetAttribute(&sharedMemPerMultiprocessor, ccuda.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerMultiprocessor = sharedMemPerMultiprocessor
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":377
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].sharedMemPerMultiprocessor = sharedMemPerMultiprocessor             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).sharedMemPerMultiprocessor = __pyx_v_sharedMemPerMultiprocessor;

  /* "cuda/_lib/ccudart/utils.pyx":379
 *         self._deviceProperties[deviceOrdinal].sharedMemPerMultiprocessor = sharedMemPerMultiprocessor
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).regsPerBlock), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 379, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":380
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":381
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerMultiprocessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":380
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":383
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerMultiprocessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).regsPerMultiprocessor), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 383, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":384
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerMultiprocessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":385
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerMultiprocessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].warpSize), ccuda.CU_DEVICE_ATTRIBUTE_WARP_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":384
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].regsPerMultiprocessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":387
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].warpSize), ccuda.CU_DEVICE_ATTRIBUTE_WARP_SIZE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).warpSize), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_WARP_SIZE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 387, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":388
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].warpSize), ccuda.CU_DEVICE_ATTRIBUTE_WARP_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":389
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].warpSize), ccuda.CU_DEVICE_ATTRIBUTE_WARP_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         cdef int memPitch
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":388
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].warpSize), ccuda.CU_DEVICE_ATTRIBUTE_WARP_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":392
 * 
 *         cdef int memPitch
 *         err = ccuda._cuDeviceGetAttribute(&memPitch, ccuda.CU_DEVICE_ATTRIBUTE_MAX_PITCH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_memPitch), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_PITCH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 392, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":393
 *         cdef int memPitch
 *         err = ccuda._cuDeviceGetAttribute(&memPitch, ccuda.CU_DEVICE_ATTRIBUTE_MAX_PITCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].memPitch = memPitch
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":394
 *         err = ccuda._cuDeviceGetAttribute(&memPitch, ccuda.CU_DEVICE_ATTRIBUTE_MAX_PITCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].memPitch = memPitch
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":393
 *         cdef int memPitch
 *         err = ccuda._cuDeviceGetAttribute(&memPitch, ccuda.CU_DEVICE_ATTRIBUTE_MAX_PITCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].memPitch = memPitch
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":395
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].memPitch = memPitch             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).memPitch = __pyx_v_memPitch;

  /* "cuda/_lib/ccudart/utils.pyx":397
 *         self._deviceProperties[deviceOrdinal].memPitch = memPitch
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxThreadsPerBlock), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 397, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":398
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":399
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":398
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsPerBlock), ccuda.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":401
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxThreadsDim[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 401, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":402
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":403
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":402
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":405
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxThreadsDim[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 405, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":406
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":407
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":406
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":409
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxThreadsDim[2])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 409, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":410
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":411
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":410
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxThreadsDim[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":413
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxGridSize[0])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 413, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":414
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":415
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":414
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[0]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":417
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxGridSize[1])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 417, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":418
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":419
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":418
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[1]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":421
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&((__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxGridSize[2])), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 421, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":422
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":423
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         cdef int totalConstMem
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":422
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxGridSize[2]), ccuda.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":426
 * 
 *         cdef int totalConstMem
 *         err = ccuda._cuDeviceGetAttribute(&totalConstMem, ccuda.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_totalConstMem), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 426, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":427
 *         cdef int totalConstMem
 *         err = ccuda._cuDeviceGetAttribute(&totalConstMem, ccuda.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].totalConstMem = totalConstMem
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":428
 *         err = ccuda._cuDeviceGetAttribute(&totalConstMem, ccuda.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].totalConstMem = totalConstMem
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":427
 *         cdef int totalConstMem
 *         err = ccuda._cuDeviceGetAttribute(&totalConstMem, ccuda.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].totalConstMem = totalConstMem
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":429
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].totalConstMem = totalConstMem             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].clockRate), ccuda.CU_DEVICE_ATTRIBUTE_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).totalConstMem = __pyx_v_totalConstMem;

  /* "cuda/_lib/ccudart/utils.pyx":431
 *         self._deviceProperties[deviceOrdinal].totalConstMem = totalConstMem
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].clockRate), ccuda.CU_DEVICE_ATTRIBUTE_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).clockRate), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CLOCK_RATE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 431, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":432
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].clockRate), ccuda.CU_DEVICE_ATTRIBUTE_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":433
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].clockRate), ccuda.CU_DEVICE_ATTRIBUTE_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         cdef int textureAlignment
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":432
 * 
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].clockRate), ccuda.CU_DEVICE_ATTRIBUTE_CLOCK_RATE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":436
 * 
 *         cdef int textureAlignment
 *         err = ccuda._cuDeviceGetAttribute(&textureAlignment, ccuda.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_textureAlignment), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 436, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":437
 *         cdef int textureAlignment
 *         err = ccuda._cuDeviceGetAttribute(&textureAlignment, ccuda.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].textureAlignment = textureAlignment
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":438
 *         err = ccuda._cuDeviceGetAttribute(&textureAlignment, ccuda.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].textureAlignment = textureAlignment
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].streamPrioritiesSupported), ccuda.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":437
 *         cdef int textureAlignment
 *         err = ccuda._cuDeviceGetAttribute(&textureAlignment, ccuda.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].textureAlignment = textureAlignment
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":439
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].textureAlignment = textureAlignment             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].streamPrioritiesSupported), ccuda.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).textureAlignment = __pyx_v_textureAlignment;

  /* "cuda/_lib/ccudart/utils.pyx":440
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].textureAlignment = textureAlignment
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].streamPrioritiesSupported), ccuda.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).streamPrioritiesSupported), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 440, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":441
 *         self._deviceProperties[deviceOrdinal].textureAlignment = textureAlignment
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].streamPrioritiesSupported), ccuda.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].globalL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":442
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].streamPrioritiesSupported), ccuda.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].globalL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":441
 *         self._deviceProperties[deviceOrdinal].textureAlignment = textureAlignment
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].streamPrioritiesSupported), ccuda.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].globalL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":443
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].globalL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).globalL1CacheSupported), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 443, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":444
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].globalL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].localL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":445
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].globalL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].localL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":444
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].globalL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].localL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":446
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].localL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).localL1CacheSupported), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 446, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":447
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].localL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].managedMemory), ccuda.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":448
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].localL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].managedMemory), ccuda.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":447
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].localL1CacheSupported), ccuda.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].managedMemory), ccuda.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":449
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].managedMemory), ccuda.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).managedMemory), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 449, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":450
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].managedMemory), ccuda.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].isMultiGpuBoard), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":451
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].managedMemory), ccuda.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].isMultiGpuBoard), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":450
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].managedMemory), ccuda.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].isMultiGpuBoard), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":452
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].isMultiGpuBoard), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).isMultiGpuBoard), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 452, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":453
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].isMultiGpuBoard), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiGpuBoardGroupID), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":454
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].isMultiGpuBoard), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiGpuBoardGroupID), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":453
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].isMultiGpuBoard), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiGpuBoardGroupID), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":455
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiGpuBoardGroupID), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).multiGpuBoardGroupID), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 455, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":456
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiGpuBoardGroupID), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].hostNativeAtomicSupported), ccuda.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":457
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiGpuBoardGroupID), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].hostNativeAtomicSupported), ccuda.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":456
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].multiGpuBoardGroupID), ccuda.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].hostNativeAtomicSupported), ccuda.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":458
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].hostNativeAtomicSupported), ccuda.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).hostNativeAtomicSupported), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 458, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":459
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].hostNativeAtomicSupported), ccuda.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].singleToDoublePrecisionPerfRatio), ccuda.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":460
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].hostNativeAtomicSupported), ccuda.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].singleToDoublePrecisionPerfRatio), ccuda.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":459
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].hostNativeAtomicSupported), ccuda.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].singleToDoublePrecisionPerfRatio), ccuda.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":461
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].singleToDoublePrecisionPerfRatio), ccuda.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).singleToDoublePrecisionPerfRatio), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 461, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":462
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].singleToDoublePrecisionPerfRatio), ccuda.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccess), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":463
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].singleToDoublePrecisionPerfRatio), ccuda.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccess), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":462
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].singleToDoublePrecisionPerfRatio), ccuda.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccess), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":464
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccess), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).pageableMemoryAccess), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 464, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":465
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccess), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentManagedAccess), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":466
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccess), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentManagedAccess), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":465
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccess), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentManagedAccess), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":467
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentManagedAccess), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).concurrentManagedAccess), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 467, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":468
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentManagedAccess), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].computePreemptionSupported), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":469
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentManagedAccess), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].computePreemptionSupported), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":468
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].concurrentManagedAccess), ccuda.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].computePreemptionSupported), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":470
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].computePreemptionSupported), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).computePreemptionSupported), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 470, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":471
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].computePreemptionSupported), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canUseHostPointerForRegisteredMem), ccuda.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":472
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].computePreemptionSupported), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canUseHostPointerForRegisteredMem), ccuda.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":471
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].computePreemptionSupported), ccuda.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canUseHostPointerForRegisteredMem), ccuda.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":473
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canUseHostPointerForRegisteredMem), ccuda.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).canUseHostPointerForRegisteredMem), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 473, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":474
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canUseHostPointerForRegisteredMem), ccuda.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":475
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canUseHostPointerForRegisteredMem), ccuda.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":474
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].canUseHostPointerForRegisteredMem), ccuda.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":476
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).cooperativeLaunch), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 476, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":477
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeMultiDeviceLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":478
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeMultiDeviceLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":477
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeMultiDeviceLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":479
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeMultiDeviceLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).cooperativeMultiDeviceLaunch), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 479, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":480
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeMultiDeviceLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccessUsesHostPageTables), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":481
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeMultiDeviceLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccessUsesHostPageTables), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":480
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].cooperativeMultiDeviceLaunch), ccuda.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccessUsesHostPageTables), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":482
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccessUsesHostPageTables), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).pageableMemoryAccessUsesHostPageTables), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 482, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":483
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccessUsesHostPageTables), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].directManagedMemAccessFromHost), ccuda.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":484
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccessUsesHostPageTables), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].directManagedMemAccessFromHost), ccuda.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":483
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].pageableMemoryAccessUsesHostPageTables), ccuda.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].directManagedMemAccessFromHost), ccuda.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":485
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].directManagedMemAccessFromHost), ccuda.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).directManagedMemAccessFromHost), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 485, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":486
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].directManagedMemAccessFromHost), ccuda.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":487
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].directManagedMemAccessFromHost), ccuda.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 * 
 *         err = ccuda._cuDeviceGetUuid(<ccuda.CUuuid_st*>(&(self._deviceProperties[deviceOrdinal].uuid)), <ccuda.CUdevice>deviceOrdinal)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":486
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].directManagedMemAccessFromHost), ccuda.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":489
 *             return cudaErrorInitializationError
 * 
 *         err = ccuda._cuDeviceGetUuid(<ccuda.CUuuid_st*>(&(self._deviceProperties[deviceOrdinal].uuid)), <ccuda.CUdevice>deviceOrdinal)             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid(((struct __pyx_t_4cuda_5ccuda_CUuuid_st *)(&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).uuid)), ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 489, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":490
 * 
 *         err = ccuda._cuDeviceGetUuid(<ccuda.CUuuid_st*>(&(self._deviceProperties[deviceOrdinal].uuid)), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxBlocksPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":491
 *         err = ccuda._cuDeviceGetUuid(<ccuda.CUuuid_st*>(&(self._deviceProperties[deviceOrdinal].uuid)), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxBlocksPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":490
 * 
 *         err = ccuda._cuDeviceGetUuid(<ccuda.CUuuid_st*>(&(self._deviceProperties[deviceOrdinal].uuid)), <ccuda.CUdevice>deviceOrdinal)
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxBlocksPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":492
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxBlocksPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).maxBlocksPerMultiProcessor), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 492, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":493
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxBlocksPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].accessPolicyMaxWindowSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":494
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxBlocksPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].accessPolicyMaxWindowSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":493
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].maxBlocksPerMultiProcessor), ccuda.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].accessPolicyMaxWindowSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":495
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].accessPolicyMaxWindowSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&(__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).accessPolicyMaxWindowSize), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 495, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":496
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].accessPolicyMaxWindowSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         cdef int reservedSharedMemPerBlock
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":497
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].accessPolicyMaxWindowSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         cdef int reservedSharedMemPerBlock
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":496
 *             return cudaErrorInitializationError
 *         err = ccuda._cuDeviceGetAttribute(&(self._deviceProperties[deviceOrdinal].accessPolicyMaxWindowSize), ccuda.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         cdef int reservedSharedMemPerBlock
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":500
 *         cdef int reservedSharedMemPerBlock
 * 
 *         err = ccuda._cuDeviceGetAttribute(&reservedSharedMemPerBlock, ccuda.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))             # <<<<<<<<<<<<<<
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute((&__pyx_v_reservedSharedMemPerBlock), __pyx_e_4cuda_5ccuda_CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK, ((__pyx_t_4cuda_5ccuda_CUdevice)__pyx_v_deviceOrdinal)); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 500, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":501
 * 
 *         err = ccuda._cuDeviceGetAttribute(&reservedSharedMemPerBlock, ccuda.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].reservedSharedMemPerBlock = reservedSharedMemPerBlock
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_5ccuda_CUDA_SUCCESS) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":502
 *         err = ccuda._cuDeviceGetAttribute(&reservedSharedMemPerBlock, ccuda.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError             # <<<<<<<<<<<<<<
 *         self._deviceProperties[deviceOrdinal].reservedSharedMemPerBlock = reservedSharedMemPerBlock
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInitializationError;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":501
 * 
 *         err = ccuda._cuDeviceGetAttribute(&reservedSharedMemPerBlock, ccuda.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK, <ccuda.CUdevice>(deviceOrdinal))
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:             # <<<<<<<<<<<<<<
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].reservedSharedMemPerBlock = reservedSharedMemPerBlock
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":503
 *         if err != ccuda.cudaError_enum.CUDA_SUCCESS:
 *             return cudaErrorInitializationError
 *         self._deviceProperties[deviceOrdinal].reservedSharedMemPerBlock = reservedSharedMemPerBlock             # <<<<<<<<<<<<<<
 * 
 *         self._deviceInit[deviceOrdinal] = True
 */
  (__pyx_v_self->_deviceProperties[__pyx_v_deviceOrdinal]).reservedSharedMemPerBlock = __pyx_v_reservedSharedMemPerBlock;

  /* "cuda/_lib/ccudart/utils.pyx":505
 *         self._deviceProperties[deviceOrdinal].reservedSharedMemPerBlock = reservedSharedMemPerBlock
 * 
 *         self._deviceInit[deviceOrdinal] = True             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  (__pyx_v_self->_deviceInit[__pyx_v_deviceOrdinal]) = 1;

  /* "cuda/_lib/ccudart/utils.pyx":506
 * 
 *         self._deviceInit[deviceOrdinal] = True
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * cdef cudaPythonGlobal m_global = cudaPythonGlobal()
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":86
 *         self._cudaPythonInit = True
 * 
 *     cdef cudaError_t lazyInitDevice(self, int deviceOrdinal) nogil:             # <<<<<<<<<<<<<<
 *         if self._deviceInit[deviceOrdinal]:
 *             return cudaSuccess
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.cudaPythonGlobal.lazyInitDevice", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_4__reduce_cython__[] = "cudaPythonGlobal.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_5__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_4__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_4__reduce_cython__(((struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)__pyx_v_self));

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

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

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

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

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

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

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_6__setstate_cython__[] = "cudaPythonGlobal.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_7__setstate_cython__, METH_O, __pyx_doc_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_6__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_6__setstate_cython__(((struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

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

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

/* "cuda/_lib/ccudart/utils.pyx":510
 * cdef cudaPythonGlobal m_global = cudaPythonGlobal()
 * 
 * cdef cudaPythonGlobal globalGetInstance():             # <<<<<<<<<<<<<<
 *     return m_global
 * 
 */

static struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_f_4cuda_4_lib_7ccudart_5utils_globalGetInstance(void) {
  struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("globalGetInstance", 0);
  __Pyx_TraceCall("globalGetInstance", __pyx_f[1], 510, 0, __PYX_ERR(1, 510, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":511
 * 
 * cdef cudaPythonGlobal globalGetInstance():
 *     return m_global             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t _setLastError(cudaError_t err) nogil:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global));
  __pyx_r = __pyx_v_4cuda_4_lib_7ccudart_5utils_m_global;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":510
 * cdef cudaPythonGlobal m_global = cudaPythonGlobal()
 * 
 * cdef cudaPythonGlobal globalGetInstance():             # <<<<<<<<<<<<<<
 *     return m_global
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda._lib.ccudart.utils.globalGetInstance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":513
 *     return m_global
 * 
 * cdef cudaError_t _setLastError(cudaError_t err) nogil:             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         m_global._lastError = err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils__setLastError(__pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("_setLastError", __pyx_f[1], 513, 1, __PYX_ERR(1, 513, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":514
 * 
 * cdef cudaError_t _setLastError(cudaError_t err) nogil:
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         m_global._lastError = err
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":515
 * cdef cudaError_t _setLastError(cudaError_t err) nogil:
 *     if err != cudaSuccess:
 *         m_global._lastError = err             # <<<<<<<<<<<<<<
 * 
 * cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) nogil:
 */
    __pyx_v_4cuda_4_lib_7ccudart_5utils_m_global->_lastError = __pyx_v_err;

    /* "cuda/_lib/ccudart/utils.pyx":514
 * 
 * cdef cudaError_t _setLastError(cudaError_t err) nogil:
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         m_global._lastError = err
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":513
 *     return m_global
 * 
 * cdef cudaError_t _setLastError(cudaError_t err) nogil:             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         m_global._lastError = err
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils._setLastError", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":517
 *         m_global._lastError = err
 * 
 * cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) nogil:             # <<<<<<<<<<<<<<
 *     return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f
 * 
 */

static int __pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *__pyx_v_d, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_w, int __pyx_v_f) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("case_desc", __pyx_f[1], 517, 1, __PYX_ERR(1, 517, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":518
 * 
 * cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) nogil:
 *     return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, ccuda.CUarray_format *format) nogil:
 */
  __pyx_t_2 = ((__pyx_v_d[0]).x == __pyx_v_x);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_d[0]).y == __pyx_v_y);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_d[0]).z == __pyx_v_z);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_d[0]).w == __pyx_v_w);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_d[0]).f == __pyx_v_f);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":517
 *         m_global._lastError = err
 * 
 * cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) nogil:             # <<<<<<<<<<<<<<
 *     return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.case_desc", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":520
 *     return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f
 * 
 * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, ccuda.CUarray_format *format) nogil:             # <<<<<<<<<<<<<<
 *     # Check validity
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned,
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo(struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *__pyx_v_d, int *__pyx_v_numberOfChannels, __pyx_t_4cuda_5ccuda_CUarray_format *__pyx_v_format) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  enum __pyx_t_4cuda_7ccudart_cudaChannelFormatKind __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getDescInfo", __pyx_f[1], 520, 1, __PYX_ERR(1, 520, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":522
 * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, ccuda.CUarray_format *format) nogil:
 *     # Check validity
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned,             # <<<<<<<<<<<<<<
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):
 */
  __pyx_t_1 = (__pyx_v_d[0]).f;
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":523
 *     # Check validity
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned,
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor
 */
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":522
 * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, ccuda.CUarray_format *format) nogil:
 *     # Check validity
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned,             # <<<<<<<<<<<<<<
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):
 */
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":524
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned,
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,):
 */
    __pyx_t_2 = (((__pyx_v_d[0]).x != 8) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).x != 16) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).x != 32) != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_3) {

      /* "cuda/_lib/ccudart/utils.pyx":525
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,):
 *         if (d[0].x != 16) and (d[0].x != 32):
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":524
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned,
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,):
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":522
 * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, ccuda.CUarray_format *format) nogil:
 *     # Check validity
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned,             # <<<<<<<<<<<<<<
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":526
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor
 */
  __pyx_t_1 = (__pyx_v_d[0]).f;
  __pyx_t_3 = (((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":527
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,):
 *         if (d[0].x != 16) and (d[0].x != 32):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,):
 */
    __pyx_t_2 = (((__pyx_v_d[0]).x != 16) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).x != 32) != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_3) {

      /* "cuda/_lib/ccudart/utils.pyx":528
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,):
 *         if (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,):
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":527
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,):
 *         if (d[0].x != 16) and (d[0].x != 32):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,):
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":526
 *         if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":529
 *         if (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor
 */
  __pyx_t_1 = (__pyx_v_d[0]).f;
  __pyx_t_3 = (((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindNV12) != 0) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":530
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,):
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,
 */
    __pyx_t_2 = (((__pyx_v_d[0]).x != 8) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).y != 8) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).z != 8) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).w != 0) != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L14_bool_binop_done:;
    if (__pyx_t_3) {

      /* "cuda/_lib/ccudart/utils.pyx":531
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,):
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2,
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":530
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,):
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":529
 *         if (d[0].x != 16) and (d[0].x != 32):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":532
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4,
 */
  __pyx_t_1 = (__pyx_v_d[0]).f;
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X1) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L18_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":533
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X2) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L18_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":532
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X4) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L18_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":535
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,):
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X1) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L18_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":532
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X2) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L18_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":537
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X4) != 0);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L18_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":532
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4,
 */
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":538
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,):
 *         if (d[0].x != 8):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,
 */
    __pyx_t_2 = (((__pyx_v_d[0]).x != 8) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":539
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,):
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2,
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":538
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,):
 *         if (d[0].x != 8):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":532
 *         if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4,
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":540
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4,
 */
  __pyx_t_1 = (__pyx_v_d[0]).f;
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X1) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L25_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":541
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1,
 */
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X2) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L25_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":540
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4,
 */
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X4) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L25_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":543
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,):
 */
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X1) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L25_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":540
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4,
 */
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X2) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L25_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":545
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 */
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X4) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L25_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":540
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4,
 */
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":546
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,):
 *         if (d[0].x != 16):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,
 */
    __pyx_t_3 = (((__pyx_v_d[0]).x != 16) != 0);
    if (__pyx_t_3) {

      /* "cuda/_lib/ccudart/utils.pyx":547
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,):
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":546
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,):
 *         if (d[0].x != 16):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":540
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4,
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":548
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 */
  __pyx_t_1 = (__pyx_v_d[0]).f;
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed1) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":549
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed1SRGB) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":548
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed2) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":551
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed2SRGB) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":548
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed3) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":553
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed3SRGB) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":548
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed4) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":555
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed4) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":548
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed5) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":557
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,):
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed5) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":548
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed7) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":559
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed7SRGB) != 0);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L32_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":548
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 */
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":560
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,):
 *         if (d[0].x != 8):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 */
    __pyx_t_2 = (((__pyx_v_d[0]).x != 8) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":561
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,):
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":560
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,):
 *         if (d[0].x != 8):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":548
 *         if (d[0].x != 16):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB,
 *                     cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2,
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":562
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0):
 */
  __pyx_t_1 = (__pyx_v_d[0]).f;
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed6H) != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L45_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":563
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):             # <<<<<<<<<<<<<<
 *         if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor
 */
  __pyx_t_3 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed6H) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L45_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":562
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0):
 */
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":564
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     else:
 */
    __pyx_t_2 = (((__pyx_v_d[0]).x != 16) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L48_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).y != 16) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L48_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).z != 16) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L48_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_d[0]).w != 0) != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L48_bool_binop_done:;
    if (__pyx_t_3) {

      /* "cuda/_lib/ccudart/utils.pyx":565
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0):
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidChannelDescriptor
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":564
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     else:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":562
 *         if (d[0].x != 8):
 *             return cudaErrorInvalidChannelDescriptor
 *     elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,             # <<<<<<<<<<<<<<
 *                     cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0):
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":567
 *             return cudaErrorInvalidChannelDescriptor
 *     else:
 *         return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 * 
 *     # If Y is non-zero, it must match X
 */
  /*else*/ {
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "cuda/_lib/ccudart/utils.pyx":572
 *     # If Z is non-zero, it must match Y
 *     # If W is non-zero, it must match Z
 *     if (((d[0].y != 0) and (d[0].y != d[0].x)) or             # <<<<<<<<<<<<<<
 *         ((d[0].z != 0) and (d[0].z != d[0].y)) or
 *         ((d[0].w != 0) and (d[0].w != d[0].z))):
 */
  __pyx_t_2 = (((__pyx_v_d[0]).y != 0) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L54_next_or;
  } else {
  }
  __pyx_t_2 = (((__pyx_v_d[0]).y != (__pyx_v_d[0]).x) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L53_bool_binop_done;
  }
  __pyx_L54_next_or:;

  /* "cuda/_lib/ccudart/utils.pyx":573
 *     # If W is non-zero, it must match Z
 *     if (((d[0].y != 0) and (d[0].y != d[0].x)) or
 *         ((d[0].z != 0) and (d[0].z != d[0].y)) or             # <<<<<<<<<<<<<<
 *         ((d[0].w != 0) and (d[0].w != d[0].z))):
 *         return cudaErrorInvalidChannelDescriptor
 */
  __pyx_t_2 = (((__pyx_v_d[0]).z != 0) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L56_next_or;
  } else {
  }
  __pyx_t_2 = (((__pyx_v_d[0]).z != (__pyx_v_d[0]).y) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L53_bool_binop_done;
  }
  __pyx_L56_next_or:;

  /* "cuda/_lib/ccudart/utils.pyx":574
 *     if (((d[0].y != 0) and (d[0].y != d[0].x)) or
 *         ((d[0].z != 0) and (d[0].z != d[0].y)) or
 *         ((d[0].w != 0) and (d[0].w != d[0].z))):             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidChannelDescriptor
 *     if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
  __pyx_t_2 = (((__pyx_v_d[0]).w != 0) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L53_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_d[0]).w != (__pyx_v_d[0]).z) != 0);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L53_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":572
 *     # If Z is non-zero, it must match Y
 *     # If W is non-zero, it must match Z
 *     if (((d[0].y != 0) and (d[0].y != d[0].x)) or             # <<<<<<<<<<<<<<
 *         ((d[0].z != 0) and (d[0].z != d[0].y)) or
 *         ((d[0].w != 0) and (d[0].w != d[0].z))):
 */
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":575
 *         ((d[0].z != 0) and (d[0].z != d[0].y)) or
 *         ((d[0].w != 0) and (d[0].w != d[0].z))):
 *         return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":572
 *     # If Z is non-zero, it must match Y
 *     # If W is non-zero, it must match Z
 *     if (((d[0].y != 0) and (d[0].y != d[0].x)) or             # <<<<<<<<<<<<<<
 *         ((d[0].z != 0) and (d[0].z != d[0].y)) or
 *         ((d[0].w != 0) and (d[0].w != d[0].z))):
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":576
 *         ((d[0].w != 0) and (d[0].w != d[0].z))):
 *         return cudaErrorInvalidChannelDescriptor
 *     if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":577
 *         return cudaErrorInvalidChannelDescriptor
 *     if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":578
 *     if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8;

    /* "cuda/_lib/ccudart/utils.pyx":576
 *         ((d[0].w != 0) and (d[0].w != d[0].z))):
 *         return cudaErrorInvalidChannelDescriptor
 *     if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":579
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":580
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":581
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8;

    /* "cuda/_lib/ccudart/utils.pyx":579
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":582
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":583
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":584
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8;

    /* "cuda/_lib/ccudart/utils.pyx":582
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":585
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":586
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":587
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8;

    /* "cuda/_lib/ccudart/utils.pyx":585
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":588
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":589
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":590
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8;

    /* "cuda/_lib/ccudart/utils.pyx":588
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":591
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":592
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":593
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8;

    /* "cuda/_lib/ccudart/utils.pyx":591
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":594
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":595
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":596
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8;

    /* "cuda/_lib/ccudart/utils.pyx":594
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":597
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":598
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":599
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8;

    /* "cuda/_lib/ccudart/utils.pyx":597
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":600
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":601
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":602
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16;

    /* "cuda/_lib/ccudart/utils.pyx":600
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":603
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":604
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":605
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16;

    /* "cuda/_lib/ccudart/utils.pyx":603
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":606
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 16, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":607
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":608
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16;

    /* "cuda/_lib/ccudart/utils.pyx":606
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":609
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 16, 16, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":610
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":611
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16;

    /* "cuda/_lib/ccudart/utils.pyx":609
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":612
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":613
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":614
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16;

    /* "cuda/_lib/ccudart/utils.pyx":612
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":615
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":616
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":617
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16;

    /* "cuda/_lib/ccudart/utils.pyx":615
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":618
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 16, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":619
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":620
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16;

    /* "cuda/_lib/ccudart/utils.pyx":618
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":621
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 16, 16, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":622
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":623
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16;

    /* "cuda/_lib/ccudart/utils.pyx":621
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":624
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":625
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":626
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32;

    /* "cuda/_lib/ccudart/utils.pyx":624
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":627
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":628
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":629
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32;

    /* "cuda/_lib/ccudart/utils.pyx":627
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":630
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 32, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":631
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":632
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32;

    /* "cuda/_lib/ccudart/utils.pyx":630
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":633
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 32, 32, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":634
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":635
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32;

    /* "cuda/_lib/ccudart/utils.pyx":633
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":636
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":637
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":638
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32;

    /* "cuda/_lib/ccudart/utils.pyx":636
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":639
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":640
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":641
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32;

    /* "cuda/_lib/ccudart/utils.pyx":639
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":642
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 32, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":643
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":644
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32;

    /* "cuda/_lib/ccudart/utils.pyx":642
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":645
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 32, 32, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":646
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":647
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32;

    /* "cuda/_lib/ccudart/utils.pyx":645
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":648
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":649
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":650
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF;

    /* "cuda/_lib/ccudart/utils.pyx":648
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32
 *     elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":651
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":652
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":653
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF;

    /* "cuda/_lib/ccudart/utils.pyx":651
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":654
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 16, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":655
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":656
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF;

    /* "cuda/_lib/ccudart/utils.pyx":654
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":657
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 16, 16, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":658
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":659
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF;

    /* "cuda/_lib/ccudart/utils.pyx":657
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":660
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":661
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":662
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT;

    /* "cuda/_lib/ccudart/utils.pyx":660
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF
 *     elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":663
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":664
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":665
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT;

    /* "cuda/_lib/ccudart/utils.pyx":663
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":666
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 32, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":667
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":668
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT;

    /* "cuda/_lib/ccudart/utils.pyx":666
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":669
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 32, 32, 32, 32, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":670
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":671
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT;

    /* "cuda/_lib/ccudart/utils.pyx":669
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":672
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_NV12
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindNV12) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":673
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_NV12
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":674
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_NV12             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_NV12;

    /* "cuda/_lib/ccudart/utils.pyx":672
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT
 *     elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_NV12
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":675
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_NV12
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed1) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":676
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_NV12
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":677
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM;

    /* "cuda/_lib/ccudart/utils.pyx":675
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_NV12
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":678
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed1SRGB) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":679
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":680
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM_SRGB;

    /* "cuda/_lib/ccudart/utils.pyx":678
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":681
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed2) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":682
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":683
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM;

    /* "cuda/_lib/ccudart/utils.pyx":681
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":684
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed2SRGB) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":685
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":686
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM_SRGB;

    /* "cuda/_lib/ccudart/utils.pyx":684
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":687
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed3) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":688
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":689
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM;

    /* "cuda/_lib/ccudart/utils.pyx":687
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":690
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed3SRGB) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":691
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":692
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM_SRGB;

    /* "cuda/_lib/ccudart/utils.pyx":690
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":693
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed4) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":694
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":695
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4):
 *         numberOfChannels[0] = 1
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_UNORM;

    /* "cuda/_lib/ccudart/utils.pyx":693
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":696
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 0, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed4) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":697
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4):
 *         numberOfChannels[0] = 1             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5):
 */
    (__pyx_v_numberOfChannels[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":698
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4):
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_SNORM;

    /* "cuda/_lib/ccudart/utils.pyx":696
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM
 *     elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":699
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed5) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":700
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":701
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5):
 *         numberOfChannels[0] = 2
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_UNORM;

    /* "cuda/_lib/ccudart/utils.pyx":699
 *         numberOfChannels[0] = 1
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":702
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 0, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed5) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":703
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5):
 *         numberOfChannels[0] = 2             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H):
 */
    (__pyx_v_numberOfChannels[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":704
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5):
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_SNORM;

    /* "cuda/_lib/ccudart/utils.pyx":702
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM
 *     elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":705
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 16, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed6H) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":706
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":707
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H):
 *         numberOfChannels[0] = 3
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_UF16;

    /* "cuda/_lib/ccudart/utils.pyx":705
 *         numberOfChannels[0] = 2
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":708
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 16, 16, 16, 0, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed6H) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":709
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H):
 *         numberOfChannels[0] = 3             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7):
 */
    (__pyx_v_numberOfChannels[0]) = 3;

    /* "cuda/_lib/ccudart/utils.pyx":710
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H):
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_SF16;

    /* "cuda/_lib/ccudart/utils.pyx":708
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16
 *     elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":711
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed7) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":712
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB):
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":713
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM             # <<<<<<<<<<<<<<
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB):
 *         numberOfChannels[0] = 4
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM;

    /* "cuda/_lib/ccudart/utils.pyx":711
 *         numberOfChannels[0] = 3
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":714
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB
 */
  __pyx_t_3 = (__pyx_f_4cuda_4_lib_7ccudart_5utils_case_desc(__pyx_v_d, 8, 8, 8, 8, __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed7SRGB) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":715
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB):
 *         numberOfChannels[0] = 4             # <<<<<<<<<<<<<<
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB
 *     else:
 */
    (__pyx_v_numberOfChannels[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":716
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB):
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidChannelDescriptor
 */
    (__pyx_v_format[0]) = __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM_SRGB;

    /* "cuda/_lib/ccudart/utils.pyx":714
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM
 *     elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB):             # <<<<<<<<<<<<<<
 *         numberOfChannels[0] = 4
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB
 */
    goto __pyx_L59;
  }

  /* "cuda/_lib/ccudart/utils.pyx":718
 *         format[0] = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB
 *     else:
 *         return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 * 
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,
 */
  /*else*/ {
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
    goto __pyx_L0;
  }
  __pyx_L59:;

  /* "cuda/_lib/ccudart/utils.pyx":720
 *         return cudaErrorInvalidChannelDescriptor
 * 
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,             # <<<<<<<<<<<<<<
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                   cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 */
  __pyx_t_1 = (__pyx_v_d[0]).f;
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindNV12) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L61_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":721
 * 
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,             # <<<<<<<<<<<<<<
 *                   cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if numberOfChannels[0] != 3:
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed6H) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L61_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":720
 *         return cudaErrorInvalidChannelDescriptor
 * 
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,             # <<<<<<<<<<<<<<
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                   cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 */
  __pyx_t_2 = ((__pyx_t_1 == __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed6H) != 0);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L61_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":723
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                   cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if numberOfChannels[0] != 3:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     else:
 */
    __pyx_t_2 = (((__pyx_v_numberOfChannels[0]) != 3) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":724
 *                   cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if numberOfChannels[0] != 3:
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     else:
 *         if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4):
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":723
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                   cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 *         if numberOfChannels[0] != 3:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     else:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":720
 *         return cudaErrorInvalidChannelDescriptor
 * 
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,             # <<<<<<<<<<<<<<
 *                   cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H,
 *                   cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,):
 */
    goto __pyx_L60;
  }

  /* "cuda/_lib/ccudart/utils.pyx":726
 *             return cudaErrorInvalidChannelDescriptor
 *     else:
 *         if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     return cudaSuccess
 */
  /*else*/ {
    __pyx_t_3 = (((__pyx_v_numberOfChannels[0]) != 1) != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L66_bool_binop_done;
    }
    __pyx_t_3 = (((__pyx_v_numberOfChannels[0]) != 2) != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L66_bool_binop_done;
    }
    __pyx_t_3 = (((__pyx_v_numberOfChannels[0]) != 4) != 0);
    __pyx_t_2 = __pyx_t_3;
    __pyx_L66_bool_binop_done:;
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":727
 *     else:
 *         if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4):
 *             return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":726
 *             return cudaErrorInvalidChannelDescriptor
 *     else:
 *         if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidChannelDescriptor
 *     return cudaSuccess
 */
    }
  }
  __pyx_L60:;

  /* "cuda/_lib/ccudart/utils.pyx":728
 *         if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4):
 *             return cudaErrorInvalidChannelDescriptor
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":520
 *     return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f
 * 
 * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, ccuda.CUarray_format *format) nogil:             # <<<<<<<<<<<<<<
 *     # Check validity
 *     if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.getDescInfo", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":732
 * 
 * #TODO: Check return type of this method CUDA_CB
 * cdef void cudaStreamRtCallbackWrapper(ccuda.CUstream stream, ccuda.CUresult status, void *data) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaStreamCallbackData *cbData = <cudaStreamCallbackData *>data
 *     cdef cudaError_t err = <cudaError_t>status
 */

static void __pyx_f_4cuda_4_lib_7ccudart_5utils_cudaStreamRtCallbackWrapper(__pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, __pyx_t_4cuda_5ccuda_CUresult __pyx_v_status, void *__pyx_v_data) {
  __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData *__pyx_v_cbData;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("cudaStreamRtCallbackWrapper", 1);
  __Pyx_TraceCall("cudaStreamRtCallbackWrapper", __pyx_f[1], 732, 1, __PYX_ERR(1, 732, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":733
 * #TODO: Check return type of this method CUDA_CB
 * cdef void cudaStreamRtCallbackWrapper(ccuda.CUstream stream, ccuda.CUresult status, void *data) nogil except +:
 *     cdef cudaStreamCallbackData *cbData = <cudaStreamCallbackData *>data             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err = <cudaError_t>status
 *     with gil:
 */
  /*try:*/ {
    __pyx_v_cbData = ((__pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData *)__pyx_v_data);

    /* "cuda/_lib/ccudart/utils.pyx":734
 * cdef void cudaStreamRtCallbackWrapper(ccuda.CUstream stream, ccuda.CUresult status, void *data) nogil except +:
 *     cdef cudaStreamCallbackData *cbData = <cudaStreamCallbackData *>data
 *     cdef cudaError_t err = <cudaError_t>status             # <<<<<<<<<<<<<<
 *     with gil:
 *         cbData.callback(stream, err, cbData.userData)
 */
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_v_status);

    /* "cuda/_lib/ccudart/utils.pyx":735
 *     cdef cudaStreamCallbackData *cbData = <cudaStreamCallbackData *>data
 *     cdef cudaError_t err = <cudaError_t>status
 *     with gil:             # <<<<<<<<<<<<<<
 *         cbData.callback(stream, err, cbData.userData)
 *     free(cbData)
 */
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "cuda/_lib/ccudart/utils.pyx":736
 *     cdef cudaError_t err = <cudaError_t>status
 *     with gil:
 *         cbData.callback(stream, err, cbData.userData)             # <<<<<<<<<<<<<<
 *     free(cbData)
 * 
 */
          __pyx_v_cbData->callback(__pyx_v_stream, __pyx_v_err, __pyx_v_cbData->userData);
        }

        /* "cuda/_lib/ccudart/utils.pyx":735
 *     cdef cudaStreamCallbackData *cbData = <cudaStreamCallbackData *>data
 *     cdef cudaError_t err = <cudaError_t>status
 *     with gil:             # <<<<<<<<<<<<<<
 *         cbData.callback(stream, err, cbData.userData)
 *     free(cbData)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L8;
          }
          __pyx_L8:;
        }
    }

    /* "cuda/_lib/ccudart/utils.pyx":737
 *     with gil:
 *         cbData.callback(stream, err, cbData.userData)
 *     free(cbData)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    free(__pyx_v_cbData);
  }

  /* "cuda/_lib/ccudart/utils.pyx":733
 * #TODO: Check return type of this method CUDA_CB
 * cdef void cudaStreamRtCallbackWrapper(ccuda.CUstream stream, ccuda.CUresult status, void *data) nogil except +:
 *     cdef cudaStreamCallbackData *cbData = <cudaStreamCallbackData *>data             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err = <cudaError_t>status
 *     with gil:
 */
  /*finally:*/ {
    /*normal exit:*/{
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "cuda/_lib/ccudart/utils.pyx":732
 * 
 * #TODO: Check return type of this method CUDA_CB
 * cdef void cudaStreamRtCallbackWrapper(ccuda.CUstream stream, ccuda.CUresult status, void *data) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaStreamCallbackData *cbData = <cudaStreamCallbackData *>data
 *     cdef cudaError_t err = <cudaError_t>status
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda._lib.ccudart.utils.cudaStreamRtCallbackWrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "cuda/_lib/ccudart/utils.pyx":740
 * 
 * 
 * cdef cudaError_t streamAddCallbackCommon(             # <<<<<<<<<<<<<<
 *   cudaStream_t stream,
 *   cudaStreamCallback_t callback,
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_streamAddCallbackCommon(__pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_stream, __pyx_t_4cuda_7ccudart_cudaStreamCallback_t __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData *__pyx_v_cbData;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("streamAddCallbackCommon", __pyx_f[1], 740, 1, __PYX_ERR(1, 740, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":746
 *   unsigned int flags
 * ) nogil except +:
 *     if callback == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  __pyx_t_1 = ((__pyx_v_callback == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":747
 * ) nogil except +:
 *     if callback == NULL:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     cdef cudaStreamCallbackData *cbData = NULL
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":746
 *   unsigned int flags
 * ) nogil except +:
 *     if callback == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":749
 *         return cudaErrorInvalidValue
 * 
 *     cdef cudaStreamCallbackData *cbData = NULL             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err
 *     cbData = <cudaStreamCallbackData *>malloc(sizeof(cbData[0]))
 */
  __pyx_v_cbData = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":751
 *     cdef cudaStreamCallbackData *cbData = NULL
 *     cdef cudaError_t err
 *     cbData = <cudaStreamCallbackData *>malloc(sizeof(cbData[0]))             # <<<<<<<<<<<<<<
 * 
 *     if cbData == NULL:
 */
  __pyx_v_cbData = ((__pyx_t_4cuda_4_lib_7ccudart_5utils_cudaStreamCallbackData *)malloc((sizeof((__pyx_v_cbData[0])))));

  /* "cuda/_lib/ccudart/utils.pyx":753
 *     cbData = <cudaStreamCallbackData *>malloc(sizeof(cbData[0]))
 * 
 *     if cbData == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorMemoryAllocation
 * 
 */
  __pyx_t_1 = ((__pyx_v_cbData == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":754
 * 
 *     if cbData == NULL:
 *         return cudaErrorMemoryAllocation             # <<<<<<<<<<<<<<
 * 
 *     cbData.callback = callback
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorMemoryAllocation;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":753
 *     cbData = <cudaStreamCallbackData *>malloc(sizeof(cbData[0]))
 * 
 *     if cbData == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorMemoryAllocation
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":756
 *         return cudaErrorMemoryAllocation
 * 
 *     cbData.callback = callback             # <<<<<<<<<<<<<<
 *     cbData.userData = userData
 *     err = <cudaError_t>ccuda._cuStreamAddCallback(stream, <ccuda.CUstreamCallback>cudaStreamRtCallbackWrapper, <void *>cbData, flags)
 */
  __pyx_v_cbData->callback = __pyx_v_callback;

  /* "cuda/_lib/ccudart/utils.pyx":757
 * 
 *     cbData.callback = callback
 *     cbData.userData = userData             # <<<<<<<<<<<<<<
 *     err = <cudaError_t>ccuda._cuStreamAddCallback(stream, <ccuda.CUstreamCallback>cudaStreamRtCallbackWrapper, <void *>cbData, flags)
 *     if err != cudaSuccess:
 */
  __pyx_v_cbData->userData = __pyx_v_userData;

  /* "cuda/_lib/ccudart/utils.pyx":758
 *     cbData.callback = callback
 *     cbData.userData = userData
 *     err = <cudaError_t>ccuda._cuStreamAddCallback(stream, <ccuda.CUstreamCallback>cudaStreamRtCallbackWrapper, <void *>cbData, flags)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         free(cbData)
 */
  __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback(__pyx_v_stream, ((__pyx_t_4cuda_5ccuda_CUstreamCallback)__pyx_f_4cuda_4_lib_7ccudart_5utils_cudaStreamRtCallbackWrapper), ((void *)__pyx_v_cbData), __pyx_v_flags); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 758, __pyx_L1_error)
  __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_2);

  /* "cuda/_lib/ccudart/utils.pyx":759
 *     cbData.userData = userData
 *     err = <cudaError_t>ccuda._cuStreamAddCallback(stream, <ccuda.CUstreamCallback>cudaStreamRtCallbackWrapper, <void *>cbData, flags)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         free(cbData)
 *     return err
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":760
 *     err = <cudaError_t>ccuda._cuStreamAddCallback(stream, <ccuda.CUstreamCallback>cudaStreamRtCallbackWrapper, <void *>cbData, flags)
 *     if err != cudaSuccess:
 *         free(cbData)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    free(__pyx_v_cbData);

    /* "cuda/_lib/ccudart/utils.pyx":759
 *     cbData.userData = userData
 *     err = <cudaError_t>ccuda._cuStreamAddCallback(stream, <ccuda.CUstreamCallback>cudaStreamRtCallbackWrapper, <void *>cbData, flags)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         free(cbData)
 *     return err
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":761
 *     if err != cudaSuccess:
 *         free(cbData)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_err;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":740
 * 
 * 
 * cdef cudaError_t streamAddCallbackCommon(             # <<<<<<<<<<<<<<
 *   cudaStream_t stream,
 *   cudaStreamCallback_t callback,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.streamAddCallbackCommon", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":764
 * 
 * 
 * cdef cudaError_t toRuntimeStreamCaptureStatus(ccuda.CUstreamCaptureStatus driverCaptureStatus, cudaStreamCaptureStatus *runtimeStatus) nogil except +:             # <<<<<<<<<<<<<<
 *     if driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusNone
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_toRuntimeStreamCaptureStatus(__pyx_t_4cuda_5ccuda_CUstreamCaptureStatus __pyx_v_driverCaptureStatus, enum __pyx_t_4cuda_7ccudart_cudaStreamCaptureStatus *__pyx_v_runtimeStatus) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("toRuntimeStreamCaptureStatus", __pyx_f[1], 764, 1, __PYX_ERR(1, 764, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":765
 * 
 * cdef cudaError_t toRuntimeStreamCaptureStatus(ccuda.CUstreamCaptureStatus driverCaptureStatus, cudaStreamCaptureStatus *runtimeStatus) nogil except +:
 *     if driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE:             # <<<<<<<<<<<<<<
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusNone
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE:
 */
  switch (__pyx_v_driverCaptureStatus) {
    case __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_NONE:

    /* "cuda/_lib/ccudart/utils.pyx":766
 * cdef cudaError_t toRuntimeStreamCaptureStatus(ccuda.CUstreamCaptureStatus driverCaptureStatus, cudaStreamCaptureStatus *runtimeStatus) nogil except +:
 *     if driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusNone             # <<<<<<<<<<<<<<
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusActive
 */
    (__pyx_v_runtimeStatus[0]) = __pyx_e_4cuda_7ccudart_cudaStreamCaptureStatusNone;

    /* "cuda/_lib/ccudart/utils.pyx":765
 * 
 * cdef cudaError_t toRuntimeStreamCaptureStatus(ccuda.CUstreamCaptureStatus driverCaptureStatus, cudaStreamCaptureStatus *runtimeStatus) nogil except +:
 *     if driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE:             # <<<<<<<<<<<<<<
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusNone
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_ACTIVE:

    /* "cuda/_lib/ccudart/utils.pyx":768
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusNone
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusActive             # <<<<<<<<<<<<<<
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated
 */
    (__pyx_v_runtimeStatus[0]) = __pyx_e_4cuda_7ccudart_cudaStreamCaptureStatusActive;

    /* "cuda/_lib/ccudart/utils.pyx":767
 *     if driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusNone
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE:             # <<<<<<<<<<<<<<
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusActive
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_STREAM_CAPTURE_STATUS_INVALIDATED:

    /* "cuda/_lib/ccudart/utils.pyx":770
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusActive
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated             # <<<<<<<<<<<<<<
 *     else:
 *          return cudaErrorUnknown
 */
    (__pyx_v_runtimeStatus[0]) = __pyx_e_4cuda_7ccudart_cudaStreamCaptureStatusInvalidated;

    /* "cuda/_lib/ccudart/utils.pyx":769
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusActive
 *     elif driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED:             # <<<<<<<<<<<<<<
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated
 *     else:
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":772
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated
 *     else:
 *          return cudaErrorUnknown             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorUnknown;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":773
 *     else:
 *          return cudaErrorUnknown
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":764
 * 
 * 
 * cdef cudaError_t toRuntimeStreamCaptureStatus(ccuda.CUstreamCaptureStatus driverCaptureStatus, cudaStreamCaptureStatus *runtimeStatus) nogil except +:             # <<<<<<<<<<<<<<
 *     if driverCaptureStatus == ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE:
 *         runtimeStatus[0] = cudaStreamCaptureStatus.cudaStreamCaptureStatusNone
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.toRuntimeStreamCaptureStatus", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":776
 * 
 * 
 * cdef cudaError_t streamGetCaptureInfoCommon(             # <<<<<<<<<<<<<<
 *   cudaStream_t stream,
 *   cudaStreamCaptureStatus* captureStatus_out,
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_streamGetCaptureInfoCommon(__pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_stream, enum __pyx_t_4cuda_7ccudart_cudaStreamCaptureStatus *__pyx_v_captureStatus_out, unsigned PY_LONG_LONG *__pyx_v_id_out, __pyx_t_4cuda_7ccudart_cudaGraph_t *__pyx_v_graph_out, __pyx_t_4cuda_7ccudart_cudaGraphNode_t const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus __pyx_v_driverCaptureStatus;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("streamGetCaptureInfoCommon", __pyx_f[1], 776, 1, __PYX_ERR(1, 776, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":786
 *     cdef cudaError_t err
 * 
 *     if captureStatus_out == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  __pyx_t_1 = ((__pyx_v_captureStatus_out == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":787
 * 
 *     if captureStatus_out == NULL:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstreamCaptureStatus driverCaptureStatus
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":786
 *     cdef cudaError_t err
 * 
 *     if captureStatus_out == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":791
 *     cdef ccuda.CUstreamCaptureStatus driverCaptureStatus
 * 
 *     if graph_out or dependencies_out or numDependencies_out:             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo_v2(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out,
 *                 graph_out, dependencies_out, numDependencies_out)
 */
  __pyx_t_2 = (__pyx_v_graph_out != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dependencies_out != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_numDependencies_out != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":792
 * 
 *     if graph_out or dependencies_out or numDependencies_out:
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo_v2(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out,             # <<<<<<<<<<<<<<
 *                 graph_out, dependencies_out, numDependencies_out)
 *         if err != cudaSuccess:
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2(__pyx_v_stream, (&__pyx_v_driverCaptureStatus), ((__pyx_t_4cuda_5ccuda_cuuint64_t *)__pyx_v_id_out), __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 792, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":794
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo_v2(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out,
 *                 graph_out, dependencies_out, numDependencies_out)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     else:
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":795
 *                 graph_out, dependencies_out, numDependencies_out)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     else:
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out)
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":794
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo_v2(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out,
 *                 graph_out, dependencies_out, numDependencies_out)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     else:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":791
 *     cdef ccuda.CUstreamCaptureStatus driverCaptureStatus
 * 
 *     if graph_out or dependencies_out or numDependencies_out:             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo_v2(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out,
 *                 graph_out, dependencies_out, numDependencies_out)
 */
    goto __pyx_L4;
  }

  /* "cuda/_lib/ccudart/utils.pyx":797
 *             return err
 *     else:
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
  /*else*/ {
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo(__pyx_v_stream, (&__pyx_v_driverCaptureStatus), ((__pyx_t_4cuda_5ccuda_cuuint64_t *)__pyx_v_id_out)); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 797, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":798
 *     else:
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":799
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     return toRuntimeStreamCaptureStatus(driverCaptureStatus, captureStatus_out)
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":798
 *     else:
 *         err = <cudaError_t>ccuda._cuStreamGetCaptureInfo(stream, &driverCaptureStatus, <ccuda.cuuint64_t*>id_out)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }
  }
  __pyx_L4:;

  /* "cuda/_lib/ccudart/utils.pyx":801
 *             return err
 * 
 *     return toRuntimeStreamCaptureStatus(driverCaptureStatus, captureStatus_out)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  try {
    __pyx_t_4 = __pyx_f_4cuda_4_lib_7ccudart_5utils_toRuntimeStreamCaptureStatus(__pyx_v_driverCaptureStatus, __pyx_v_captureStatus_out);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 801, __pyx_L1_error)
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":776
 * 
 * 
 * cdef cudaError_t streamGetCaptureInfoCommon(             # <<<<<<<<<<<<<<
 *   cudaStream_t stream,
 *   cudaStreamCaptureStatus* captureStatus_out,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.streamGetCaptureInfoCommon", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":804
 * 
 * 
 * cdef ccuda.CUDA_MEMCPY3D_v2 memCopy3DInit(ccuda.CUmemorytype_enum dstType, ccuda.CUmemorytype_enum srcType) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp
 *     memset(&cp, 0, sizeof(cp))
 */

static __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum __pyx_v_dstType, enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum __pyx_v_srcType) {
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memCopy3DInit", __pyx_f[1], 804, 1, __PYX_ERR(1, 804, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":806
 * cdef ccuda.CUDA_MEMCPY3D_v2 memCopy3DInit(ccuda.CUmemorytype_enum dstType, ccuda.CUmemorytype_enum srcType) nogil except +:
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp
 *     memset(&cp, 0, sizeof(cp))             # <<<<<<<<<<<<<<
 *     cp.dstMemoryType = dstType
 *     cp.srcMemoryType = srcType
 */
  (void)(memset((&__pyx_v_cp), 0, (sizeof(__pyx_v_cp))));

  /* "cuda/_lib/ccudart/utils.pyx":807
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp
 *     memset(&cp, 0, sizeof(cp))
 *     cp.dstMemoryType = dstType             # <<<<<<<<<<<<<<
 *     cp.srcMemoryType = srcType
 *     cp.WidthInBytes = 0
 */
  __pyx_v_cp.dstMemoryType = __pyx_v_dstType;

  /* "cuda/_lib/ccudart/utils.pyx":808
 *     memset(&cp, 0, sizeof(cp))
 *     cp.dstMemoryType = dstType
 *     cp.srcMemoryType = srcType             # <<<<<<<<<<<<<<
 *     cp.WidthInBytes = 0
 *     cp.Height = 1
 */
  __pyx_v_cp.srcMemoryType = __pyx_v_srcType;

  /* "cuda/_lib/ccudart/utils.pyx":809
 *     cp.dstMemoryType = dstType
 *     cp.srcMemoryType = srcType
 *     cp.WidthInBytes = 0             # <<<<<<<<<<<<<<
 *     cp.Height = 1
 *     cp.Depth = 1
 */
  __pyx_v_cp.WidthInBytes = 0;

  /* "cuda/_lib/ccudart/utils.pyx":810
 *     cp.srcMemoryType = srcType
 *     cp.WidthInBytes = 0
 *     cp.Height = 1             # <<<<<<<<<<<<<<
 *     cp.Depth = 1
 *     return cp
 */
  __pyx_v_cp.Height = 1;

  /* "cuda/_lib/ccudart/utils.pyx":811
 *     cp.WidthInBytes = 0
 *     cp.Height = 1
 *     cp.Depth = 1             # <<<<<<<<<<<<<<
 *     return cp
 * 
 */
  __pyx_v_cp.Depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":812
 *     cp.Height = 1
 *     cp.Depth = 1
 *     return cp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_cp;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":804
 * 
 * 
 * cdef ccuda.CUDA_MEMCPY3D_v2 memCopy3DInit(ccuda.CUmemorytype_enum dstType, ccuda.CUmemorytype_enum srcType) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp
 *     memset(&cp, 0, sizeof(cp))
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memCopy3DInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":815
 * 
 * 
 * cdef ccuda.CUDA_MEMCPY2D_v2 memCopy2DInit(ccuda.CUmemorytype_enum dstType, ccuda.CUmemorytype_enum srcType) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY2D_v2 cp
 *     memset(&cp, 0, sizeof(cp))
 */

static __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2 __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy2DInit(enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum __pyx_v_dstType, enum __pyx_t_4cuda_5ccuda_CUmemorytype_enum __pyx_v_srcType) {
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2 __pyx_v_cp;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2 __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memCopy2DInit", __pyx_f[1], 815, 1, __PYX_ERR(1, 815, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":817
 * cdef ccuda.CUDA_MEMCPY2D_v2 memCopy2DInit(ccuda.CUmemorytype_enum dstType, ccuda.CUmemorytype_enum srcType) nogil except +:
 *     cdef ccuda.CUDA_MEMCPY2D_v2 cp
 *     memset(&cp, 0, sizeof(cp))             # <<<<<<<<<<<<<<
 *     cp.dstMemoryType = dstType
 *     cp.srcMemoryType = srcType
 */
  (void)(memset((&__pyx_v_cp), 0, (sizeof(__pyx_v_cp))));

  /* "cuda/_lib/ccudart/utils.pyx":818
 *     cdef ccuda.CUDA_MEMCPY2D_v2 cp
 *     memset(&cp, 0, sizeof(cp))
 *     cp.dstMemoryType = dstType             # <<<<<<<<<<<<<<
 *     cp.srcMemoryType = srcType
 *     cp.WidthInBytes = 0
 */
  __pyx_v_cp.dstMemoryType = __pyx_v_dstType;

  /* "cuda/_lib/ccudart/utils.pyx":819
 *     memset(&cp, 0, sizeof(cp))
 *     cp.dstMemoryType = dstType
 *     cp.srcMemoryType = srcType             # <<<<<<<<<<<<<<
 *     cp.WidthInBytes = 0
 *     cp.Height = 1
 */
  __pyx_v_cp.srcMemoryType = __pyx_v_srcType;

  /* "cuda/_lib/ccudart/utils.pyx":820
 *     cp.dstMemoryType = dstType
 *     cp.srcMemoryType = srcType
 *     cp.WidthInBytes = 0             # <<<<<<<<<<<<<<
 *     cp.Height = 1
 *     return cp
 */
  __pyx_v_cp.WidthInBytes = 0;

  /* "cuda/_lib/ccudart/utils.pyx":821
 *     cp.srcMemoryType = srcType
 *     cp.WidthInBytes = 0
 *     cp.Height = 1             # <<<<<<<<<<<<<<
 *     return cp
 * 
 */
  __pyx_v_cp.Height = 1;

  /* "cuda/_lib/ccudart/utils.pyx":822
 *     cp.WidthInBytes = 0
 *     cp.Height = 1
 *     return cp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_cp;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":815
 * 
 * 
 * cdef ccuda.CUDA_MEMCPY2D_v2 memCopy2DInit(ccuda.CUmemorytype_enum dstType, ccuda.CUmemorytype_enum srcType) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY2D_v2 cp
 *     memset(&cp, 0, sizeof(cp))
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memCopy2DInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":825
 * 
 * 
 * cdef cudaError_t bytesPerElement(size_t *bytes, int numberOfChannels, ccuda.CUarray_format format) nogil except +:             # <<<<<<<<<<<<<<
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_bytesPerElement(size_t *__pyx_v_bytes, int __pyx_v_numberOfChannels, __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_format) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("bytesPerElement", __pyx_f[1], 825, 1, __PYX_ERR(1, 825, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":826
 * 
 * cdef cudaError_t bytesPerElement(size_t *bytes, int numberOfChannels, ccuda.CUarray_format format) nogil except +:
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32):
 */
  switch (__pyx_v_format) {
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT:
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32:

    /* "cuda/_lib/ccudart/utils.pyx":827
 * cdef cudaError_t bytesPerElement(size_t *bytes, int numberOfChannels, ccuda.CUarray_format format) nogil except +:
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32):
 *         bytes[0] = numberOfChannels * 4
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32:

    /* "cuda/_lib/ccudart/utils.pyx":829
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32):
 *         bytes[0] = numberOfChannels * 4             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_HALF,
 */
    (__pyx_v_bytes[0]) = (__pyx_v_numberOfChannels * 4);

    /* "cuda/_lib/ccudart/utils.pyx":830
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32):
 *         bytes[0] = numberOfChannels * 4
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif format in (ccuda.CU_AD_FORMAT_HALF,
 *                     ccuda.CU_AD_FORMAT_SIGNED_INT16,
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":826
 * 
 * cdef cudaError_t bytesPerElement(size_t *bytes, int numberOfChannels, ccuda.CUarray_format format) nogil except +:
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32):
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF:

    /* "cuda/_lib/ccudart/utils.pyx":831
 *         bytes[0] = numberOfChannels * 4
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_HALF,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16:

    /* "cuda/_lib/ccudart/utils.pyx":832
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_HALF,
 *                     ccuda.CU_AD_FORMAT_SIGNED_INT16,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *         bytes[0] = numberOfChannels * 2
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16:

    /* "cuda/_lib/ccudart/utils.pyx":834
 *                     ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *         bytes[0] = numberOfChannels * 2             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 */
    (__pyx_v_bytes[0]) = (__pyx_v_numberOfChannels * 2);

    /* "cuda/_lib/ccudart/utils.pyx":835
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *         bytes[0] = numberOfChannels * 2
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":831
 *         bytes[0] = numberOfChannels * 4
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_HALF,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8:

    /* "cuda/_lib/ccudart/utils.pyx":836
 *         bytes[0] = numberOfChannels * 2
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                     ccuda.CU_AD_FORMAT_NV12):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8:

    /* "cuda/_lib/ccudart/utils.pyx":837
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT8,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_NV12):
 *         bytes[0] = numberOfChannels
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_NV12:

    /* "cuda/_lib/ccudart/utils.pyx":839
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                     ccuda.CU_AD_FORMAT_NV12):
 *         bytes[0] = numberOfChannels             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 */
    (__pyx_v_bytes[0]) = __pyx_v_numberOfChannels;

    /* "cuda/_lib/ccudart/utils.pyx":840
 *                     ccuda.CU_AD_FORMAT_NV12):
 *         bytes[0] = numberOfChannels
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X1):
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":836
 *         bytes[0] = numberOfChannels * 2
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                     ccuda.CU_AD_FORMAT_NV12):
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X1:

    /* "cuda/_lib/ccudart/utils.pyx":841
 *         bytes[0] = numberOfChannels
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X1):
 *         bytes[0] = 1
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X1:

    /* "cuda/_lib/ccudart/utils.pyx":843
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X1):
 *         bytes[0] = 1             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 */
    (__pyx_v_bytes[0]) = 1;

    /* "cuda/_lib/ccudart/utils.pyx":844
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X1):
 *         bytes[0] = 1
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":841
 *         bytes[0] = numberOfChannels
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X1):
 *         bytes[0] = 1
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X2:

    /* "cuda/_lib/ccudart/utils.pyx":845
 *         bytes[0] = 1
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X2:

    /* "cuda/_lib/ccudart/utils.pyx":846
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X1):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X1:

    /* "cuda/_lib/ccudart/utils.pyx":847
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X1,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X1):
 *         bytes[0] = 2
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X1:

    /* "cuda/_lib/ccudart/utils.pyx":849
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X1):
 *         bytes[0] = 2             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 */
    (__pyx_v_bytes[0]) = 2;

    /* "cuda/_lib/ccudart/utils.pyx":850
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X1):
 *         bytes[0] = 2
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":845
 *         bytes[0] = 1
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X4:

    /* "cuda/_lib/ccudart/utils.pyx":851
 *         bytes[0] = 2
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X4:

    /* "cuda/_lib/ccudart/utils.pyx":852
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X2):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X2:

    /* "cuda/_lib/ccudart/utils.pyx":853
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X2,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X2):
 *         bytes[0] = 4
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X2:

    /* "cuda/_lib/ccudart/utils.pyx":855
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X2):
 *         bytes[0] = 4             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 */
    (__pyx_v_bytes[0]) = 4;

    /* "cuda/_lib/ccudart/utils.pyx":856
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X2):
 *         bytes[0] = 4
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":851
 *         bytes[0] = 2
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                     ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X4:

    /* "cuda/_lib/ccudart/utils.pyx":857
 *         bytes[0] = 4
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT16X4,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 *         bytes[0] = 8
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X4:

    /* "cuda/_lib/ccudart/utils.pyx":859
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 *         bytes[0] = 8             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_BC2_UNORM,
 */
    (__pyx_v_bytes[0]) = 8;

    /* "cuda/_lib/ccudart/utils.pyx":860
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 *         bytes[0] = 8
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif format in (ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":857
 *         bytes[0] = 4
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_SNORM_INT16X4,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 *         bytes[0] = 8
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":861
 *         bytes[0] = 8
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_BC2_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM_SRGB:

    /* "cuda/_lib/ccudart/utils.pyx":862
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":863
 *     elif format in (ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM_SRGB:

    /* "cuda/_lib/ccudart/utils.pyx":864
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":865
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_SNORM:

    /* "cuda/_lib/ccudart/utils.pyx":866
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,
 *                     ccuda.CU_AD_FORMAT_BC6H_SF16,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_UF16:

    /* "cuda/_lib/ccudart/utils.pyx":867
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC6H_SF16,
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_SF16:

    /* "cuda/_lib/ccudart/utils.pyx":868
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,
 *                     ccuda.CU_AD_FORMAT_BC6H_SF16,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":869
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,
 *                     ccuda.CU_AD_FORMAT_BC6H_SF16,
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *         bytes[0] = 16
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM_SRGB:

    /* "cuda/_lib/ccudart/utils.pyx":871
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *         bytes[0] = 16             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     return cudaErrorInvalidChannelDescriptor
 */
    (__pyx_v_bytes[0]) = 16;

    /* "cuda/_lib/ccudart/utils.pyx":872
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *         bytes[0] = 16
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     return cudaErrorInvalidChannelDescriptor
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":861
 *         bytes[0] = 8
 *         return cudaSuccess
 *     elif format in (ccuda.CU_AD_FORMAT_BC2_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 */
    break;
    default: break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":873
 *         bytes[0] = 16
 *         return cudaSuccess
 *     return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":825
 * 
 * 
 * cdef cudaError_t bytesPerElement(size_t *bytes, int numberOfChannels, ccuda.CUarray_format format) nogil except +:             # <<<<<<<<<<<<<<
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.bytesPerElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":876
 * 
 * 
 * cdef cudaError_t getChannelFormatDescFromDriverDesc(             # <<<<<<<<<<<<<<
 *     cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth,
 *     const ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) nogil except +:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelFormatDescFromDriverDesc(struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc *__pyx_v_pRuntimeDesc, size_t *__pyx_v_pDepth, size_t *__pyx_v_pHeight, size_t *__pyx_v_pWidth, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 const *__pyx_v_pDriverDesc) {
  int __pyx_v_channel_size;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  unsigned int __pyx_t_2;
  int __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getChannelFormatDescFromDriverDesc", __pyx_f[1], 876, 1, __PYX_ERR(1, 876, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":880
 *     const ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) nogil except +:
 * 
 *     cdef int channel_size = 0             # <<<<<<<<<<<<<<
 *     if pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 */
  __pyx_v_channel_size = 0;

  /* "cuda/_lib/ccudart/utils.pyx":881
 * 
 *     cdef int channel_size = 0
 *     if pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":882
 *     cdef int channel_size = 0
 *     if pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned;

    /* "cuda/_lib/ccudart/utils.pyx":883
 *     if pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":881
 * 
 *     cdef int channel_size = 0
 *     if pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":884
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":885
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned;

    /* "cuda/_lib/ccudart/utils.pyx":886
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":884
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":887
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 32
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":888
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned             # <<<<<<<<<<<<<<
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT8:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsigned;

    /* "cuda/_lib/ccudart/utils.pyx":889
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 32             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT8:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 */
    __pyx_v_channel_size = 32;

    /* "cuda/_lib/ccudart/utils.pyx":887
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 32
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":890
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT8:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":891
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT8:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT16:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned;

    /* "cuda/_lib/ccudart/utils.pyx":892
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT8:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":890
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT8:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":893
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT16:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":894
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT32:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned;

    /* "cuda/_lib/ccudart/utils.pyx":895
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT32:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":893
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT16:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":896
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT32:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 32
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":897
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT32:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned             # <<<<<<<<<<<<<<
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_HALF:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSigned;

    /* "cuda/_lib/ccudart/utils.pyx":898
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT32:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 32             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_HALF:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 */
    __pyx_v_channel_size = 32;

    /* "cuda/_lib/ccudart/utils.pyx":896
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SIGNED_INT32:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 32
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":899
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_HALF:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":900
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_HALF:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_FLOAT:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat;

    /* "cuda/_lib/ccudart/utils.pyx":901
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_HALF:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_FLOAT:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":899
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_HALF:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":902
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_FLOAT:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 32
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":903
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_FLOAT:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat             # <<<<<<<<<<<<<<
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_NV12:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindFloat;

    /* "cuda/_lib/ccudart/utils.pyx":904
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_FLOAT:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 32             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_NV12:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12
 */
    __pyx_v_channel_size = 32;

    /* "cuda/_lib/ccudart/utils.pyx":902
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_FLOAT:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 32
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":905
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_NV12:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_NV12) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":906
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_NV12:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X1:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindNV12;

    /* "cuda/_lib/ccudart/utils.pyx":907
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_NV12:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":905
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat
 *         channel_size = 32
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_NV12:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":908
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X1) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":909
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X2:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X1;

    /* "cuda/_lib/ccudart/utils.pyx":910
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":908
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":911
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X2) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":912
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X4:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X2;

    /* "cuda/_lib/ccudart/utils.pyx":913
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":911
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":914
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X4) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":915
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X1:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized8X4;

    /* "cuda/_lib/ccudart/utils.pyx":916
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":914
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT8X4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":917
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X1) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":918
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X2:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X1;

    /* "cuda/_lib/ccudart/utils.pyx":919
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":917
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":920
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X2) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":921
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X4:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X2;

    /* "cuda/_lib/ccudart/utils.pyx":922
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":920
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":923
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X4) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":924
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X1:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized8X4;

    /* "cuda/_lib/ccudart/utils.pyx":925
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":923
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT8X4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":926
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X1) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":927
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X2:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X1;

    /* "cuda/_lib/ccudart/utils.pyx":928
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":926
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":929
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X2) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":930
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X4:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X2;

    /* "cuda/_lib/ccudart/utils.pyx":931
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":929
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":932
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X4) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":933
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X1:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedNormalized16X4;

    /* "cuda/_lib/ccudart/utils.pyx":934
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":932
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_UNORM_INT16X4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":935
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X1) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":936
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X2:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X1;

    /* "cuda/_lib/ccudart/utils.pyx":937
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X1:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":935
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":938
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X2) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":939
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X4:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X2;

    /* "cuda/_lib/ccudart/utils.pyx":940
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X2:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":938
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":941
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X4) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":942
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedNormalized16X4;

    /* "cuda/_lib/ccudart/utils.pyx":943
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X4:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":941
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_SNORM_INT16X4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":944
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":945
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed1;

    /* "cuda/_lib/ccudart/utils.pyx":946
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":944
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":947
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM_SRGB) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":948
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed1SRGB;

    /* "cuda/_lib/ccudart/utils.pyx":949
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":947
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":950
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":951
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed2;

    /* "cuda/_lib/ccudart/utils.pyx":952
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":950
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":953
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM_SRGB) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":954
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed2SRGB;

    /* "cuda/_lib/ccudart/utils.pyx":955
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":953
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":956
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":957
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed3;

    /* "cuda/_lib/ccudart/utils.pyx":958
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":956
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":959
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM_SRGB) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":960
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_UNORM:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed3SRGB;

    /* "cuda/_lib/ccudart/utils.pyx":961
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":959
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":962
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_UNORM) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":963
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_SNORM:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed4;

    /* "cuda/_lib/ccudart/utils.pyx":964
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_SNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":962
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":965
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_SNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_SNORM) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":966
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_SNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_UNORM:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed4;

    /* "cuda/_lib/ccudart/utils.pyx":967
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_SNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":965
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC4_SNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":968
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_UNORM) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":969
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_SNORM:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed5;

    /* "cuda/_lib/ccudart/utils.pyx":970
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_SNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":968
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":971
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_SNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_SNORM) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":972
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_SNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_UF16:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed5;

    /* "cuda/_lib/ccudart/utils.pyx":973
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_SNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_UF16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":971
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC5_SNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":974
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_UF16:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_UF16) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":975
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_UF16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_SF16:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed6H;

    /* "cuda/_lib/ccudart/utils.pyx":976
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_UF16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_SF16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":974
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_UF16:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":977
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_SF16:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H
 *         channel_size = 16
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_SF16) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":978
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_SF16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H             # <<<<<<<<<<<<<<
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindSignedBlockCompressed6H;

    /* "cuda/_lib/ccudart/utils.pyx":979
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_SF16:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H
 *         channel_size = 16             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7
 */
    __pyx_v_channel_size = 16;

    /* "cuda/_lib/ccudart/utils.pyx":977
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC6H_SF16:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H
 *         channel_size = 16
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":980
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":981
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed7;

    /* "cuda/_lib/ccudart/utils.pyx":982
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":980
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H
 *         channel_size = 16
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":983
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB
 *         channel_size = 8
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).Format == __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM_SRGB) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":984
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB             # <<<<<<<<<<<<<<
 *         channel_size = 8
 *     else:
 */
    (__pyx_v_pRuntimeDesc[0]).f = __pyx_e_4cuda_7ccudart_cudaChannelFormatKindUnsignedBlockCompressed7SRGB;

    /* "cuda/_lib/ccudart/utils.pyx":985
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB:
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB
 *         channel_size = 8             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidChannelDescriptor
 */
    __pyx_v_channel_size = 8;

    /* "cuda/_lib/ccudart/utils.pyx":983
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7
 *         channel_size = 8
 *     elif pDriverDesc[0].Format == ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB
 *         channel_size = 8
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":987
 *         channel_size = 8
 *     else:
 *         return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 * 
 *     # populate bits per channel
 */
  /*else*/ {
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "cuda/_lib/ccudart/utils.pyx":990
 * 
 *     # populate bits per channel
 *     pRuntimeDesc[0].x = 0             # <<<<<<<<<<<<<<
 *     pRuntimeDesc[0].y = 0
 *     pRuntimeDesc[0].z = 0
 */
  (__pyx_v_pRuntimeDesc[0]).x = 0;

  /* "cuda/_lib/ccudart/utils.pyx":991
 *     # populate bits per channel
 *     pRuntimeDesc[0].x = 0
 *     pRuntimeDesc[0].y = 0             # <<<<<<<<<<<<<<
 *     pRuntimeDesc[0].z = 0
 *     pRuntimeDesc[0].w = 0
 */
  (__pyx_v_pRuntimeDesc[0]).y = 0;

  /* "cuda/_lib/ccudart/utils.pyx":992
 *     pRuntimeDesc[0].x = 0
 *     pRuntimeDesc[0].y = 0
 *     pRuntimeDesc[0].z = 0             # <<<<<<<<<<<<<<
 *     pRuntimeDesc[0].w = 0
 * 
 */
  (__pyx_v_pRuntimeDesc[0]).z = 0;

  /* "cuda/_lib/ccudart/utils.pyx":993
 *     pRuntimeDesc[0].y = 0
 *     pRuntimeDesc[0].z = 0
 *     pRuntimeDesc[0].w = 0             # <<<<<<<<<<<<<<
 * 
 *     if pDriverDesc[0].NumChannels >= 4:
 */
  (__pyx_v_pRuntimeDesc[0]).w = 0;

  /* "cuda/_lib/ccudart/utils.pyx":995
 *     pRuntimeDesc[0].w = 0
 * 
 *     if pDriverDesc[0].NumChannels >= 4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].w = channel_size
 *     if pDriverDesc[0].NumChannels >= 3:
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).NumChannels >= 4) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":996
 * 
 *     if pDriverDesc[0].NumChannels >= 4:
 *         pRuntimeDesc[0].w = channel_size             # <<<<<<<<<<<<<<
 *     if pDriverDesc[0].NumChannels >= 3:
 *         pRuntimeDesc[0].z = channel_size
 */
    (__pyx_v_pRuntimeDesc[0]).w = __pyx_v_channel_size;

    /* "cuda/_lib/ccudart/utils.pyx":995
 *     pRuntimeDesc[0].w = 0
 * 
 *     if pDriverDesc[0].NumChannels >= 4:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].w = channel_size
 *     if pDriverDesc[0].NumChannels >= 3:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":997
 *     if pDriverDesc[0].NumChannels >= 4:
 *         pRuntimeDesc[0].w = channel_size
 *     if pDriverDesc[0].NumChannels >= 3:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].z = channel_size
 *     if pDriverDesc[0].NumChannels >= 2:
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).NumChannels >= 3) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":998
 *         pRuntimeDesc[0].w = channel_size
 *     if pDriverDesc[0].NumChannels >= 3:
 *         pRuntimeDesc[0].z = channel_size             # <<<<<<<<<<<<<<
 *     if pDriverDesc[0].NumChannels >= 2:
 *         pRuntimeDesc[0].y = channel_size
 */
    (__pyx_v_pRuntimeDesc[0]).z = __pyx_v_channel_size;

    /* "cuda/_lib/ccudart/utils.pyx":997
 *     if pDriverDesc[0].NumChannels >= 4:
 *         pRuntimeDesc[0].w = channel_size
 *     if pDriverDesc[0].NumChannels >= 3:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].z = channel_size
 *     if pDriverDesc[0].NumChannels >= 2:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":999
 *     if pDriverDesc[0].NumChannels >= 3:
 *         pRuntimeDesc[0].z = channel_size
 *     if pDriverDesc[0].NumChannels >= 2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].y = channel_size
 *     if pDriverDesc[0].NumChannels >= 1:
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).NumChannels >= 2) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1000
 *         pRuntimeDesc[0].z = channel_size
 *     if pDriverDesc[0].NumChannels >= 2:
 *         pRuntimeDesc[0].y = channel_size             # <<<<<<<<<<<<<<
 *     if pDriverDesc[0].NumChannels >= 1:
 *         pRuntimeDesc[0].x = channel_size
 */
    (__pyx_v_pRuntimeDesc[0]).y = __pyx_v_channel_size;

    /* "cuda/_lib/ccudart/utils.pyx":999
 *     if pDriverDesc[0].NumChannels >= 3:
 *         pRuntimeDesc[0].z = channel_size
 *     if pDriverDesc[0].NumChannels >= 2:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].y = channel_size
 *     if pDriverDesc[0].NumChannels >= 1:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1001
 *     if pDriverDesc[0].NumChannels >= 2:
 *         pRuntimeDesc[0].y = channel_size
 *     if pDriverDesc[0].NumChannels >= 1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].x = channel_size
 * 
 */
  __pyx_t_1 = (((__pyx_v_pDriverDesc[0]).NumChannels >= 1) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1002
 *         pRuntimeDesc[0].y = channel_size
 *     if pDriverDesc[0].NumChannels >= 1:
 *         pRuntimeDesc[0].x = channel_size             # <<<<<<<<<<<<<<
 * 
 *     if pDriverDesc[0].NumChannels not in (4, 3, 2, 1):
 */
    (__pyx_v_pRuntimeDesc[0]).x = __pyx_v_channel_size;

    /* "cuda/_lib/ccudart/utils.pyx":1001
 *     if pDriverDesc[0].NumChannels >= 2:
 *         pRuntimeDesc[0].y = channel_size
 *     if pDriverDesc[0].NumChannels >= 1:             # <<<<<<<<<<<<<<
 *         pRuntimeDesc[0].x = channel_size
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1004
 *         pRuntimeDesc[0].x = channel_size
 * 
 *     if pDriverDesc[0].NumChannels not in (4, 3, 2, 1):             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidChannelDescriptor
 * 
 */
  __pyx_t_2 = (__pyx_v_pDriverDesc[0]).NumChannels;
  __pyx_t_3 = ((__pyx_t_2 != 4) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_3 = ((__pyx_t_2 != 3) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_3 = ((__pyx_t_2 != 2) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_3 = ((__pyx_t_2 != 1) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L9_bool_binop_done:;
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":1005
 * 
 *     if pDriverDesc[0].NumChannels not in (4, 3, 2, 1):
 *         return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 * 
 *     # populate dimensions
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1004
 *         pRuntimeDesc[0].x = channel_size
 * 
 *     if pDriverDesc[0].NumChannels not in (4, 3, 2, 1):             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidChannelDescriptor
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1008
 * 
 *     # populate dimensions
 *     if pDepth != NULL:             # <<<<<<<<<<<<<<
 *         pDepth[0]  = pDriverDesc[0].Depth
 *     if pHeight != NULL:
 */
  __pyx_t_3 = ((__pyx_v_pDepth != NULL) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":1009
 *     # populate dimensions
 *     if pDepth != NULL:
 *         pDepth[0]  = pDriverDesc[0].Depth             # <<<<<<<<<<<<<<
 *     if pHeight != NULL:
 *         pHeight[0] = pDriverDesc[0].Height
 */
    __pyx_t_4 = (__pyx_v_pDriverDesc[0]).Depth;
    (__pyx_v_pDepth[0]) = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1008
 * 
 *     # populate dimensions
 *     if pDepth != NULL:             # <<<<<<<<<<<<<<
 *         pDepth[0]  = pDriverDesc[0].Depth
 *     if pHeight != NULL:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1010
 *     if pDepth != NULL:
 *         pDepth[0]  = pDriverDesc[0].Depth
 *     if pHeight != NULL:             # <<<<<<<<<<<<<<
 *         pHeight[0] = pDriverDesc[0].Height
 *     if pWidth != NULL:
 */
  __pyx_t_3 = ((__pyx_v_pHeight != NULL) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":1011
 *         pDepth[0]  = pDriverDesc[0].Depth
 *     if pHeight != NULL:
 *         pHeight[0] = pDriverDesc[0].Height             # <<<<<<<<<<<<<<
 *     if pWidth != NULL:
 *         pWidth[0]  = pDriverDesc[0].Width
 */
    __pyx_t_4 = (__pyx_v_pDriverDesc[0]).Height;
    (__pyx_v_pHeight[0]) = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1010
 *     if pDepth != NULL:
 *         pDepth[0]  = pDriverDesc[0].Depth
 *     if pHeight != NULL:             # <<<<<<<<<<<<<<
 *         pHeight[0] = pDriverDesc[0].Height
 *     if pWidth != NULL:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1012
 *     if pHeight != NULL:
 *         pHeight[0] = pDriverDesc[0].Height
 *     if pWidth != NULL:             # <<<<<<<<<<<<<<
 *         pWidth[0]  = pDriverDesc[0].Width
 *     return cudaSuccess
 */
  __pyx_t_3 = ((__pyx_v_pWidth != NULL) != 0);
  if (__pyx_t_3) {

    /* "cuda/_lib/ccudart/utils.pyx":1013
 *         pHeight[0] = pDriverDesc[0].Height
 *     if pWidth != NULL:
 *         pWidth[0]  = pDriverDesc[0].Width             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
    __pyx_t_4 = (__pyx_v_pDriverDesc[0]).Width;
    (__pyx_v_pWidth[0]) = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1012
 *     if pHeight != NULL:
 *         pHeight[0] = pDriverDesc[0].Height
 *     if pWidth != NULL:             # <<<<<<<<<<<<<<
 *         pWidth[0]  = pDriverDesc[0].Width
 *     return cudaSuccess
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1014
 *     if pWidth != NULL:
 *         pWidth[0]  = pDriverDesc[0].Width
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t getArrayBlockExtent(cudaExtent *blockExtent, ccuda.CUarray_format format) nogil:
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":876
 * 
 * 
 * cdef cudaError_t getChannelFormatDescFromDriverDesc(             # <<<<<<<<<<<<<<
 *     cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth,
 *     const ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) nogil except +:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.getChannelFormatDescFromDriverDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1016
 *     return cudaSuccess
 * 
 * cdef cudaError_t getArrayBlockExtent(cudaExtent *blockExtent, ccuda.CUarray_format format) nogil:             # <<<<<<<<<<<<<<
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getArrayBlockExtent(struct __pyx_t_4cuda_7ccudart_cudaExtent *__pyx_v_blockExtent, __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_format) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getArrayBlockExtent", __pyx_f[1], 1016, 1, __PYX_ERR(1, 1016, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1017
 * 
 * cdef cudaError_t getArrayBlockExtent(cudaExtent *blockExtent, ccuda.CUarray_format format) nogil:
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32,
 */
  switch (__pyx_v_format) {
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT:
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32:

    /* "cuda/_lib/ccudart/utils.pyx":1018
 * cdef cudaError_t getArrayBlockExtent(cudaExtent *blockExtent, ccuda.CUarray_format format) nogil:
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_HALF,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32:

    /* "cuda/_lib/ccudart/utils.pyx":1019
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_HALF,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT16,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF:

    /* "cuda/_lib/ccudart/utils.pyx":1020
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_HALF,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT16,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16:

    /* "cuda/_lib/ccudart/utils.pyx":1021
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_HALF,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT16,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT16,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT8,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16:

    /* "cuda/_lib/ccudart/utils.pyx":1022
 *                   ccuda.CU_AD_FORMAT_HALF,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT16,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8:

    /* "cuda/_lib/ccudart/utils.pyx":1023
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT16,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT8,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                   ccuda.CU_AD_FORMAT_NV12,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8:

    /* "cuda/_lib/ccudart/utils.pyx":1024
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT16,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT8,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_NV12,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_NV12:

    /* "cuda/_lib/ccudart/utils.pyx":1025
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                   ccuda.CU_AD_FORMAT_NV12,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X1:

    /* "cuda/_lib/ccudart/utils.pyx":1026
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                   ccuda.CU_AD_FORMAT_NV12,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X1:

    /* "cuda/_lib/ccudart/utils.pyx":1027
 *                   ccuda.CU_AD_FORMAT_NV12,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X2:

    /* "cuda/_lib/ccudart/utils.pyx":1028
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X2:

    /* "cuda/_lib/ccudart/utils.pyx":1029
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X1:

    /* "cuda/_lib/ccudart/utils.pyx":1030
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X1,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X1:

    /* "cuda/_lib/ccudart/utils.pyx":1031
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X1,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X4:

    /* "cuda/_lib/ccudart/utils.pyx":1032
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X4:

    /* "cuda/_lib/ccudart/utils.pyx":1033
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X2:

    /* "cuda/_lib/ccudart/utils.pyx":1034
 *                   ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X2,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X2:

    /* "cuda/_lib/ccudart/utils.pyx":1035
 *                   ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X2,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X4:

    /* "cuda/_lib/ccudart/utils.pyx":1036
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X4,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 *         blockExtent[0].width = 1
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X4:

    /* "cuda/_lib/ccudart/utils.pyx":1038
 *                   ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 *         blockExtent[0].width = 1             # <<<<<<<<<<<<<<
 *         blockExtent[0].height = 1
 *         blockExtent[0].depth = 1
 */
    (__pyx_v_blockExtent[0]).width = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1039
 *                   ccuda.CU_AD_FORMAT_UNORM_INT16X4):
 *         blockExtent[0].width = 1
 *         blockExtent[0].height = 1             # <<<<<<<<<<<<<<
 *         blockExtent[0].depth = 1
 *     elif format in (ccuda.CU_AD_FORMAT_BC1_UNORM,
 */
    (__pyx_v_blockExtent[0]).height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1040
 *         blockExtent[0].width = 1
 *         blockExtent[0].height = 1
 *         blockExtent[0].depth = 1             # <<<<<<<<<<<<<<
 *     elif format in (ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 */
    (__pyx_v_blockExtent[0]).depth = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1017
 * 
 * cdef cudaError_t getArrayBlockExtent(cudaExtent *blockExtent, ccuda.CUarray_format format) nogil:
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,             # <<<<<<<<<<<<<<
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 *                   ccuda.CU_AD_FORMAT_SIGNED_INT32,
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":1041
 *         blockExtent[0].height = 1
 *         blockExtent[0].depth = 1
 *     elif format in (ccuda.CU_AD_FORMAT_BC1_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC4_UNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM_SRGB:

    /* "cuda/_lib/ccudart/utils.pyx":1042
 *         blockExtent[0].depth = 1
 *     elif format in (ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC4_SNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":1043
 *     elif format in (ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC4_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_SNORM:

    /* "cuda/_lib/ccudart/utils.pyx":1044
 *                     ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC4_SNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":1045
 *                     ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM_SRGB:

    /* "cuda/_lib/ccudart/utils.pyx":1046
 *                     ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":1047
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM_SRGB:

    /* "cuda/_lib/ccudart/utils.pyx":1048
 *                     ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":1049
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_SNORM:

    /* "cuda/_lib/ccudart/utils.pyx":1050
 *                     ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,
 *                     ccuda.CU_AD_FORMAT_BC6H_SF16,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_UF16:

    /* "cuda/_lib/ccudart/utils.pyx":1051
 *                     ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC6H_SF16,
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM,
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC6H_SF16:

    /* "cuda/_lib/ccudart/utils.pyx":1052
 *                     ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,
 *                     ccuda.CU_AD_FORMAT_BC6H_SF16,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM:

    /* "cuda/_lib/ccudart/utils.pyx":1053
 *                     ccuda.CU_AD_FORMAT_BC6H_UF16,
 *                     ccuda.CU_AD_FORMAT_BC6H_SF16,
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *         blockExtent[0].width = 4
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM_SRGB:

    /* "cuda/_lib/ccudart/utils.pyx":1055
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *         blockExtent[0].width = 4             # <<<<<<<<<<<<<<
 *         blockExtent[0].height = 4
 *         blockExtent[0].depth = 1
 */
    (__pyx_v_blockExtent[0]).width = 4;

    /* "cuda/_lib/ccudart/utils.pyx":1056
 *                     ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *         blockExtent[0].width = 4
 *         blockExtent[0].height = 4             # <<<<<<<<<<<<<<
 *         blockExtent[0].depth = 1
 *     else:
 */
    (__pyx_v_blockExtent[0]).height = 4;

    /* "cuda/_lib/ccudart/utils.pyx":1057
 *         blockExtent[0].width = 4
 *         blockExtent[0].height = 4
 *         blockExtent[0].depth = 1             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidChannelDescriptor
 */
    (__pyx_v_blockExtent[0]).depth = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1041
 *         blockExtent[0].height = 1
 *         blockExtent[0].depth = 1
 *     elif format in (ccuda.CU_AD_FORMAT_BC1_UNORM,             # <<<<<<<<<<<<<<
 *                     ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                     ccuda.CU_AD_FORMAT_BC4_UNORM,
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":1059
 *         blockExtent[0].depth = 1
 *     else:
 *         return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1060
 *     else:
 *         return cudaErrorInvalidChannelDescriptor
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t getLocalState(cudaArrayLocalState *state, cudaArray_const_t thisArray) nogil except +:
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1016
 *     return cudaSuccess
 * 
 * cdef cudaError_t getArrayBlockExtent(cudaExtent *blockExtent, ccuda.CUarray_format format) nogil:             # <<<<<<<<<<<<<<
 *     if format in (ccuda.CU_AD_FORMAT_FLOAT,
 *                   ccuda.CU_AD_FORMAT_UNSIGNED_INT32,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.getArrayBlockExtent", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1062
 *     return cudaSuccess
 * 
 * cdef cudaError_t getLocalState(cudaArrayLocalState *state, cudaArray_const_t thisArray) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaExtent compBlockExtent
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState(struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState *__pyx_v_state, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  struct __pyx_t_4cuda_7ccudart_cudaExtent __pyx_v_compBlockExtent;
  __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_v_driverDesc;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getLocalState", __pyx_f[1], 1062, 1, __PYX_ERR(1, 1062, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1066
 *     cdef cudaExtent compBlockExtent
 * 
 *     arrayState.array = <ccuda.CUarray>thisArray             # <<<<<<<<<<<<<<
 *     compBlockExtent.width = 1
 *     compBlockExtent.height = 1
 */
  __pyx_v_arrayState.array = ((__pyx_t_4cuda_5ccuda_CUarray)__pyx_v_thisArray);

  /* "cuda/_lib/ccudart/utils.pyx":1067
 * 
 *     arrayState.array = <ccuda.CUarray>thisArray
 *     compBlockExtent.width = 1             # <<<<<<<<<<<<<<
 *     compBlockExtent.height = 1
 *     compBlockExtent.depth = 1
 */
  __pyx_v_compBlockExtent.width = 1;

  /* "cuda/_lib/ccudart/utils.pyx":1068
 *     arrayState.array = <ccuda.CUarray>thisArray
 *     compBlockExtent.width = 1
 *     compBlockExtent.height = 1             # <<<<<<<<<<<<<<
 *     compBlockExtent.depth = 1
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 driverDesc
 */
  __pyx_v_compBlockExtent.height = 1;

  /* "cuda/_lib/ccudart/utils.pyx":1069
 *     compBlockExtent.width = 1
 *     compBlockExtent.height = 1
 *     compBlockExtent.depth = 1             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 driverDesc
 *     memset(&driverDesc, 0, sizeof(driverDesc))
 */
  __pyx_v_compBlockExtent.depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":1071
 *     compBlockExtent.depth = 1
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 driverDesc
 *     memset(&driverDesc, 0, sizeof(driverDesc))             # <<<<<<<<<<<<<<
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>arrayState.array)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_driverDesc), 0, (sizeof(__pyx_v_driverDesc))));

  /* "cuda/_lib/ccudart/utils.pyx":1072
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 driverDesc
 *     memset(&driverDesc, 0, sizeof(driverDesc))
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>arrayState.array)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2((&__pyx_v_driverDesc), ((__pyx_t_4cuda_5ccuda_CUarray)__pyx_v_arrayState.array)); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1072, __pyx_L1_error)
  __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_1);

  /* "cuda/_lib/ccudart/utils.pyx":1073
 *     memset(&driverDesc, 0, sizeof(driverDesc))
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>arrayState.array)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = getChannelFormatDescFromDriverDesc(&arrayState.desc, &arrayState.depth, &arrayState.height, &arrayState.width, &driverDesc)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1074
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>arrayState.array)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     err = getChannelFormatDescFromDriverDesc(&arrayState.desc, &arrayState.depth, &arrayState.height, &arrayState.width, &driverDesc)
 *     if err != cudaSuccess:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1073
 *     memset(&driverDesc, 0, sizeof(driverDesc))
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>arrayState.array)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = getChannelFormatDescFromDriverDesc(&arrayState.desc, &arrayState.depth, &arrayState.height, &arrayState.width, &driverDesc)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1075
 *     if err != cudaSuccess:
 *         return err
 *     err = getChannelFormatDescFromDriverDesc(&arrayState.desc, &arrayState.depth, &arrayState.height, &arrayState.width, &driverDesc)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelFormatDescFromDriverDesc((&__pyx_v_arrayState.desc), (&__pyx_v_arrayState.depth), (&__pyx_v_arrayState.height), (&__pyx_v_arrayState.width), (&__pyx_v_driverDesc));
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1075, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1076
 *         return err
 *     err = getChannelFormatDescFromDriverDesc(&arrayState.desc, &arrayState.depth, &arrayState.height, &arrayState.width, &driverDesc)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = bytesPerElement(&arrayState.elementSize, driverDesc.NumChannels, driverDesc.Format)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1077
 *     err = getChannelFormatDescFromDriverDesc(&arrayState.desc, &arrayState.depth, &arrayState.height, &arrayState.width, &driverDesc)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     err = bytesPerElement(&arrayState.elementSize, driverDesc.NumChannels, driverDesc.Format)
 *     if err != cudaSuccess:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1076
 *         return err
 *     err = getChannelFormatDescFromDriverDesc(&arrayState.desc, &arrayState.depth, &arrayState.height, &arrayState.width, &driverDesc)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = bytesPerElement(&arrayState.elementSize, driverDesc.NumChannels, driverDesc.Format)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1078
 *     if err != cudaSuccess:
 *         return err
 *     err = bytesPerElement(&arrayState.elementSize, driverDesc.NumChannels, driverDesc.Format)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_bytesPerElement((&__pyx_v_arrayState.elementSize), __pyx_v_driverDesc.NumChannels, __pyx_v_driverDesc.Format);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1078, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1079
 *         return err
 *     err = bytesPerElement(&arrayState.elementSize, driverDesc.NumChannels, driverDesc.Format)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = getArrayBlockExtent(&compBlockExtent, driverDesc.Format)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1080
 *     err = bytesPerElement(&arrayState.elementSize, driverDesc.NumChannels, driverDesc.Format)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     err = getArrayBlockExtent(&compBlockExtent, driverDesc.Format)
 *     if err != cudaSuccess:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1079
 *         return err
 *     err = bytesPerElement(&arrayState.elementSize, driverDesc.NumChannels, driverDesc.Format)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = getArrayBlockExtent(&compBlockExtent, driverDesc.Format)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1081
 *     if err != cudaSuccess:
 *         return err
 *     err = getArrayBlockExtent(&compBlockExtent, driverDesc.Format)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getArrayBlockExtent((&__pyx_v_compBlockExtent), __pyx_v_driverDesc.Format);

  /* "cuda/_lib/ccudart/utils.pyx":1082
 *         return err
 *     err = getArrayBlockExtent(&compBlockExtent, driverDesc.Format)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     arrayState.widthInBytes = <size_t>((arrayState.width + compBlockExtent.width - 1) / compBlockExtent.width) * arrayState.elementSize
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1083
 *     err = getArrayBlockExtent(&compBlockExtent, driverDesc.Format)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     arrayState.widthInBytes = <size_t>((arrayState.width + compBlockExtent.width - 1) / compBlockExtent.width) * arrayState.elementSize
 * 
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1082
 *         return err
 *     err = getArrayBlockExtent(&compBlockExtent, driverDesc.Format)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     arrayState.widthInBytes = <size_t>((arrayState.width + compBlockExtent.width - 1) / compBlockExtent.width) * arrayState.elementSize
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1084
 *     if err != cudaSuccess:
 *         return err
 *     arrayState.widthInBytes = <size_t>((arrayState.width + compBlockExtent.width - 1) / compBlockExtent.width) * arrayState.elementSize             # <<<<<<<<<<<<<<
 * 
 *     state[0] = arrayState
 */
  __pyx_t_4 = ((__pyx_v_arrayState.width + __pyx_v_compBlockExtent.width) - 1);
  if (unlikely(__pyx_v_compBlockExtent.width == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1084, __pyx_L1_error)
  }
  __pyx_v_arrayState.widthInBytes = (((size_t)(((double)__pyx_t_4) / ((double)__pyx_v_compBlockExtent.width))) * __pyx_v_arrayState.elementSize);

  /* "cuda/_lib/ccudart/utils.pyx":1086
 *     arrayState.widthInBytes = <size_t>((arrayState.width + compBlockExtent.width - 1) / compBlockExtent.width) * arrayState.elementSize
 * 
 *     state[0] = arrayState             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
  (__pyx_v_state[0]) = __pyx_v_arrayState;

  /* "cuda/_lib/ccudart/utils.pyx":1087
 * 
 *     state[0] = arrayState
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1062
 *     return cudaSuccess
 * 
 * cdef cudaError_t getLocalState(cudaArrayLocalState *state, cudaArray_const_t thisArray) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaExtent compBlockExtent
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.getLocalState", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1090
 * 
 * 
 * cdef cudaError_t copyFromHost2D(cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *src, size_t spitch, size_t width, size_t height, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err
 *     cdef cudaArrayLocalState arrayState
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromHost2D(__pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyFromHost2D", __pyx_f[1], 1090, 1, __PYX_ERR(1, 1090, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1093
 *     cdef cudaError_t err
 *     cdef cudaArrayLocalState arrayState
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1094
 *     cdef cudaArrayLocalState arrayState
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1094, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1095
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1096
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 * 
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1095
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1097
 *     if err != cudaSuccess:
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)             # <<<<<<<<<<<<<<
 * 
 *     cp.dstArray      = arrayState.array
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1097, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1099
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 * 
 *     cp.dstArray      = arrayState.array             # <<<<<<<<<<<<<<
 *     cp.dstXInBytes   = wOffset
 *     cp.dstY          = hOffset
 */
  __pyx_t_4 = __pyx_v_arrayState.array;
  __pyx_v_cp.dstArray = __pyx_t_4;

  /* "cuda/_lib/ccudart/utils.pyx":1100
 * 
 *     cp.dstArray      = arrayState.array
 *     cp.dstXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *     cp.dstY          = hOffset
 * 
 */
  __pyx_v_cp.dstXInBytes = __pyx_v_wOffset;

  /* "cuda/_lib/ccudart/utils.pyx":1101
 *     cp.dstArray      = arrayState.array
 *     cp.dstXInBytes   = wOffset
 *     cp.dstY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *     cp.srcHost       = src
 */
  __pyx_v_cp.dstY = __pyx_v_hOffset;

  /* "cuda/_lib/ccudart/utils.pyx":1103
 *     cp.dstY          = hOffset
 * 
 *     cp.srcHost       = src             # <<<<<<<<<<<<<<
 *     cp.srcPitch      = spitch
 *     cp.srcXInBytes   = 0
 */
  __pyx_v_cp.srcHost = __pyx_v_src;

  /* "cuda/_lib/ccudart/utils.pyx":1104
 * 
 *     cp.srcHost       = src
 *     cp.srcPitch      = spitch             # <<<<<<<<<<<<<<
 *     cp.srcXInBytes   = 0
 *     cp.srcY          = 0
 */
  __pyx_v_cp.srcPitch = __pyx_v_spitch;

  /* "cuda/_lib/ccudart/utils.pyx":1105
 *     cp.srcHost       = src
 *     cp.srcPitch      = spitch
 *     cp.srcXInBytes   = 0             # <<<<<<<<<<<<<<
 *     cp.srcY          = 0
 * 
 */
  __pyx_v_cp.srcXInBytes = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1106
 *     cp.srcPitch      = spitch
 *     cp.srcXInBytes   = 0
 *     cp.srcY          = 0             # <<<<<<<<<<<<<<
 * 
 *     cp.Height        = height
 */
  __pyx_v_cp.srcY = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1108
 *     cp.srcY          = 0
 * 
 *     cp.Height        = height             # <<<<<<<<<<<<<<
 *     cp.WidthInBytes  = width
 * 
 */
  __pyx_v_cp.Height = __pyx_v_height;

  /* "cuda/_lib/ccudart/utils.pyx":1109
 * 
 *     cp.Height        = height
 *     cp.WidthInBytes  = width             # <<<<<<<<<<<<<<
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 */
  __pyx_v_cp.WidthInBytes = __pyx_v_width;

  /* "cuda/_lib/ccudart/utils.pyx":1111
 *     cp.WidthInBytes  = width
 * 
 *     err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1111, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1112
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_err;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1090
 * 
 * 
 * cdef cudaError_t copyFromHost2D(cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *src, size_t spitch, size_t width, size_t height, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err
 *     cdef cudaArrayLocalState arrayState
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyFromHost2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1115
 * 
 * 
 * cdef cudaError_t copyFromDevice2D(ccuda.CUmemorytype type, cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *src, size_t srcOffset,             # <<<<<<<<<<<<<<
 *         size_t spitch, size_t width, size_t height, ccuda.CUstream stream, bool async) nogil except +:
 *     cdef cudaError_t err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice2D(__pyx_t_4cuda_5ccuda_CUmemorytype __pyx_v_type, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char const *__pyx_v_src, size_t __pyx_v_srcOffset, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyFromDevice2D", __pyx_f[1], 1115, 1, __PYX_ERR(1, 1115, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1119
 *     cdef cudaError_t err
 *     cdef cudaArrayLocalState arrayState
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1120
 *     cdef cudaArrayLocalState arrayState
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1120, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1121
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1122
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)
 * 
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1121
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1123
 *     if err != cudaSuccess:
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)             # <<<<<<<<<<<<<<
 * 
 *     cp.dstArray      = arrayState.array
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY, __pyx_v_type);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1123, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1125
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)
 * 
 *     cp.dstArray      = arrayState.array             # <<<<<<<<<<<<<<
 *     cp.dstXInBytes   = wOffset
 *     cp.dstY          = hOffset
 */
  __pyx_t_4 = __pyx_v_arrayState.array;
  __pyx_v_cp.dstArray = __pyx_t_4;

  /* "cuda/_lib/ccudart/utils.pyx":1126
 * 
 *     cp.dstArray      = arrayState.array
 *     cp.dstXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *     cp.dstY          = hOffset
 * 
 */
  __pyx_v_cp.dstXInBytes = __pyx_v_wOffset;

  /* "cuda/_lib/ccudart/utils.pyx":1127
 *     cp.dstArray      = arrayState.array
 *     cp.dstXInBytes   = wOffset
 *     cp.dstY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *     cp.srcDevice     = <ccuda.CUdeviceptr_v2>src
 */
  __pyx_v_cp.dstY = __pyx_v_hOffset;

  /* "cuda/_lib/ccudart/utils.pyx":1129
 *     cp.dstY          = hOffset
 * 
 *     cp.srcDevice     = <ccuda.CUdeviceptr_v2>src             # <<<<<<<<<<<<<<
 *     cp.srcPitch      = spitch
 *     cp.srcXInBytes   = srcOffset % spitch
 */
  __pyx_v_cp.srcDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src);

  /* "cuda/_lib/ccudart/utils.pyx":1130
 * 
 *     cp.srcDevice     = <ccuda.CUdeviceptr_v2>src
 *     cp.srcPitch      = spitch             # <<<<<<<<<<<<<<
 *     cp.srcXInBytes   = srcOffset % spitch
 *     cp.srcY          = <size_t>(srcOffset / spitch)
 */
  __pyx_v_cp.srcPitch = __pyx_v_spitch;

  /* "cuda/_lib/ccudart/utils.pyx":1131
 *     cp.srcDevice     = <ccuda.CUdeviceptr_v2>src
 *     cp.srcPitch      = spitch
 *     cp.srcXInBytes   = srcOffset % spitch             # <<<<<<<<<<<<<<
 *     cp.srcY          = <size_t>(srcOffset / spitch)
 * 
 */
  if (unlikely(__pyx_v_spitch == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1131, __pyx_L1_error)
  }
  __pyx_v_cp.srcXInBytes = (__pyx_v_srcOffset % __pyx_v_spitch);

  /* "cuda/_lib/ccudart/utils.pyx":1132
 *     cp.srcPitch      = spitch
 *     cp.srcXInBytes   = srcOffset % spitch
 *     cp.srcY          = <size_t>(srcOffset / spitch)             # <<<<<<<<<<<<<<
 * 
 *     cp.Height        = height
 */
  if (unlikely(__pyx_v_spitch == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1132, __pyx_L1_error)
  }
  __pyx_v_cp.srcY = ((size_t)(((double)__pyx_v_srcOffset) / ((double)__pyx_v_spitch)));

  /* "cuda/_lib/ccudart/utils.pyx":1134
 *     cp.srcY          = <size_t>(srcOffset / spitch)
 * 
 *     cp.Height        = height             # <<<<<<<<<<<<<<
 *     cp.WidthInBytes  = width
 * 
 */
  __pyx_v_cp.Height = __pyx_v_height;

  /* "cuda/_lib/ccudart/utils.pyx":1135
 * 
 *     cp.Height        = height
 *     cp.WidthInBytes  = width             # <<<<<<<<<<<<<<
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 */
  __pyx_v_cp.WidthInBytes = __pyx_v_width;

  /* "cuda/_lib/ccudart/utils.pyx":1137
 *     cp.WidthInBytes  = width
 * 
 *     err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1137, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1138
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1139
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1138
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1141
 *         return err
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1115
 * 
 * 
 * cdef cudaError_t copyFromDevice2D(ccuda.CUmemorytype type, cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *src, size_t srcOffset,             # <<<<<<<<<<<<<<
 *         size_t spitch, size_t width, size_t height, ccuda.CUstream stream, bool async) nogil except +:
 *     cdef cudaError_t err
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyFromDevice2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1144
 * 
 * 
 * cdef cudaError_t copyToHost2D(cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, char *dst, size_t dpitch, size_t width,             # <<<<<<<<<<<<<<
 *         size_t height, ccuda.CUstream stream, bool async) nogil except +:
 *     cdef cudaArrayLocalState arrayState
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToHost2D(__pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char *__pyx_v_dst, size_t __pyx_v_dpitch, size_t __pyx_v_width, size_t __pyx_v_height, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyToHost2D", __pyx_f[1], 1144, 1, __PYX_ERR(1, 1144, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1148
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1149
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1149, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1150
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1151
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1150
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1152
 *     if err != cudaSuccess:
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *     cp.dstHost       = dst
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1152, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1154
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 *     cp.dstHost       = dst             # <<<<<<<<<<<<<<
 *     cp.dstPitch      = dpitch
 *     cp.dstXInBytes   = 0
 */
  __pyx_v_cp.dstHost = __pyx_v_dst;

  /* "cuda/_lib/ccudart/utils.pyx":1155
 * 
 *     cp.dstHost       = dst
 *     cp.dstPitch      = dpitch             # <<<<<<<<<<<<<<
 *     cp.dstXInBytes   = 0
 *     cp.dstY          = 0
 */
  __pyx_v_cp.dstPitch = __pyx_v_dpitch;

  /* "cuda/_lib/ccudart/utils.pyx":1156
 *     cp.dstHost       = dst
 *     cp.dstPitch      = dpitch
 *     cp.dstXInBytes   = 0             # <<<<<<<<<<<<<<
 *     cp.dstY          = 0
 * 
 */
  __pyx_v_cp.dstXInBytes = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1157
 *     cp.dstPitch      = dpitch
 *     cp.dstXInBytes   = 0
 *     cp.dstY          = 0             # <<<<<<<<<<<<<<
 * 
 *     cp.srcArray      = arrayState.array
 */
  __pyx_v_cp.dstY = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1159
 *     cp.dstY          = 0
 * 
 *     cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *     cp.srcXInBytes   = wOffset
 *     cp.srcY          = hOffset
 */
  __pyx_t_4 = __pyx_v_arrayState.array;
  __pyx_v_cp.srcArray = __pyx_t_4;

  /* "cuda/_lib/ccudart/utils.pyx":1160
 * 
 *     cp.srcArray      = arrayState.array
 *     cp.srcXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *     cp.srcY          = hOffset
 * 
 */
  __pyx_v_cp.srcXInBytes = __pyx_v_wOffset;

  /* "cuda/_lib/ccudart/utils.pyx":1161
 *     cp.srcArray      = arrayState.array
 *     cp.srcXInBytes   = wOffset
 *     cp.srcY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *     cp.Height        = height
 */
  __pyx_v_cp.srcY = __pyx_v_hOffset;

  /* "cuda/_lib/ccudart/utils.pyx":1163
 *     cp.srcY          = hOffset
 * 
 *     cp.Height        = height             # <<<<<<<<<<<<<<
 *     cp.WidthInBytes  = width
 * 
 */
  __pyx_v_cp.Height = __pyx_v_height;

  /* "cuda/_lib/ccudart/utils.pyx":1164
 * 
 *     cp.Height        = height
 *     cp.WidthInBytes  = width             # <<<<<<<<<<<<<<
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 */
  __pyx_v_cp.WidthInBytes = __pyx_v_width;

  /* "cuda/_lib/ccudart/utils.pyx":1166
 *     cp.WidthInBytes  = width
 * 
 *     err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1166, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1167
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1168
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1167
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1170
 *         return err
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1144
 * 
 * 
 * cdef cudaError_t copyToHost2D(cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, char *dst, size_t dpitch, size_t width,             # <<<<<<<<<<<<<<
 *         size_t height, ccuda.CUstream stream, bool async) nogil except +:
 *     cdef cudaArrayLocalState arrayState
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyToHost2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1173
 * 
 * 
 * cdef cudaError_t copyToDevice2D(ccuda.CUmemorytype type, cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *dst, size_t dstOffset, size_t dpitch,             # <<<<<<<<<<<<<<
 *         size_t width, size_t height, ccuda.CUstream stream, bool async) nogil except +:
 * 
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice2D(__pyx_t_4cuda_5ccuda_CUmemorytype __pyx_v_type, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char const *__pyx_v_dst, size_t __pyx_v_dstOffset, size_t __pyx_v_dpitch, size_t __pyx_v_width, size_t __pyx_v_height, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyToDevice2D", __pyx_f[1], 1173, 1, __PYX_ERR(1, 1173, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1178
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1179
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1179, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1180
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1181
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1180
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1182
 *     if err != cudaSuccess:
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *     cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_v_type, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1182, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1184
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 *     cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst             # <<<<<<<<<<<<<<
 *     cp.dstPitch      = dpitch
 *     cp.dstXInBytes   = dstOffset % dpitch
 */
  __pyx_v_cp.dstDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst);

  /* "cuda/_lib/ccudart/utils.pyx":1185
 * 
 *     cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst
 *     cp.dstPitch      = dpitch             # <<<<<<<<<<<<<<
 *     cp.dstXInBytes   = dstOffset % dpitch
 *     cp.dstY          = <size_t>(dstOffset / dpitch)
 */
  __pyx_v_cp.dstPitch = __pyx_v_dpitch;

  /* "cuda/_lib/ccudart/utils.pyx":1186
 *     cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst
 *     cp.dstPitch      = dpitch
 *     cp.dstXInBytes   = dstOffset % dpitch             # <<<<<<<<<<<<<<
 *     cp.dstY          = <size_t>(dstOffset / dpitch)
 * 
 */
  if (unlikely(__pyx_v_dpitch == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1186, __pyx_L1_error)
  }
  __pyx_v_cp.dstXInBytes = (__pyx_v_dstOffset % __pyx_v_dpitch);

  /* "cuda/_lib/ccudart/utils.pyx":1187
 *     cp.dstPitch      = dpitch
 *     cp.dstXInBytes   = dstOffset % dpitch
 *     cp.dstY          = <size_t>(dstOffset / dpitch)             # <<<<<<<<<<<<<<
 * 
 *     cp.srcArray      = arrayState.array
 */
  if (unlikely(__pyx_v_dpitch == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1187, __pyx_L1_error)
  }
  __pyx_v_cp.dstY = ((size_t)(((double)__pyx_v_dstOffset) / ((double)__pyx_v_dpitch)));

  /* "cuda/_lib/ccudart/utils.pyx":1189
 *     cp.dstY          = <size_t>(dstOffset / dpitch)
 * 
 *     cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *     cp.srcXInBytes   = wOffset
 *     cp.srcY          = hOffset
 */
  __pyx_t_4 = __pyx_v_arrayState.array;
  __pyx_v_cp.srcArray = __pyx_t_4;

  /* "cuda/_lib/ccudart/utils.pyx":1190
 * 
 *     cp.srcArray      = arrayState.array
 *     cp.srcXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *     cp.srcY          = hOffset
 * 
 */
  __pyx_v_cp.srcXInBytes = __pyx_v_wOffset;

  /* "cuda/_lib/ccudart/utils.pyx":1191
 *     cp.srcArray      = arrayState.array
 *     cp.srcXInBytes   = wOffset
 *     cp.srcY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *     cp.Height        = height
 */
  __pyx_v_cp.srcY = __pyx_v_hOffset;

  /* "cuda/_lib/ccudart/utils.pyx":1193
 *     cp.srcY          = hOffset
 * 
 *     cp.Height        = height             # <<<<<<<<<<<<<<
 *     cp.WidthInBytes  = width
 * 
 */
  __pyx_v_cp.Height = __pyx_v_height;

  /* "cuda/_lib/ccudart/utils.pyx":1194
 * 
 *     cp.Height        = height
 *     cp.WidthInBytes  = width             # <<<<<<<<<<<<<<
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 */
  __pyx_v_cp.WidthInBytes = __pyx_v_width;

  /* "cuda/_lib/ccudart/utils.pyx":1196
 *     cp.WidthInBytes  = width
 * 
 *     err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1196, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1197
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1198
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1197
 * 
 *     err = driverMemcpy3D(&cp, stream, async)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1200
 *         return err
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1173
 * 
 * 
 * cdef cudaError_t copyToDevice2D(ccuda.CUmemorytype type, cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *dst, size_t dstOffset, size_t dpitch,             # <<<<<<<<<<<<<<
 *         size_t width, size_t height, ccuda.CUstream stream, bool async) nogil except +:
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyToDevice2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1203
 * 
 * 
 * cdef cudaError_t copyToArray2D(cudaArray_const_t thisArray, size_t hOffsetSrc, size_t wOffsetSrc, cudaArray_t dst,             # <<<<<<<<<<<<<<
 *         size_t hOffsetDst, size_t wOffsetDst, size_t width, size_t height) nogil except +:
 *     cdef cudaArrayLocalState arrayState
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToArray2D(__pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_wOffsetSrc, __pyx_t_4cuda_7ccudart_cudaArray_t __pyx_v_dst, size_t __pyx_v_hOffsetDst, size_t __pyx_v_wOffsetDst, size_t __pyx_v_width, size_t __pyx_v_height) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyToArray2D", __pyx_f[1], 1203, 1, __PYX_ERR(1, 1203, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1207
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1208
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1208, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1209
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1210
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1209
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1211
 *     if err != cudaSuccess:
 *         return err
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *     cp.dstArray      = <ccuda.CUarray>dst
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1211, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1213
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 *     cp.dstArray      = <ccuda.CUarray>dst             # <<<<<<<<<<<<<<
 *     cp.dstXInBytes   = wOffsetDst
 *     cp.dstY          = hOffsetDst
 */
  __pyx_v_cp.dstArray = ((__pyx_t_4cuda_5ccuda_CUarray)__pyx_v_dst);

  /* "cuda/_lib/ccudart/utils.pyx":1214
 * 
 *     cp.dstArray      = <ccuda.CUarray>dst
 *     cp.dstXInBytes   = wOffsetDst             # <<<<<<<<<<<<<<
 *     cp.dstY          = hOffsetDst
 * 
 */
  __pyx_v_cp.dstXInBytes = __pyx_v_wOffsetDst;

  /* "cuda/_lib/ccudart/utils.pyx":1215
 *     cp.dstArray      = <ccuda.CUarray>dst
 *     cp.dstXInBytes   = wOffsetDst
 *     cp.dstY          = hOffsetDst             # <<<<<<<<<<<<<<
 * 
 *     cp.srcArray      = arrayState.array
 */
  __pyx_v_cp.dstY = __pyx_v_hOffsetDst;

  /* "cuda/_lib/ccudart/utils.pyx":1217
 *     cp.dstY          = hOffsetDst
 * 
 *     cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *     cp.srcXInBytes   = wOffsetSrc
 *     cp.srcY          = hOffsetSrc
 */
  __pyx_t_4 = __pyx_v_arrayState.array;
  __pyx_v_cp.srcArray = __pyx_t_4;

  /* "cuda/_lib/ccudart/utils.pyx":1218
 * 
 *     cp.srcArray      = arrayState.array
 *     cp.srcXInBytes   = wOffsetSrc             # <<<<<<<<<<<<<<
 *     cp.srcY          = hOffsetSrc
 * 
 */
  __pyx_v_cp.srcXInBytes = __pyx_v_wOffsetSrc;

  /* "cuda/_lib/ccudart/utils.pyx":1219
 *     cp.srcArray      = arrayState.array
 *     cp.srcXInBytes   = wOffsetSrc
 *     cp.srcY          = hOffsetSrc             # <<<<<<<<<<<<<<
 * 
 *     cp.Height        = height
 */
  __pyx_v_cp.srcY = __pyx_v_hOffsetSrc;

  /* "cuda/_lib/ccudart/utils.pyx":1221
 *     cp.srcY          = hOffsetSrc
 * 
 *     cp.Height        = height             # <<<<<<<<<<<<<<
 *     cp.WidthInBytes  = width
 * 
 */
  __pyx_v_cp.Height = __pyx_v_height;

  /* "cuda/_lib/ccudart/utils.pyx":1222
 * 
 *     cp.Height        = height
 *     cp.WidthInBytes  = width             # <<<<<<<<<<<<<<
 * 
 *     err = driverMemcpy3D(&cp, NULL, False)
 */
  __pyx_v_cp.WidthInBytes = __pyx_v_width;

  /* "cuda/_lib/ccudart/utils.pyx":1224
 *     cp.WidthInBytes  = width
 * 
 *     err = driverMemcpy3D(&cp, NULL, False)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), NULL, 0);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1224, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1225
 * 
 *     err = driverMemcpy3D(&cp, NULL, False)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1226
 *     err = driverMemcpy3D(&cp, NULL, False)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1225
 * 
 *     err = driverMemcpy3D(&cp, NULL, False)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1228
 *         return err
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1203
 * 
 * 
 * cdef cudaError_t copyToArray2D(cudaArray_const_t thisArray, size_t hOffsetSrc, size_t wOffsetSrc, cudaArray_t dst,             # <<<<<<<<<<<<<<
 *         size_t hOffsetDst, size_t wOffsetDst, size_t width, size_t height) nogil except +:
 *     cdef cudaArrayLocalState arrayState
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyToArray2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1231
 * 
 * 
 * cdef cudaError_t copyToArray(cudaArray_const_t thisArray, size_t hOffsetSrc, size_t wOffsetSrc, cudaArray_t dst, size_t hOffsetDst,             # <<<<<<<<<<<<<<
 *         size_t wOffsetDst, size_t count) nogil except +:
 *     cdef void *tmp
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToArray(__pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_wOffsetSrc, __pyx_t_4cuda_7ccudart_cudaArray_t __pyx_v_dst, size_t __pyx_v_hOffsetDst, size_t __pyx_v_wOffsetDst, size_t __pyx_v_count) {
  void *__pyx_v_tmp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyToArray", __pyx_f[1], 1231, 1, __PYX_ERR(1, 1231, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1235
 *     cdef void *tmp
 *     cdef cudaError_t err
 *     err = cudaMalloc(&tmp, count)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_t_1 = __pyx_f_4cuda_7ccudart_cudaMalloc((&__pyx_v_tmp), __pyx_v_count); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1235, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1236
 *     cdef cudaError_t err
 *     err = cudaMalloc(&tmp, count)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1237
 *     err = cudaMalloc(&tmp, count)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 * 
 *     err = cudaMemcpyFromArray(tmp, thisArray, wOffsetSrc, hOffsetSrc, count, cudaMemcpyDeviceToDevice)
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1236
 *     cdef cudaError_t err
 *     err = cudaMalloc(&tmp, count)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1239
 *         return err
 * 
 *     err = cudaMemcpyFromArray(tmp, thisArray, wOffsetSrc, hOffsetSrc, count, cudaMemcpyDeviceToDevice)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_t_1 = __pyx_f_4cuda_7ccudart_cudaMemcpyFromArray(__pyx_v_tmp, __pyx_v_thisArray, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_count, __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1239, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1240
 * 
 *     err = cudaMemcpyFromArray(tmp, thisArray, wOffsetSrc, hOffsetSrc, count, cudaMemcpyDeviceToDevice)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = cudaMemcpyToArray(dst, wOffsetDst, hOffsetDst, tmp, count, cudaMemcpyDeviceToDevice)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1241
 *     err = cudaMemcpyFromArray(tmp, thisArray, wOffsetSrc, hOffsetSrc, count, cudaMemcpyDeviceToDevice)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     err = cudaMemcpyToArray(dst, wOffsetDst, hOffsetDst, tmp, count, cudaMemcpyDeviceToDevice)
 *     if err != cudaSuccess:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1240
 * 
 *     err = cudaMemcpyFromArray(tmp, thisArray, wOffsetSrc, hOffsetSrc, count, cudaMemcpyDeviceToDevice)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = cudaMemcpyToArray(dst, wOffsetDst, hOffsetDst, tmp, count, cudaMemcpyDeviceToDevice)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1242
 *     if err != cudaSuccess:
 *         return err
 *     err = cudaMemcpyToArray(dst, wOffsetDst, hOffsetDst, tmp, count, cudaMemcpyDeviceToDevice)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_t_1 = __pyx_f_4cuda_7ccudart_cudaMemcpyToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_tmp, __pyx_v_count, __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1242, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1243
 *         return err
 *     err = cudaMemcpyToArray(dst, wOffsetDst, hOffsetDst, tmp, count, cudaMemcpyDeviceToDevice)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = cudaFree(tmp)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1244
 *     err = cudaMemcpyToArray(dst, wOffsetDst, hOffsetDst, tmp, count, cudaMemcpyDeviceToDevice)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     err = cudaFree(tmp)
 *     if err != cudaSuccess:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1243
 *         return err
 *     err = cudaMemcpyToArray(dst, wOffsetDst, hOffsetDst, tmp, count, cudaMemcpyDeviceToDevice)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     err = cudaFree(tmp)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1245
 *     if err != cudaSuccess:
 *         return err
 *     err = cudaFree(tmp)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_t_1 = __pyx_f_4cuda_7ccudart_cudaFree(__pyx_v_tmp); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_e_4cuda_7ccudart_cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1245, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1246
 *         return err
 *     err = cudaFree(tmp)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     return cudaSuccess
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1247
 *     err = cudaFree(tmp)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1246
 *         return err
 *     err = cudaFree(tmp)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     return cudaSuccess
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1248
 *     if err != cudaSuccess:
 *         return err
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1231
 * 
 * 
 * cdef cudaError_t copyToArray(cudaArray_const_t thisArray, size_t hOffsetSrc, size_t wOffsetSrc, cudaArray_t dst, size_t hOffsetDst,             # <<<<<<<<<<<<<<
 *         size_t wOffsetDst, size_t count) nogil except +:
 *     cdef void *tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyToArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1251
 * 
 * 
 * cdef cudaError_t memcpyArrayToArray(cudaArray_t dst, size_t hOffsetDst, size_t wOffsetDst,             # <<<<<<<<<<<<<<
 *                                     cudaArray_const_t src, size_t hOffsetSrc, size_t wOffsetSrc,
 *                                     size_t count, cudaMemcpyKind kind) nogil except +:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyArrayToArray(__pyx_t_4cuda_7ccudart_cudaArray_t __pyx_v_dst, size_t __pyx_v_hOffsetDst, size_t __pyx_v_wOffsetDst, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_src, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_wOffsetSrc, size_t __pyx_v_count, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpyArrayToArray", __pyx_f[1], 1251, 1, __PYX_ERR(1, 1251, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1254
 *                                     cudaArray_const_t src, size_t hOffsetSrc, size_t wOffsetSrc,
 *                                     size_t count, cudaMemcpyKind kind) nogil except +:
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if kind != cudaMemcpyDeviceToDevice and kind != cudaMemcpyDefault:
 */
  __pyx_t_1 = ((__pyx_v_count == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1255
 *                                     size_t count, cudaMemcpyKind kind) nogil except +:
 *     if count == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     if kind != cudaMemcpyDeviceToDevice and kind != cudaMemcpyDefault:
 *         return cudaErrorInvalidMemcpyDirection
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1254
 *                                     cudaArray_const_t src, size_t hOffsetSrc, size_t wOffsetSrc,
 *                                     size_t count, cudaMemcpyKind kind) nogil except +:
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if kind != cudaMemcpyDeviceToDevice and kind != cudaMemcpyDefault:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1256
 *     if count == 0:
 *         return cudaSuccess
 *     if kind != cudaMemcpyDeviceToDevice and kind != cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidMemcpyDirection
 *     return copyToArray(src, hOffsetSrc, wOffsetSrc, dst, hOffsetDst, wOffsetDst, count)
 */
  switch (__pyx_v_kind) {
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice:
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDefault:
    __pyx_t_1 = 0;
    break;
    default:
    __pyx_t_1 = 1;
    break;
  }
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1257
 *         return cudaSuccess
 *     if kind != cudaMemcpyDeviceToDevice and kind != cudaMemcpyDefault:
 *         return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 *     return copyToArray(src, hOffsetSrc, wOffsetSrc, dst, hOffsetDst, wOffsetDst, count)
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1256
 *     if count == 0:
 *         return cudaSuccess
 *     if kind != cudaMemcpyDeviceToDevice and kind != cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidMemcpyDirection
 *     return copyToArray(src, hOffsetSrc, wOffsetSrc, dst, hOffsetDst, wOffsetDst, count)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1258
 *     if kind != cudaMemcpyDeviceToDevice and kind != cudaMemcpyDefault:
 *         return cudaErrorInvalidMemcpyDirection
 *     return copyToArray(src, hOffsetSrc, wOffsetSrc, dst, hOffsetDst, wOffsetDst, count)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  try {
    __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToArray(__pyx_v_src, __pyx_v_hOffsetSrc, __pyx_v_wOffsetSrc, __pyx_v_dst, __pyx_v_hOffsetDst, __pyx_v_wOffsetDst, __pyx_v_count);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1258, __pyx_L1_error)
  }
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1251
 * 
 * 
 * cdef cudaError_t memcpyArrayToArray(cudaArray_t dst, size_t hOffsetDst, size_t wOffsetDst,             # <<<<<<<<<<<<<<
 *                                     cudaArray_const_t src, size_t hOffsetSrc, size_t wOffsetSrc,
 *                                     size_t count, cudaMemcpyKind kind) nogil except +:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpyArrayToArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1261
 * 
 * 
 * cdef cudaError_t getChannelDesc(cudaArray_const_t thisArray, cudaChannelFormatDesc *outDesc) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelDesc(__pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc *__pyx_v_outDesc) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getChannelDesc", __pyx_f[1], 1261, 1, __PYX_ERR(1, 1261, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1264
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1265
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1265, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1266
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     outDesc[0] = arrayState.desc
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1267
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     outDesc[0] = arrayState.desc
 *     return cudaSuccess
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1266
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     outDesc[0] = arrayState.desc
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1268
 *     if err != cudaSuccess:
 *         return err
 *     outDesc[0] = arrayState.desc             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
  __pyx_t_3 = __pyx_v_arrayState.desc;
  (__pyx_v_outDesc[0]) = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1269
 *         return err
 *     outDesc[0] = arrayState.desc
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1261
 * 
 * 
 * cdef cudaError_t getChannelDesc(cudaArray_const_t thisArray, cudaChannelFormatDesc *outDesc) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.getChannelDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1272
 * 
 * 
 * cdef cudaError_t getFormat(cudaArray_const_t thisArray, int &numberOfChannels, ccuda.CUarray_format *format) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat(__pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, int &__pyx_v_numberOfChannels, __pyx_t_4cuda_5ccuda_CUarray_format *__pyx_v_format) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getFormat", __pyx_f[1], 1272, 1, __PYX_ERR(1, 1272, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1275
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1276
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1276, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1277
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     return getDescInfo(&arrayState.desc, <int*>&numberOfChannels, <ccuda.CUarray_format*>format)
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1278
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     return getDescInfo(&arrayState.desc, <int*>&numberOfChannels, <ccuda.CUarray_format*>format)
 * 
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1277
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     return getDescInfo(&arrayState.desc, <int*>&numberOfChannels, <ccuda.CUarray_format*>format)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1279
 *     if err != cudaSuccess:
 *         return err
 *     return getDescInfo(&arrayState.desc, <int*>&numberOfChannels, <ccuda.CUarray_format*>format)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo((&__pyx_v_arrayState.desc), ((int *)(&__pyx_v_numberOfChannels)), ((__pyx_t_4cuda_5ccuda_CUarray_format *)__pyx_v_format));
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1272
 * 
 * 
 * cdef cudaError_t getFormat(cudaArray_const_t thisArray, int &numberOfChannels, ccuda.CUarray_format *format) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.getFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1282
 * 
 * 
 * cdef cudaError_t getDriverResDescFromResDesc(ccuda.CUDA_RESOURCE_DESC *rdDst, const cudaResourceDesc *rdSrc,             # <<<<<<<<<<<<<<
 *                                              ccuda.CUDA_TEXTURE_DESC *tdDst, const cudaTextureDesc *tdSrc,
 *                                              ccuda.CUDA_RESOURCE_VIEW_DESC *rvdDst, const cudaResourceViewDesc *rvdSrc) nogil except +:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getDriverResDescFromResDesc(__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *__pyx_v_rdDst, struct __pyx_t_4cuda_7ccudart_cudaResourceDesc const *__pyx_v_rdSrc, __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC *__pyx_v_tdDst, struct __pyx_t_4cuda_7ccudart_cudaTextureDesc const *__pyx_v_tdSrc, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC *__pyx_v_rvdDst, struct __pyx_t_4cuda_7ccudart_cudaResourceViewDesc const *__pyx_v_rvdSrc) {
  int __pyx_v_i;
  int __pyx_v_numChannels;
  __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_format;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_v_hArray;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_t_5;
  float __pyx_t_6;
  unsigned int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getDriverResDescFromResDesc", __pyx_f[1], 1282, 1, __PYX_ERR(1, 1282, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1285
 *                                              ccuda.CUDA_TEXTURE_DESC *tdDst, const cudaTextureDesc *tdSrc,
 *                                              ccuda.CUDA_RESOURCE_VIEW_DESC *rvdDst, const cudaResourceViewDesc *rvdSrc) nogil except +:
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     cdef int numChannels = 0
 *     cdef ccuda.CUarray_format format
 */
  __pyx_v_i = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1286
 *                                              ccuda.CUDA_RESOURCE_VIEW_DESC *rvdDst, const cudaResourceViewDesc *rvdSrc) nogil except +:
 *     cdef int i = 0
 *     cdef int numChannels = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUarray_format format
 *     cdef ccuda.CUarray hArray = NULL
 */
  __pyx_v_numChannels = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1288
 *     cdef int numChannels = 0
 *     cdef ccuda.CUarray_format format
 *     cdef ccuda.CUarray hArray = NULL             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err
 *     i = 0
 */
  __pyx_v_hArray = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":1290
 *     cdef ccuda.CUarray hArray = NULL
 *     cdef cudaError_t err
 *     i = 0             # <<<<<<<<<<<<<<
 * 
 *     memset(rdDst, 0, sizeof(rdDst[0]))
 */
  __pyx_v_i = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1292
 *     i = 0
 * 
 *     memset(rdDst, 0, sizeof(rdDst[0]))             # <<<<<<<<<<<<<<
 * 
 *     if rdSrc[0].resType == cudaResourceType.cudaResourceTypeArray:
 */
  (void)(memset(__pyx_v_rdDst, 0, (sizeof((__pyx_v_rdDst[0])))));

  /* "cuda/_lib/ccudart/utils.pyx":1294
 *     memset(rdDst, 0, sizeof(rdDst[0]))
 * 
 *     if rdSrc[0].resType == cudaResourceType.cudaResourceTypeArray:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         rdDst[0].res.array.hArray = <ccuda.CUarray>rdSrc[0].res.array.array
 */
  __pyx_t_1 = (((__pyx_v_rdSrc[0]).resType == __pyx_e_4cuda_7ccudart_cudaResourceTypeArray) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1295
 * 
 *     if rdSrc[0].resType == cudaResourceType.cudaResourceTypeArray:
 *         rdDst[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY             # <<<<<<<<<<<<<<
 *         rdDst[0].res.array.hArray = <ccuda.CUarray>rdSrc[0].res.array.array
 *         err = getFormat(rdSrc[0].res.array.array, numChannels, &format)
 */
    (__pyx_v_rdDst[0]).resType = __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_ARRAY;

    /* "cuda/_lib/ccudart/utils.pyx":1296
 *     if rdSrc[0].resType == cudaResourceType.cudaResourceTypeArray:
 *         rdDst[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         rdDst[0].res.array.hArray = <ccuda.CUarray>rdSrc[0].res.array.array             # <<<<<<<<<<<<<<
 *         err = getFormat(rdSrc[0].res.array.array, numChannels, &format)
 *         if err != cudaSuccess:
 */
    (__pyx_v_rdDst[0]).res.array.hArray = ((__pyx_t_4cuda_5ccuda_CUarray)(__pyx_v_rdSrc[0]).res.array.array);

    /* "cuda/_lib/ccudart/utils.pyx":1297
 *         rdDst[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         rdDst[0].res.array.hArray = <ccuda.CUarray>rdSrc[0].res.array.array
 *         err = getFormat(rdSrc[0].res.array.array, numChannels, &format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat((__pyx_v_rdSrc[0]).res.array.array, __pyx_v_numChannels, (&__pyx_v_format));
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1297, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_2;

    /* "cuda/_lib/ccudart/utils.pyx":1298
 *         rdDst[0].res.array.hArray = <ccuda.CUarray>rdSrc[0].res.array.array
 *         err = getFormat(rdSrc[0].res.array.array, numChannels, &format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1299
 *         err = getFormat(rdSrc[0].res.array.array, numChannels, &format)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 *         rdDst[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1298
 *         rdDst[0].res.array.hArray = <ccuda.CUarray>rdSrc[0].res.array.array
 *         err = getFormat(rdSrc[0].res.array.array, numChannels, &format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1294
 *     memset(rdDst, 0, sizeof(rdDst[0]))
 * 
 *     if rdSrc[0].resType == cudaResourceType.cudaResourceTypeArray:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         rdDst[0].res.array.hArray = <ccuda.CUarray>rdSrc[0].res.array.array
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1300
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         rdDst[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>rdSrc[0].res.mipmap.mipmap
 */
  __pyx_t_1 = (((__pyx_v_rdSrc[0]).resType == __pyx_e_4cuda_7ccudart_cudaResourceTypeMipmappedArray) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1301
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 *         rdDst[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY             # <<<<<<<<<<<<<<
 *         rdDst[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>rdSrc[0].res.mipmap.mipmap
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdDst[0].res.mipmap.hMipmappedArray, 0)
 */
    (__pyx_v_rdDst[0]).resType = __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY;

    /* "cuda/_lib/ccudart/utils.pyx":1302
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 *         rdDst[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         rdDst[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>rdSrc[0].res.mipmap.mipmap             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdDst[0].res.mipmap.hMipmappedArray, 0)
 *         if err != cudaSuccess:
 */
    (__pyx_v_rdDst[0]).res.mipmap.hMipmappedArray = ((__pyx_t_4cuda_5ccuda_CUmipmappedArray)(__pyx_v_rdSrc[0]).res.mipmap.mipmap);

    /* "cuda/_lib/ccudart/utils.pyx":1303
 *         rdDst[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         rdDst[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>rdSrc[0].res.mipmap.mipmap
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdDst[0].res.mipmap.hMipmappedArray, 0)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel((&__pyx_v_hArray), (__pyx_v_rdDst[0]).res.mipmap.hMipmappedArray, 0); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1303, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":1304
 *         rdDst[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>rdSrc[0].res.mipmap.mipmap
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdDst[0].res.mipmap.hMipmappedArray, 0)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &format)
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1305
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdDst[0].res.mipmap.hMipmappedArray, 0)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &format)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1304
 *         rdDst[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>rdSrc[0].res.mipmap.mipmap
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdDst[0].res.mipmap.hMipmappedArray, 0)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &format)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1306
 *         if err != cudaSuccess:
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat(((__pyx_t_4cuda_7ccudart_cudaArray_t)__pyx_v_hArray), __pyx_v_numChannels, (&__pyx_v_format));
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1306, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_2;

    /* "cuda/_lib/ccudart/utils.pyx":1307
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1308
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &format)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 *         rdDst[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1307
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1300
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         rdDst[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>rdSrc[0].res.mipmap.mipmap
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1309
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeLinear:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 *         rdDst[0].res.linear.devPtr      = <ccuda.CUdeviceptr_v2>rdSrc[0].res.linear.devPtr
 */
  __pyx_t_1 = (((__pyx_v_rdSrc[0]).resType == __pyx_e_4cuda_7ccudart_cudaResourceTypeLinear) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1310
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 *         rdDst[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR             # <<<<<<<<<<<<<<
 *         rdDst[0].res.linear.devPtr      = <ccuda.CUdeviceptr_v2>rdSrc[0].res.linear.devPtr
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 */
    (__pyx_v_rdDst[0]).resType = __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_LINEAR;

    /* "cuda/_lib/ccudart/utils.pyx":1311
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 *         rdDst[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 *         rdDst[0].res.linear.devPtr      = <ccuda.CUdeviceptr_v2>rdSrc[0].res.linear.devPtr             # <<<<<<<<<<<<<<
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 */
    (__pyx_v_rdDst[0]).res.linear.devPtr = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_rdSrc[0]).res.linear.devPtr);

    /* "cuda/_lib/ccudart/utils.pyx":1312
 *         rdDst[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 *         rdDst[0].res.linear.devPtr      = <ccuda.CUdeviceptr_v2>rdSrc[0].res.linear.devPtr
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes             # <<<<<<<<<<<<<<
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 *         if err != cudaSuccess:
 */
    __pyx_t_4 = (__pyx_v_rdSrc[0]).res.linear.sizeInBytes;
    (__pyx_v_rdDst[0]).res.linear.sizeInBytes = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1313
 *         rdDst[0].res.linear.devPtr      = <ccuda.CUdeviceptr_v2>rdSrc[0].res.linear.devPtr
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo((&(__pyx_v_rdSrc[0]).res.linear.desc), ((int *)(&__pyx_v_numChannels)), ((__pyx_t_4cuda_5ccuda_CUarray_format *)(&__pyx_v_format)));

    /* "cuda/_lib/ccudart/utils.pyx":1314
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         rdDst[0].res.linear.format      = format
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1315
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         rdDst[0].res.linear.format      = format
 *         rdDst[0].res.linear.numChannels = numChannels
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1314
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         rdDst[0].res.linear.format      = format
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1316
 *         if err != cudaSuccess:
 *             return err
 *         rdDst[0].res.linear.format      = format             # <<<<<<<<<<<<<<
 *         rdDst[0].res.linear.numChannels = numChannels
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypePitch2D:
 */
    (__pyx_v_rdDst[0]).res.linear.format = __pyx_v_format;

    /* "cuda/_lib/ccudart/utils.pyx":1317
 *             return err
 *         rdDst[0].res.linear.format      = format
 *         rdDst[0].res.linear.numChannels = numChannels             # <<<<<<<<<<<<<<
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypePitch2D:
 *         rdDst[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 */
    (__pyx_v_rdDst[0]).res.linear.numChannels = __pyx_v_numChannels;

    /* "cuda/_lib/ccudart/utils.pyx":1309
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypeLinear:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 *         rdDst[0].res.linear.devPtr      = <ccuda.CUdeviceptr_v2>rdSrc[0].res.linear.devPtr
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1318
 *         rdDst[0].res.linear.format      = format
 *         rdDst[0].res.linear.numChannels = numChannels
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypePitch2D:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 *         rdDst[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr_v2>rdSrc[0].res.pitch2D.devPtr
 */
  __pyx_t_1 = (((__pyx_v_rdSrc[0]).resType == __pyx_e_4cuda_7ccudart_cudaResourceTypePitch2D) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1319
 *         rdDst[0].res.linear.numChannels = numChannels
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypePitch2D:
 *         rdDst[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr_v2>rdSrc[0].res.pitch2D.devPtr
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes
 */
    (__pyx_v_rdDst[0]).resType = __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_PITCH2D;

    /* "cuda/_lib/ccudart/utils.pyx":1320
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypePitch2D:
 *         rdDst[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 *         rdDst[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr_v2>rdSrc[0].res.pitch2D.devPtr             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width
 */
    (__pyx_v_rdDst[0]).res.pitch2D.devPtr = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_rdSrc[0]).res.pitch2D.devPtr);

    /* "cuda/_lib/ccudart/utils.pyx":1321
 *         rdDst[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 *         rdDst[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr_v2>rdSrc[0].res.pitch2D.devPtr
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 */
    __pyx_t_4 = (__pyx_v_rdSrc[0]).res.pitch2D.pitchInBytes;
    (__pyx_v_rdDst[0]).res.pitch2D.pitchInBytes = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1322
 *         rdDst[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr_v2>rdSrc[0].res.pitch2D.devPtr
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 */
    __pyx_t_4 = (__pyx_v_rdSrc[0]).res.pitch2D.width;
    (__pyx_v_rdDst[0]).res.pitch2D.width = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1323
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height             # <<<<<<<<<<<<<<
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 *         if err != cudaSuccess:
 */
    __pyx_t_4 = (__pyx_v_rdSrc[0]).res.pitch2D.height;
    (__pyx_v_rdDst[0]).res.pitch2D.height = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1324
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo((&(__pyx_v_rdSrc[0]).res.linear.desc), ((int *)(&__pyx_v_numChannels)), ((__pyx_t_4cuda_5ccuda_CUarray_format *)(&__pyx_v_format)));

    /* "cuda/_lib/ccudart/utils.pyx":1325
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         rdDst[0].res.pitch2D.format       = format
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1326
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.format       = format
 *         rdDst[0].res.pitch2D.numChannels  = numChannels
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1325
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 *         err = getDescInfo(&rdSrc[0].res.linear.desc, <int*>&numChannels, <ccuda.CUarray_format*>&format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         rdDst[0].res.pitch2D.format       = format
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1327
 *         if err != cudaSuccess:
 *             return err
 *         rdDst[0].res.pitch2D.format       = format             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.numChannels  = numChannels
 *     else:
 */
    (__pyx_v_rdDst[0]).res.pitch2D.format = __pyx_v_format;

    /* "cuda/_lib/ccudart/utils.pyx":1328
 *             return err
 *         rdDst[0].res.pitch2D.format       = format
 *         rdDst[0].res.pitch2D.numChannels  = numChannels             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidValue
 */
    (__pyx_v_rdDst[0]).res.pitch2D.numChannels = __pyx_v_numChannels;

    /* "cuda/_lib/ccudart/utils.pyx":1318
 *         rdDst[0].res.linear.format      = format
 *         rdDst[0].res.linear.numChannels = numChannels
 *     elif rdSrc[0].resType == cudaResourceType.cudaResourceTypePitch2D:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 *         rdDst[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr_v2>rdSrc[0].res.pitch2D.devPtr
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1330
 *         rdDst[0].res.pitch2D.numChannels  = numChannels
 *     else:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "cuda/_lib/ccudart/utils.pyx":1333
 * 
 * 
 *     rdDst[0].flags = 0             # <<<<<<<<<<<<<<
 * 
 *     if tdDst and tdSrc:
 */
  (__pyx_v_rdDst[0]).flags = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1335
 *     rdDst[0].flags = 0
 * 
 *     if tdDst and tdSrc:             # <<<<<<<<<<<<<<
 *         memset(tdDst, 0, sizeof(tdDst[0]))
 * 
 */
  __pyx_t_5 = (__pyx_v_tdDst != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_tdSrc != 0);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1336
 * 
 *     if tdDst and tdSrc:
 *         memset(tdDst, 0, sizeof(tdDst[0]))             # <<<<<<<<<<<<<<
 * 
 *         while (i < 3):
 */
    (void)(memset(__pyx_v_tdDst, 0, (sizeof((__pyx_v_tdDst[0])))));

    /* "cuda/_lib/ccudart/utils.pyx":1338
 *         memset(tdDst, 0, sizeof(tdDst[0]))
 * 
 *         while (i < 3):             # <<<<<<<<<<<<<<
 *             tdDst[0].addressMode[i] = <ccuda.CUaddress_mode>tdSrc[0].addressMode[i]
 *             i += 1
 */
    while (1) {
      __pyx_t_1 = ((__pyx_v_i < 3) != 0);
      if (!__pyx_t_1) break;

      /* "cuda/_lib/ccudart/utils.pyx":1339
 * 
 *         while (i < 3):
 *             tdDst[0].addressMode[i] = <ccuda.CUaddress_mode>tdSrc[0].addressMode[i]             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
      ((__pyx_v_tdDst[0]).addressMode[__pyx_v_i]) = ((__pyx_t_4cuda_5ccuda_CUaddress_mode)((__pyx_v_tdSrc[0]).addressMode[__pyx_v_i]));

      /* "cuda/_lib/ccudart/utils.pyx":1340
 *         while (i < 3):
 *             tdDst[0].addressMode[i] = <ccuda.CUaddress_mode>tdSrc[0].addressMode[i]
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         tdDst[0].filterMode          = <ccuda.CUfilter_mode>tdSrc[0].filterMode
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "cuda/_lib/ccudart/utils.pyx":1342
 *             i += 1
 * 
 *         tdDst[0].filterMode          = <ccuda.CUfilter_mode>tdSrc[0].filterMode             # <<<<<<<<<<<<<<
 *         tdDst[0].mipmapFilterMode    = <ccuda.CUfilter_mode>tdSrc[0].mipmapFilterMode
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias
 */
    (__pyx_v_tdDst[0]).filterMode = ((__pyx_t_4cuda_5ccuda_CUfilter_mode)(__pyx_v_tdSrc[0]).filterMode);

    /* "cuda/_lib/ccudart/utils.pyx":1343
 * 
 *         tdDst[0].filterMode          = <ccuda.CUfilter_mode>tdSrc[0].filterMode
 *         tdDst[0].mipmapFilterMode    = <ccuda.CUfilter_mode>tdSrc[0].mipmapFilterMode             # <<<<<<<<<<<<<<
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp
 */
    (__pyx_v_tdDst[0]).mipmapFilterMode = ((__pyx_t_4cuda_5ccuda_CUfilter_mode)(__pyx_v_tdSrc[0]).mipmapFilterMode);

    /* "cuda/_lib/ccudart/utils.pyx":1344
 *         tdDst[0].filterMode          = <ccuda.CUfilter_mode>tdSrc[0].filterMode
 *         tdDst[0].mipmapFilterMode    = <ccuda.CUfilter_mode>tdSrc[0].mipmapFilterMode
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias             # <<<<<<<<<<<<<<
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp
 */
    __pyx_t_6 = (__pyx_v_tdSrc[0]).mipmapLevelBias;
    (__pyx_v_tdDst[0]).mipmapLevelBias = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1345
 *         tdDst[0].mipmapFilterMode    = <ccuda.CUfilter_mode>tdSrc[0].mipmapFilterMode
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp             # <<<<<<<<<<<<<<
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy
 */
    __pyx_t_6 = (__pyx_v_tdSrc[0]).minMipmapLevelClamp;
    (__pyx_v_tdDst[0]).minMipmapLevelClamp = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1346
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp             # <<<<<<<<<<<<<<
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy
 *         i = 0
 */
    __pyx_t_6 = (__pyx_v_tdSrc[0]).maxMipmapLevelClamp;
    (__pyx_v_tdDst[0]).maxMipmapLevelClamp = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1347
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy             # <<<<<<<<<<<<<<
 *         i = 0
 *         while (i < 4):
 */
    __pyx_t_7 = (__pyx_v_tdSrc[0]).maxAnisotropy;
    (__pyx_v_tdDst[0]).maxAnisotropy = __pyx_t_7;

    /* "cuda/_lib/ccudart/utils.pyx":1348
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy
 *         i = 0             # <<<<<<<<<<<<<<
 *         while (i < 4):
 *             tdDst[0].borderColor[i] = tdSrc[0].borderColor[i]
 */
    __pyx_v_i = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1349
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy
 *         i = 0
 *         while (i < 4):             # <<<<<<<<<<<<<<
 *             tdDst[0].borderColor[i] = tdSrc[0].borderColor[i]
 *             i += 1
 */
    while (1) {
      __pyx_t_1 = ((__pyx_v_i < 4) != 0);
      if (!__pyx_t_1) break;

      /* "cuda/_lib/ccudart/utils.pyx":1350
 *         i = 0
 *         while (i < 4):
 *             tdDst[0].borderColor[i] = tdSrc[0].borderColor[i]             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
      ((__pyx_v_tdDst[0]).borderColor[__pyx_v_i]) = ((__pyx_v_tdSrc[0]).borderColor[__pyx_v_i]);

      /* "cuda/_lib/ccudart/utils.pyx":1351
 *         while (i < 4):
 *             tdDst[0].borderColor[i] = tdSrc[0].borderColor[i]
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         if tdSrc[0].sRGB:
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "cuda/_lib/ccudart/utils.pyx":1353
 *             i += 1
 * 
 *         if tdSrc[0].sRGB:             # <<<<<<<<<<<<<<
 *             tdDst[0].flags |= ccuda.CU_TRSF_SRGB
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_tdSrc[0]).sRGB != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1354
 * 
 *         if tdSrc[0].sRGB:
 *             tdDst[0].flags |= ccuda.CU_TRSF_SRGB             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].flags |= 0
 */
      __pyx_t_8 = 0;
      (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | __pyx_e_4cuda_5ccuda_CU_TRSF_SRGB);

      /* "cuda/_lib/ccudart/utils.pyx":1353
 *             i += 1
 * 
 *         if tdSrc[0].sRGB:             # <<<<<<<<<<<<<<
 *             tdDst[0].flags |= ccuda.CU_TRSF_SRGB
 *         else:
 */
      goto __pyx_L16;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1356
 *             tdDst[0].flags |= ccuda.CU_TRSF_SRGB
 *         else:
 *             tdDst[0].flags |= 0             # <<<<<<<<<<<<<<
 * 
 *         if tdSrc[0].normalizedCoords:
 */
    /*else*/ {
      __pyx_t_8 = 0;
      (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | 0);
    }
    __pyx_L16:;

    /* "cuda/_lib/ccudart/utils.pyx":1358
 *             tdDst[0].flags |= 0
 * 
 *         if tdSrc[0].normalizedCoords:             # <<<<<<<<<<<<<<
 *             tdDst[0].flags |= ccuda.CU_TRSF_NORMALIZED_COORDINATES
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_tdSrc[0]).normalizedCoords != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1359
 * 
 *         if tdSrc[0].normalizedCoords:
 *             tdDst[0].flags |= ccuda.CU_TRSF_NORMALIZED_COORDINATES             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].flags |= 0
 */
      __pyx_t_8 = 0;
      (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | __pyx_e_4cuda_5ccuda_CU_TRSF_NORMALIZED_COORDINATES);

      /* "cuda/_lib/ccudart/utils.pyx":1358
 *             tdDst[0].flags |= 0
 * 
 *         if tdSrc[0].normalizedCoords:             # <<<<<<<<<<<<<<
 *             tdDst[0].flags |= ccuda.CU_TRSF_NORMALIZED_COORDINATES
 *         else:
 */
      goto __pyx_L17;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1361
 *             tdDst[0].flags |= ccuda.CU_TRSF_NORMALIZED_COORDINATES
 *         else:
 *             tdDst[0].flags |= 0             # <<<<<<<<<<<<<<
 * 
 *         if tdSrc[0].disableTrilinearOptimization:
 */
    /*else*/ {
      __pyx_t_8 = 0;
      (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | 0);
    }
    __pyx_L17:;

    /* "cuda/_lib/ccudart/utils.pyx":1363
 *             tdDst[0].flags |= 0
 * 
 *         if tdSrc[0].disableTrilinearOptimization:             # <<<<<<<<<<<<<<
 *             tdDst[0].flags |= ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_tdSrc[0]).disableTrilinearOptimization != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1364
 * 
 *         if tdSrc[0].disableTrilinearOptimization:
 *             tdDst[0].flags |= ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].flags |= 0
 */
      __pyx_t_8 = 0;
      (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | __pyx_e_4cuda_5ccuda_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION);

      /* "cuda/_lib/ccudart/utils.pyx":1363
 *             tdDst[0].flags |= 0
 * 
 *         if tdSrc[0].disableTrilinearOptimization:             # <<<<<<<<<<<<<<
 *             tdDst[0].flags |= ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION
 *         else:
 */
      goto __pyx_L18;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1366
 *             tdDst[0].flags |= ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION
 *         else:
 *             tdDst[0].flags |= 0             # <<<<<<<<<<<<<<
 * 
 *         if tdSrc[0].seamlessCubemap:
 */
    /*else*/ {
      __pyx_t_8 = 0;
      (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | 0);
    }
    __pyx_L18:;

    /* "cuda/_lib/ccudart/utils.pyx":1368
 *             tdDst[0].flags |= 0
 * 
 *         if tdSrc[0].seamlessCubemap:             # <<<<<<<<<<<<<<
 *             tdDst[0].flags |= ccuda.CU_TRSF_SEAMLESS_CUBEMAP
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_tdSrc[0]).seamlessCubemap != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1369
 * 
 *         if tdSrc[0].seamlessCubemap:
 *             tdDst[0].flags |= ccuda.CU_TRSF_SEAMLESS_CUBEMAP             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].flags |= 0
 */
      __pyx_t_8 = 0;
      (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | __pyx_e_4cuda_5ccuda_CU_TRSF_SEAMLESS_CUBEMAP);

      /* "cuda/_lib/ccudart/utils.pyx":1368
 *             tdDst[0].flags |= 0
 * 
 *         if tdSrc[0].seamlessCubemap:             # <<<<<<<<<<<<<<
 *             tdDst[0].flags |= ccuda.CU_TRSF_SEAMLESS_CUBEMAP
 *         else:
 */
      goto __pyx_L19;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1371
 *             tdDst[0].flags |= ccuda.CU_TRSF_SEAMLESS_CUBEMAP
 *         else:
 *             tdDst[0].flags |= 0             # <<<<<<<<<<<<<<
 * 
 *         if format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 */
    /*else*/ {
      __pyx_t_8 = 0;
      (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | 0);
    }
    __pyx_L19:;

    /* "cuda/_lib/ccudart/utils.pyx":1373
 *             tdDst[0].flags |= 0
 * 
 *         if format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 */
    switch (__pyx_v_format) {
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X1:
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X2:

      /* "cuda/_lib/ccudart/utils.pyx":1374
 * 
 *         if format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X4:

      /* "cuda/_lib/ccudart/utils.pyx":1375
 *         if format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X1:

      /* "cuda/_lib/ccudart/utils.pyx":1376
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X2:

      /* "cuda/_lib/ccudart/utils.pyx":1377
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X4:

      /* "cuda/_lib/ccudart/utils.pyx":1378
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X1:

      /* "cuda/_lib/ccudart/utils.pyx":1379
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X1,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X2:

      /* "cuda/_lib/ccudart/utils.pyx":1380
 *                       ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X2,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X4:

      /* "cuda/_lib/ccudart/utils.pyx":1381
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X4,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X1:

      /* "cuda/_lib/ccudart/utils.pyx":1382
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X1,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X4,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X2:

      /* "cuda/_lib/ccudart/utils.pyx":1383
 *                       ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X2,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X4,
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X4:

      /* "cuda/_lib/ccudart/utils.pyx":1384
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X4,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM:

      /* "cuda/_lib/ccudart/utils.pyx":1385
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X4,
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM_SRGB:

      /* "cuda/_lib/ccudart/utils.pyx":1386
 *                       ccuda.CU_AD_FORMAT_UNORM_INT16X4,
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM:

      /* "cuda/_lib/ccudart/utils.pyx":1387
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM_SRGB:

      /* "cuda/_lib/ccudart/utils.pyx":1388
 *                       ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM:

      /* "cuda/_lib/ccudart/utils.pyx":1389
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC4_UNORM,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM_SRGB:

      /* "cuda/_lib/ccudart/utils.pyx":1390
 *                       ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC4_SNORM,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_UNORM:

      /* "cuda/_lib/ccudart/utils.pyx":1391
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC4_UNORM,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                       ccuda.CU_AD_FORMAT_BC5_UNORM,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_SNORM:

      /* "cuda/_lib/ccudart/utils.pyx":1392
 *                       ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                       ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC4_SNORM,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC5_SNORM,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_UNORM:

      /* "cuda/_lib/ccudart/utils.pyx":1393
 *                       ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                       ccuda.CU_AD_FORMAT_BC5_UNORM,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_SNORM:

      /* "cuda/_lib/ccudart/utils.pyx":1394
 *                       ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                       ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC5_SNORM,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM:

      /* "cuda/_lib/ccudart/utils.pyx":1395
 *                       ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *             if tdSrc[0].readMode != cudaTextureReadMode.cudaReadModeNormalizedFloat:
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM_SRGB:

      /* "cuda/_lib/ccudart/utils.pyx":1397
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *             if tdSrc[0].readMode != cudaTextureReadMode.cudaReadModeNormalizedFloat:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidNormSetting
 *         elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).readMode != __pyx_e_4cuda_7ccudart_cudaReadModeNormalizedFloat) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1398
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *             if tdSrc[0].readMode != cudaTextureReadMode.cudaReadModeNormalizedFloat:
 *                 return cudaErrorInvalidNormSetting             # <<<<<<<<<<<<<<
 *         elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                         ccuda.CU_AD_FORMAT_SIGNED_INT16,
 */
        __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidNormSetting;
        goto __pyx_L0;

        /* "cuda/_lib/ccudart/utils.pyx":1397
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                       ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *             if tdSrc[0].readMode != cudaTextureReadMode.cudaReadModeNormalizedFloat:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidNormSetting
 *         elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1373
 *             tdDst[0].flags |= 0
 * 
 *         if format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                       ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 */
      break;
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8:

      /* "cuda/_lib/ccudart/utils.pyx":1399
 *             if tdSrc[0].readMode != cudaTextureReadMode.cudaReadModeNormalizedFloat:
 *                 return cudaErrorInvalidNormSetting
 *         elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,             # <<<<<<<<<<<<<<
 *                         ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16:

      /* "cuda/_lib/ccudart/utils.pyx":1400
 *                 return cudaErrorInvalidNormSetting
 *         elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                         ccuda.CU_AD_FORMAT_SIGNED_INT16,             # <<<<<<<<<<<<<<
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8:

      /* "cuda/_lib/ccudart/utils.pyx":1401
 *         elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                         ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT8,             # <<<<<<<<<<<<<<
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             if tdSrc[0].readMode == cudaReadModeElementType:
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16:

      /* "cuda/_lib/ccudart/utils.pyx":1403
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             if tdSrc[0].readMode == cudaReadModeElementType:             # <<<<<<<<<<<<<<
 *                 if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                     return cudaErrorInvalidFilterSetting
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).readMode == __pyx_e_4cuda_7ccudart_cudaReadModeElementType) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1404
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             if tdSrc[0].readMode == cudaReadModeElementType:
 *                 if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:             # <<<<<<<<<<<<<<
 *                     return cudaErrorInvalidFilterSetting
 *                 tdDst[0].flags |= ccuda.CU_TRSF_READ_AS_INTEGER
 */
        __pyx_t_1 = (((__pyx_v_tdSrc[0]).filterMode == __pyx_e_4cuda_7ccudart_cudaFilterModeLinear) != 0);
        if (__pyx_t_1) {

          /* "cuda/_lib/ccudart/utils.pyx":1405
 *             if tdSrc[0].readMode == cudaReadModeElementType:
 *                 if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                     return cudaErrorInvalidFilterSetting             # <<<<<<<<<<<<<<
 *                 tdDst[0].flags |= ccuda.CU_TRSF_READ_AS_INTEGER
 *         elif format == ccuda.CU_AD_FORMAT_NV12:
 */
          __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidFilterSetting;
          goto __pyx_L0;

          /* "cuda/_lib/ccudart/utils.pyx":1404
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             if tdSrc[0].readMode == cudaReadModeElementType:
 *                 if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:             # <<<<<<<<<<<<<<
 *                     return cudaErrorInvalidFilterSetting
 *                 tdDst[0].flags |= ccuda.CU_TRSF_READ_AS_INTEGER
 */
        }

        /* "cuda/_lib/ccudart/utils.pyx":1406
 *                 if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                     return cudaErrorInvalidFilterSetting
 *                 tdDst[0].flags |= ccuda.CU_TRSF_READ_AS_INTEGER             # <<<<<<<<<<<<<<
 *         elif format == ccuda.CU_AD_FORMAT_NV12:
 *             return cudaErrorInvalidValue
 */
        __pyx_t_8 = 0;
        (__pyx_v_tdDst[__pyx_t_8]).flags = ((__pyx_v_tdDst[__pyx_t_8]).flags | __pyx_e_4cuda_5ccuda_CU_TRSF_READ_AS_INTEGER);

        /* "cuda/_lib/ccudart/utils.pyx":1403
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             if tdSrc[0].readMode == cudaReadModeElementType:             # <<<<<<<<<<<<<<
 *                 if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                     return cudaErrorInvalidFilterSetting
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1399
 *             if tdSrc[0].readMode != cudaTextureReadMode.cudaReadModeNormalizedFloat:
 *                 return cudaErrorInvalidNormSetting
 *         elif format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,             # <<<<<<<<<<<<<<
 *                         ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                         ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 */
      break;
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_NV12:

      /* "cuda/_lib/ccudart/utils.pyx":1408
 *                 tdDst[0].flags |= ccuda.CU_TRSF_READ_AS_INTEGER
 *         elif format == ccuda.CU_AD_FORMAT_NV12:
 *             return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *         elif format == ccuda.CU_AD_FORMAT_SIGNED_INT32 or format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 *             if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1407
 *                     return cudaErrorInvalidFilterSetting
 *                 tdDst[0].flags |= ccuda.CU_TRSF_READ_AS_INTEGER
 *         elif format == ccuda.CU_AD_FORMAT_NV12:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         elif format == ccuda.CU_AD_FORMAT_SIGNED_INT32 or format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 */
      break;
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32:

      /* "cuda/_lib/ccudart/utils.pyx":1409
 *         elif format == ccuda.CU_AD_FORMAT_NV12:
 *             return cudaErrorInvalidValue
 *         elif format == ccuda.CU_AD_FORMAT_SIGNED_INT32 or format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:             # <<<<<<<<<<<<<<
 *             if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                 return cudaErrorInvalidFilterSetting
 */
      case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32:

      /* "cuda/_lib/ccudart/utils.pyx":1410
 *             return cudaErrorInvalidValue
 *         elif format == ccuda.CU_AD_FORMAT_SIGNED_INT32 or format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 *             if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidFilterSetting
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).filterMode == __pyx_e_4cuda_7ccudart_cudaFilterModeLinear) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1411
 *         elif format == ccuda.CU_AD_FORMAT_SIGNED_INT32 or format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 *             if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                 return cudaErrorInvalidFilterSetting             # <<<<<<<<<<<<<<
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:
 *                 return cudaErrorInvalidNormSetting
 */
        __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidFilterSetting;
        goto __pyx_L0;

        /* "cuda/_lib/ccudart/utils.pyx":1410
 *             return cudaErrorInvalidValue
 *         elif format == ccuda.CU_AD_FORMAT_SIGNED_INT32 or format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:
 *             if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidFilterSetting
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1412
 *             if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                 return cudaErrorInvalidFilterSetting
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidNormSetting
 *         else:
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).readMode == __pyx_e_4cuda_7ccudart_cudaReadModeNormalizedFloat) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1413
 *                 return cudaErrorInvalidFilterSetting
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:
 *                 return cudaErrorInvalidNormSetting             # <<<<<<<<<<<<<<
 *         else:
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:
 */
        __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidNormSetting;
        goto __pyx_L0;

        /* "cuda/_lib/ccudart/utils.pyx":1412
 *             if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                 return cudaErrorInvalidFilterSetting
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidNormSetting
 *         else:
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1409
 *         elif format == ccuda.CU_AD_FORMAT_NV12:
 *             return cudaErrorInvalidValue
 *         elif format == ccuda.CU_AD_FORMAT_SIGNED_INT32 or format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32:             # <<<<<<<<<<<<<<
 *             if tdSrc[0].filterMode == cudaTextureFilterMode.cudaFilterModeLinear:
 *                 return cudaErrorInvalidFilterSetting
 */
      break;
      default:

      /* "cuda/_lib/ccudart/utils.pyx":1415
 *                 return cudaErrorInvalidNormSetting
 *         else:
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidNormSetting
 * 
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).readMode == __pyx_e_4cuda_7ccudart_cudaReadModeNormalizedFloat) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1416
 *         else:
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:
 *                 return cudaErrorInvalidNormSetting             # <<<<<<<<<<<<<<
 * 
 *     if rvdDst and rvdSrc:
 */
        __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidNormSetting;
        goto __pyx_L0;

        /* "cuda/_lib/ccudart/utils.pyx":1415
 *                 return cudaErrorInvalidNormSetting
 *         else:
 *             if tdSrc[0].readMode == cudaTextureReadMode.cudaReadModeNormalizedFloat:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidNormSetting
 * 
 */
      }
      break;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1335
 *     rdDst[0].flags = 0
 * 
 *     if tdDst and tdSrc:             # <<<<<<<<<<<<<<
 *         memset(tdDst, 0, sizeof(tdDst[0]))
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1418
 *                 return cudaErrorInvalidNormSetting
 * 
 *     if rvdDst and rvdSrc:             # <<<<<<<<<<<<<<
 *         memset(rvdDst, 0, sizeof(rvdDst[0]))
 * 
 */
  __pyx_t_5 = (__pyx_v_rvdDst != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L27_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_rvdSrc != 0);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L27_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1419
 * 
 *     if rvdDst and rvdSrc:
 *         memset(rvdDst, 0, sizeof(rvdDst[0]))             # <<<<<<<<<<<<<<
 * 
 *         rvdDst[0].format           = <ccuda.CUresourceViewFormat>rvdSrc[0].format
 */
    (void)(memset(__pyx_v_rvdDst, 0, (sizeof((__pyx_v_rvdDst[0])))));

    /* "cuda/_lib/ccudart/utils.pyx":1421
 *         memset(rvdDst, 0, sizeof(rvdDst[0]))
 * 
 *         rvdDst[0].format           = <ccuda.CUresourceViewFormat>rvdSrc[0].format             # <<<<<<<<<<<<<<
 *         rvdDst[0].width            = rvdSrc[0].width
 *         rvdDst[0].height           = rvdSrc[0].height
 */
    (__pyx_v_rvdDst[0]).format = ((__pyx_t_4cuda_5ccuda_CUresourceViewFormat)(__pyx_v_rvdSrc[0]).format);

    /* "cuda/_lib/ccudart/utils.pyx":1422
 * 
 *         rvdDst[0].format           = <ccuda.CUresourceViewFormat>rvdSrc[0].format
 *         rvdDst[0].width            = rvdSrc[0].width             # <<<<<<<<<<<<<<
 *         rvdDst[0].height           = rvdSrc[0].height
 *         rvdDst[0].depth            = rvdSrc[0].depth
 */
    __pyx_t_4 = (__pyx_v_rvdSrc[0]).width;
    (__pyx_v_rvdDst[0]).width = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1423
 *         rvdDst[0].format           = <ccuda.CUresourceViewFormat>rvdSrc[0].format
 *         rvdDst[0].width            = rvdSrc[0].width
 *         rvdDst[0].height           = rvdSrc[0].height             # <<<<<<<<<<<<<<
 *         rvdDst[0].depth            = rvdSrc[0].depth
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel
 */
    __pyx_t_4 = (__pyx_v_rvdSrc[0]).height;
    (__pyx_v_rvdDst[0]).height = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1424
 *         rvdDst[0].width            = rvdSrc[0].width
 *         rvdDst[0].height           = rvdSrc[0].height
 *         rvdDst[0].depth            = rvdSrc[0].depth             # <<<<<<<<<<<<<<
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel
 */
    __pyx_t_4 = (__pyx_v_rvdSrc[0]).depth;
    (__pyx_v_rvdDst[0]).depth = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1425
 *         rvdDst[0].height           = rvdSrc[0].height
 *         rvdDst[0].depth            = rvdSrc[0].depth
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel             # <<<<<<<<<<<<<<
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel
 *         rvdDst[0].firstLayer       = rvdSrc[0].firstLayer
 */
    __pyx_t_7 = (__pyx_v_rvdSrc[0]).firstMipmapLevel;
    (__pyx_v_rvdDst[0]).firstMipmapLevel = __pyx_t_7;

    /* "cuda/_lib/ccudart/utils.pyx":1426
 *         rvdDst[0].depth            = rvdSrc[0].depth
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel             # <<<<<<<<<<<<<<
 *         rvdDst[0].firstLayer       = rvdSrc[0].firstLayer
 *         rvdDst[0].lastLayer        = rvdSrc[0].lastLayer
 */
    __pyx_t_7 = (__pyx_v_rvdSrc[0]).lastMipmapLevel;
    (__pyx_v_rvdDst[0]).lastMipmapLevel = __pyx_t_7;

    /* "cuda/_lib/ccudart/utils.pyx":1427
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel
 *         rvdDst[0].firstLayer       = rvdSrc[0].firstLayer             # <<<<<<<<<<<<<<
 *         rvdDst[0].lastLayer        = rvdSrc[0].lastLayer
 * 
 */
    __pyx_t_7 = (__pyx_v_rvdSrc[0]).firstLayer;
    (__pyx_v_rvdDst[0]).firstLayer = __pyx_t_7;

    /* "cuda/_lib/ccudart/utils.pyx":1428
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel
 *         rvdDst[0].firstLayer       = rvdSrc[0].firstLayer
 *         rvdDst[0].lastLayer        = rvdSrc[0].lastLayer             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
    __pyx_t_7 = (__pyx_v_rvdSrc[0]).lastLayer;
    (__pyx_v_rvdDst[0]).lastLayer = __pyx_t_7;

    /* "cuda/_lib/ccudart/utils.pyx":1418
 *                 return cudaErrorInvalidNormSetting
 * 
 *     if rvdDst and rvdSrc:             # <<<<<<<<<<<<<<
 *         memset(rvdDst, 0, sizeof(rvdDst[0]))
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1430
 *         rvdDst[0].lastLayer        = rvdSrc[0].lastLayer
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1282
 * 
 * 
 * cdef cudaError_t getDriverResDescFromResDesc(ccuda.CUDA_RESOURCE_DESC *rdDst, const cudaResourceDesc *rdSrc,             # <<<<<<<<<<<<<<
 *                                              ccuda.CUDA_TEXTURE_DESC *tdDst, const cudaTextureDesc *tdSrc,
 *                                              ccuda.CUDA_RESOURCE_VIEW_DESC *rvdDst, const cudaResourceViewDesc *rvdSrc) nogil except +:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.getDriverResDescFromResDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1433
 * 
 * 
 * cdef cudaError_t getResDescFromDriverResDesc(cudaResourceDesc *rdDst, const ccuda.CUDA_RESOURCE_DESC *rdSrc,             # <<<<<<<<<<<<<<
 *                                              cudaTextureDesc *tdDst, const ccuda.CUDA_TEXTURE_DESC *tdSrc,
 *                                              cudaResourceViewDesc *rvdDst, const ccuda.CUDA_RESOURCE_VIEW_DESC *rvdSrc) nogil except +:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getResDescFromDriverResDesc(struct __pyx_t_4cuda_7ccudart_cudaResourceDesc *__pyx_v_rdDst, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC const *__pyx_v_rdSrc, struct __pyx_t_4cuda_7ccudart_cudaTextureDesc *__pyx_v_tdDst, __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC const *__pyx_v_tdSrc, struct __pyx_t_4cuda_7ccudart_cudaResourceViewDesc *__pyx_v_rvdDst, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC const *__pyx_v_rvdSrc) {
  int __pyx_v_i;
  int __pyx_v_numChannels;
  __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_v_ad;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_v_hArray;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  size_t __pyx_t_4;
  __pyx_t_4cuda_5ccuda_CUarray_format __pyx_t_5;
  unsigned int __pyx_t_6;
  int __pyx_t_7;
  float __pyx_t_8;
  long __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("getResDescFromDriverResDesc", 1);
  __Pyx_TraceCall("getResDescFromDriverResDesc", __pyx_f[1], 1433, 1, __PYX_ERR(1, 1433, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1436
 *                                              cudaTextureDesc *tdDst, const ccuda.CUDA_TEXTURE_DESC *tdSrc,
 *                                              cudaResourceViewDesc *rvdDst, const ccuda.CUDA_RESOURCE_VIEW_DESC *rvdSrc) nogil except +:
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     cdef int numChannels = 0
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 */
  /*try:*/ {
    __pyx_v_i = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1437
 *                                              cudaResourceViewDesc *rvdDst, const ccuda.CUDA_RESOURCE_VIEW_DESC *rvdSrc) nogil except +:
 *     cdef int i = 0
 *     cdef int numChannels = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 *     cdef ccuda.CUarray hArray
 */
    __pyx_v_numChannels = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1441
 *     cdef ccuda.CUarray hArray
 * 
 *     memset(rdDst, 0, sizeof(rdDst[0]))             # <<<<<<<<<<<<<<
 * 
 *     if rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY:
 */
    (void)(memset(__pyx_v_rdDst, 0, (sizeof((__pyx_v_rdDst[0])))));

    /* "cuda/_lib/ccudart/utils.pyx":1443
 *     memset(rdDst, 0, sizeof(rdDst[0]))
 * 
 *     if rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType         = cudaResourceType.cudaResourceTypeArray
 *         rdDst[0].res.array.array = <cudaArray_t>rdSrc[0].res.array.hArray
 */
    __pyx_t_1 = (((__pyx_v_rdSrc[0]).resType == __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_ARRAY) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1444
 * 
 *     if rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY:
 *         rdDst[0].resType         = cudaResourceType.cudaResourceTypeArray             # <<<<<<<<<<<<<<
 *         rdDst[0].res.array.array = <cudaArray_t>rdSrc[0].res.array.hArray
 *         err = getFormat(rdDst[0].res.array.array, numChannels, &ad.Format)
 */
      (__pyx_v_rdDst[0]).resType = __pyx_e_4cuda_7ccudart_cudaResourceTypeArray;

      /* "cuda/_lib/ccudart/utils.pyx":1445
 *     if rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY:
 *         rdDst[0].resType         = cudaResourceType.cudaResourceTypeArray
 *         rdDst[0].res.array.array = <cudaArray_t>rdSrc[0].res.array.hArray             # <<<<<<<<<<<<<<
 *         err = getFormat(rdDst[0].res.array.array, numChannels, &ad.Format)
 *         if err != cudaSuccess:
 */
      (__pyx_v_rdDst[0]).res.array.array = ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_rdSrc[0]).res.array.hArray);

      /* "cuda/_lib/ccudart/utils.pyx":1446
 *         rdDst[0].resType         = cudaResourceType.cudaResourceTypeArray
 *         rdDst[0].res.array.array = <cudaArray_t>rdSrc[0].res.array.hArray
 *         err = getFormat(rdDst[0].res.array.array, numChannels, &ad.Format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
      try {
        __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat((__pyx_v_rdDst[0]).res.array.array, __pyx_v_numChannels, (&__pyx_v_ad.Format));
      } catch(...) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        __Pyx_CppExn2PyErr();
        #ifdef WITH_THREAD
        __Pyx_PyGILState_Release(__pyx_gilstate_save);
        #endif
        __PYX_ERR(1, 1446, __pyx_L4_error)
      }
      __pyx_v_err = __pyx_t_2;

      /* "cuda/_lib/ccudart/utils.pyx":1447
 *         rdDst[0].res.array.array = <cudaArray_t>rdSrc[0].res.array.hArray
 *         err = getFormat(rdDst[0].res.array.array, numChannels, &ad.Format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY:
 */
      __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1448
 *         err = getFormat(rdDst[0].res.array.array, numChannels, &ad.Format)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY:
 *         rdDst[0].resType = cudaResourceType.cudaResourceTypeMipmappedArray
 */
        __pyx_r = __pyx_v_err;
        goto __pyx_L3_return;

        /* "cuda/_lib/ccudart/utils.pyx":1447
 *         rdDst[0].res.array.array = <cudaArray_t>rdSrc[0].res.array.hArray
 *         err = getFormat(rdDst[0].res.array.array, numChannels, &ad.Format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY:
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1443
 *     memset(rdDst, 0, sizeof(rdDst[0]))
 * 
 *     if rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType         = cudaResourceType.cudaResourceTypeArray
 *         rdDst[0].res.array.array = <cudaArray_t>rdSrc[0].res.array.hArray
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1449
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType = cudaResourceType.cudaResourceTypeMipmappedArray
 *         rdDst[0].res.mipmap.mipmap = <cudaMipmappedArray_t>rdSrc[0].res.mipmap.hMipmappedArray
 */
    __pyx_t_1 = (((__pyx_v_rdSrc[0]).resType == __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1450
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY:
 *         rdDst[0].resType = cudaResourceType.cudaResourceTypeMipmappedArray             # <<<<<<<<<<<<<<
 *         rdDst[0].res.mipmap.mipmap = <cudaMipmappedArray_t>rdSrc[0].res.mipmap.hMipmappedArray
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdSrc[0].res.mipmap.hMipmappedArray, 0)
 */
      (__pyx_v_rdDst[0]).resType = __pyx_e_4cuda_7ccudart_cudaResourceTypeMipmappedArray;

      /* "cuda/_lib/ccudart/utils.pyx":1451
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY:
 *         rdDst[0].resType = cudaResourceType.cudaResourceTypeMipmappedArray
 *         rdDst[0].res.mipmap.mipmap = <cudaMipmappedArray_t>rdSrc[0].res.mipmap.hMipmappedArray             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdSrc[0].res.mipmap.hMipmappedArray, 0)
 *         if err != cudaSuccess:
 */
      (__pyx_v_rdDst[0]).res.mipmap.mipmap = ((__pyx_t_4cuda_7ccudart_cudaMipmappedArray_t)(__pyx_v_rdSrc[0]).res.mipmap.hMipmappedArray);

      /* "cuda/_lib/ccudart/utils.pyx":1452
 *         rdDst[0].resType = cudaResourceType.cudaResourceTypeMipmappedArray
 *         rdDst[0].res.mipmap.mipmap = <cudaMipmappedArray_t>rdSrc[0].res.mipmap.hMipmappedArray
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdSrc[0].res.mipmap.hMipmappedArray, 0)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
      __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel((&__pyx_v_hArray), (__pyx_v_rdSrc[0]).res.mipmap.hMipmappedArray, 0); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1452, __pyx_L4_error)
      __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

      /* "cuda/_lib/ccudart/utils.pyx":1453
 *         rdDst[0].res.mipmap.mipmap = <cudaMipmappedArray_t>rdSrc[0].res.mipmap.hMipmappedArray
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdSrc[0].res.mipmap.hMipmappedArray, 0)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &ad.Format)
 */
      __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1454
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdSrc[0].res.mipmap.hMipmappedArray, 0)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &ad.Format)
 *         if err != cudaSuccess:
 */
        __pyx_r = __pyx_v_err;
        goto __pyx_L3_return;

        /* "cuda/_lib/ccudart/utils.pyx":1453
 *         rdDst[0].res.mipmap.mipmap = <cudaMipmappedArray_t>rdSrc[0].res.mipmap.hMipmappedArray
 *         err = <cudaError_t>ccuda._cuMipmappedArrayGetLevel(&hArray, rdSrc[0].res.mipmap.hMipmappedArray, 0)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &ad.Format)
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1455
 *         if err != cudaSuccess:
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &ad.Format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
      try {
        __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat(((__pyx_t_4cuda_7ccudart_cudaArray_t)__pyx_v_hArray), __pyx_v_numChannels, (&__pyx_v_ad.Format));
      } catch(...) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        __Pyx_CppExn2PyErr();
        #ifdef WITH_THREAD
        __Pyx_PyGILState_Release(__pyx_gilstate_save);
        #endif
        __PYX_ERR(1, 1455, __pyx_L4_error)
      }
      __pyx_v_err = __pyx_t_2;

      /* "cuda/_lib/ccudart/utils.pyx":1456
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &ad.Format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR:
 */
      __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1457
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &ad.Format)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR:
 *         rdDst[0].resType                = cudaResourceType.cudaResourceTypeLinear
 */
        __pyx_r = __pyx_v_err;
        goto __pyx_L3_return;

        /* "cuda/_lib/ccudart/utils.pyx":1456
 *             return err
 *         err = getFormat(<cudaArray_t>hArray, numChannels, &ad.Format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR:
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1449
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType = cudaResourceType.cudaResourceTypeMipmappedArray
 *         rdDst[0].res.mipmap.mipmap = <cudaMipmappedArray_t>rdSrc[0].res.mipmap.hMipmappedArray
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1458
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                = cudaResourceType.cudaResourceTypeLinear
 *         rdDst[0].res.linear.devPtr      = <void *>rdSrc[0].res.linear.devPtr
 */
    __pyx_t_1 = (((__pyx_v_rdSrc[0]).resType == __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_LINEAR) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1459
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR:
 *         rdDst[0].resType                = cudaResourceType.cudaResourceTypeLinear             # <<<<<<<<<<<<<<
 *         rdDst[0].res.linear.devPtr      = <void *>rdSrc[0].res.linear.devPtr
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 */
      (__pyx_v_rdDst[0]).resType = __pyx_e_4cuda_7ccudart_cudaResourceTypeLinear;

      /* "cuda/_lib/ccudart/utils.pyx":1460
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR:
 *         rdDst[0].resType                = cudaResourceType.cudaResourceTypeLinear
 *         rdDst[0].res.linear.devPtr      = <void *>rdSrc[0].res.linear.devPtr             # <<<<<<<<<<<<<<
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 *         ad.Format      = rdSrc[0].res.linear.format
 */
      (__pyx_v_rdDst[0]).res.linear.devPtr = ((void *)(__pyx_v_rdSrc[0]).res.linear.devPtr);

      /* "cuda/_lib/ccudart/utils.pyx":1461
 *         rdDst[0].resType                = cudaResourceType.cudaResourceTypeLinear
 *         rdDst[0].res.linear.devPtr      = <void *>rdSrc[0].res.linear.devPtr
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes             # <<<<<<<<<<<<<<
 *         ad.Format      = rdSrc[0].res.linear.format
 *         ad.NumChannels = rdSrc[0].res.linear.numChannels
 */
      __pyx_t_4 = (__pyx_v_rdSrc[0]).res.linear.sizeInBytes;
      (__pyx_v_rdDst[0]).res.linear.sizeInBytes = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":1462
 *         rdDst[0].res.linear.devPtr      = <void *>rdSrc[0].res.linear.devPtr
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 *         ad.Format      = rdSrc[0].res.linear.format             # <<<<<<<<<<<<<<
 *         ad.NumChannels = rdSrc[0].res.linear.numChannels
 *         err = getChannelFormatDescFromDriverDesc(&rdDst[0].res.linear.desc,
 */
      __pyx_t_5 = (__pyx_v_rdSrc[0]).res.linear.format;
      __pyx_v_ad.Format = __pyx_t_5;

      /* "cuda/_lib/ccudart/utils.pyx":1463
 *         rdDst[0].res.linear.sizeInBytes = rdSrc[0].res.linear.sizeInBytes
 *         ad.Format      = rdSrc[0].res.linear.format
 *         ad.NumChannels = rdSrc[0].res.linear.numChannels             # <<<<<<<<<<<<<<
 *         err = getChannelFormatDescFromDriverDesc(&rdDst[0].res.linear.desc,
 *                                                  NULL, NULL, NULL,
 */
      __pyx_t_6 = (__pyx_v_rdSrc[0]).res.linear.numChannels;
      __pyx_v_ad.NumChannels = __pyx_t_6;

      /* "cuda/_lib/ccudart/utils.pyx":1464
 *         ad.Format      = rdSrc[0].res.linear.format
 *         ad.NumChannels = rdSrc[0].res.linear.numChannels
 *         err = getChannelFormatDescFromDriverDesc(&rdDst[0].res.linear.desc,             # <<<<<<<<<<<<<<
 *                                                  NULL, NULL, NULL,
 *                                                  &ad)
 */
      try {
        __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelFormatDescFromDriverDesc((&(__pyx_v_rdDst[0]).res.linear.desc), NULL, NULL, NULL, (&__pyx_v_ad));
      } catch(...) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        __Pyx_CppExn2PyErr();
        #ifdef WITH_THREAD
        __Pyx_PyGILState_Release(__pyx_gilstate_save);
        #endif
        __PYX_ERR(1, 1464, __pyx_L4_error)
      }
      __pyx_v_err = __pyx_t_2;

      /* "cuda/_lib/ccudart/utils.pyx":1467
 *                                                  NULL, NULL, NULL,
 *                                                  &ad)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D:
 */
      __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1468
 *                                                  &ad)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D:
 *         rdDst[0].resType                  = cudaResourceType.cudaResourceTypePitch2D
 */
        __pyx_r = __pyx_v_err;
        goto __pyx_L3_return;

        /* "cuda/_lib/ccudart/utils.pyx":1467
 *                                                  NULL, NULL, NULL,
 *                                                  &ad)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D:
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1458
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                = cudaResourceType.cudaResourceTypeLinear
 *         rdDst[0].res.linear.devPtr      = <void *>rdSrc[0].res.linear.devPtr
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1469
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                  = cudaResourceType.cudaResourceTypePitch2D
 *         rdDst[0].res.pitch2D.devPtr       = <void *>rdSrc[0].res.pitch2D.devPtr
 */
    __pyx_t_1 = (((__pyx_v_rdSrc[0]).resType == __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_PITCH2D) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1470
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D:
 *         rdDst[0].resType                  = cudaResourceType.cudaResourceTypePitch2D             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.devPtr       = <void *>rdSrc[0].res.pitch2D.devPtr
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes
 */
      (__pyx_v_rdDst[0]).resType = __pyx_e_4cuda_7ccudart_cudaResourceTypePitch2D;

      /* "cuda/_lib/ccudart/utils.pyx":1471
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D:
 *         rdDst[0].resType                  = cudaResourceType.cudaResourceTypePitch2D
 *         rdDst[0].res.pitch2D.devPtr       = <void *>rdSrc[0].res.pitch2D.devPtr             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width
 */
      (__pyx_v_rdDst[0]).res.pitch2D.devPtr = ((void *)(__pyx_v_rdSrc[0]).res.pitch2D.devPtr);

      /* "cuda/_lib/ccudart/utils.pyx":1472
 *         rdDst[0].resType                  = cudaResourceType.cudaResourceTypePitch2D
 *         rdDst[0].res.pitch2D.devPtr       = <void *>rdSrc[0].res.pitch2D.devPtr
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 */
      __pyx_t_4 = (__pyx_v_rdSrc[0]).res.pitch2D.pitchInBytes;
      (__pyx_v_rdDst[0]).res.pitch2D.pitchInBytes = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":1473
 *         rdDst[0].res.pitch2D.devPtr       = <void *>rdSrc[0].res.pitch2D.devPtr
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width             # <<<<<<<<<<<<<<
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 *         ad.Format      = rdSrc[0].res.linear.format
 */
      __pyx_t_4 = (__pyx_v_rdSrc[0]).res.pitch2D.width;
      (__pyx_v_rdDst[0]).res.pitch2D.width = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":1474
 *         rdDst[0].res.pitch2D.pitchInBytes = rdSrc[0].res.pitch2D.pitchInBytes
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height             # <<<<<<<<<<<<<<
 *         ad.Format      = rdSrc[0].res.linear.format
 *         ad.NumChannels = rdSrc[0].res.linear.numChannels
 */
      __pyx_t_4 = (__pyx_v_rdSrc[0]).res.pitch2D.height;
      (__pyx_v_rdDst[0]).res.pitch2D.height = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":1475
 *         rdDst[0].res.pitch2D.width        = rdSrc[0].res.pitch2D.width
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 *         ad.Format      = rdSrc[0].res.linear.format             # <<<<<<<<<<<<<<
 *         ad.NumChannels = rdSrc[0].res.linear.numChannels
 *         err = getChannelFormatDescFromDriverDesc(&rdDst[0].res.linear.desc,
 */
      __pyx_t_5 = (__pyx_v_rdSrc[0]).res.linear.format;
      __pyx_v_ad.Format = __pyx_t_5;

      /* "cuda/_lib/ccudart/utils.pyx":1476
 *         rdDst[0].res.pitch2D.height       = rdSrc[0].res.pitch2D.height
 *         ad.Format      = rdSrc[0].res.linear.format
 *         ad.NumChannels = rdSrc[0].res.linear.numChannels             # <<<<<<<<<<<<<<
 *         err = getChannelFormatDescFromDriverDesc(&rdDst[0].res.linear.desc,
 *                                                 NULL, NULL, NULL,
 */
      __pyx_t_6 = (__pyx_v_rdSrc[0]).res.linear.numChannels;
      __pyx_v_ad.NumChannels = __pyx_t_6;

      /* "cuda/_lib/ccudart/utils.pyx":1477
 *         ad.Format      = rdSrc[0].res.linear.format
 *         ad.NumChannels = rdSrc[0].res.linear.numChannels
 *         err = getChannelFormatDescFromDriverDesc(&rdDst[0].res.linear.desc,             # <<<<<<<<<<<<<<
 *                                                 NULL, NULL, NULL,
 *                                                 &ad)
 */
      try {
        __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelFormatDescFromDriverDesc((&(__pyx_v_rdDst[0]).res.linear.desc), NULL, NULL, NULL, (&__pyx_v_ad));
      } catch(...) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        __Pyx_CppExn2PyErr();
        #ifdef WITH_THREAD
        __Pyx_PyGILState_Release(__pyx_gilstate_save);
        #endif
        __PYX_ERR(1, 1477, __pyx_L4_error)
      }
      __pyx_v_err = __pyx_t_2;

      /* "cuda/_lib/ccudart/utils.pyx":1480
 *                                                 NULL, NULL, NULL,
 *                                                 &ad)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     else:
 */
      __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1481
 *                                                 &ad)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidValue
 */
        __pyx_r = __pyx_v_err;
        goto __pyx_L3_return;

        /* "cuda/_lib/ccudart/utils.pyx":1480
 *                                                 NULL, NULL, NULL,
 *                                                 &ad)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     else:
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":1469
 *         if err != cudaSuccess:
 *             return err
 *     elif rdSrc[0].resType == ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D:             # <<<<<<<<<<<<<<
 *         rdDst[0].resType                  = cudaResourceType.cudaResourceTypePitch2D
 *         rdDst[0].res.pitch2D.devPtr       = <void *>rdSrc[0].res.pitch2D.devPtr
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":1483
 *             return err
 *     else:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     if tdDst and tdSrc:
 */
    /*else*/ {
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
      goto __pyx_L3_return;
    }
    __pyx_L6:;

    /* "cuda/_lib/ccudart/utils.pyx":1485
 *         return cudaErrorInvalidValue
 * 
 *     if tdDst and tdSrc:             # <<<<<<<<<<<<<<
 *         memset(tdDst, 0, sizeof(tdDst[0]))
 *         i = 0
 */
    __pyx_t_7 = (__pyx_v_tdDst != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_1 = __pyx_t_7;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_tdSrc != 0);
    __pyx_t_1 = __pyx_t_7;
    __pyx_L13_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1486
 * 
 *     if tdDst and tdSrc:
 *         memset(tdDst, 0, sizeof(tdDst[0]))             # <<<<<<<<<<<<<<
 *         i = 0
 *         while i < 3:
 */
      (void)(memset(__pyx_v_tdDst, 0, (sizeof((__pyx_v_tdDst[0])))));

      /* "cuda/_lib/ccudart/utils.pyx":1487
 *     if tdDst and tdSrc:
 *         memset(tdDst, 0, sizeof(tdDst[0]))
 *         i = 0             # <<<<<<<<<<<<<<
 *         while i < 3:
 *             tdDst[0].addressMode[i] = <cudaTextureAddressMode>tdSrc[0].addressMode[i]
 */
      __pyx_v_i = 0;

      /* "cuda/_lib/ccudart/utils.pyx":1488
 *         memset(tdDst, 0, sizeof(tdDst[0]))
 *         i = 0
 *         while i < 3:             # <<<<<<<<<<<<<<
 *             tdDst[0].addressMode[i] = <cudaTextureAddressMode>tdSrc[0].addressMode[i]
 *             i += 1
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_i < 3) != 0);
        if (!__pyx_t_1) break;

        /* "cuda/_lib/ccudart/utils.pyx":1489
 *         i = 0
 *         while i < 3:
 *             tdDst[0].addressMode[i] = <cudaTextureAddressMode>tdSrc[0].addressMode[i]             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
        ((__pyx_v_tdDst[0]).addressMode[__pyx_v_i]) = ((enum __pyx_t_4cuda_7ccudart_cudaTextureAddressMode)((__pyx_v_tdSrc[0]).addressMode[__pyx_v_i]));

        /* "cuda/_lib/ccudart/utils.pyx":1490
 *         while i < 3:
 *             tdDst[0].addressMode[i] = <cudaTextureAddressMode>tdSrc[0].addressMode[i]
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         tdDst[0].filterMode          = <cudaTextureFilterMode>tdSrc[0].filterMode
 */
        __pyx_v_i = (__pyx_v_i + 1);
      }

      /* "cuda/_lib/ccudart/utils.pyx":1492
 *             i += 1
 * 
 *         tdDst[0].filterMode          = <cudaTextureFilterMode>tdSrc[0].filterMode             # <<<<<<<<<<<<<<
 *         tdDst[0].mipmapFilterMode    = <cudaTextureFilterMode>tdSrc[0].mipmapFilterMode
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias
 */
      (__pyx_v_tdDst[0]).filterMode = ((enum __pyx_t_4cuda_7ccudart_cudaTextureFilterMode)(__pyx_v_tdSrc[0]).filterMode);

      /* "cuda/_lib/ccudart/utils.pyx":1493
 * 
 *         tdDst[0].filterMode          = <cudaTextureFilterMode>tdSrc[0].filterMode
 *         tdDst[0].mipmapFilterMode    = <cudaTextureFilterMode>tdSrc[0].mipmapFilterMode             # <<<<<<<<<<<<<<
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp
 */
      (__pyx_v_tdDst[0]).mipmapFilterMode = ((enum __pyx_t_4cuda_7ccudart_cudaTextureFilterMode)(__pyx_v_tdSrc[0]).mipmapFilterMode);

      /* "cuda/_lib/ccudart/utils.pyx":1494
 *         tdDst[0].filterMode          = <cudaTextureFilterMode>tdSrc[0].filterMode
 *         tdDst[0].mipmapFilterMode    = <cudaTextureFilterMode>tdSrc[0].mipmapFilterMode
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias             # <<<<<<<<<<<<<<
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp
 */
      __pyx_t_8 = (__pyx_v_tdSrc[0]).mipmapLevelBias;
      (__pyx_v_tdDst[0]).mipmapLevelBias = __pyx_t_8;

      /* "cuda/_lib/ccudart/utils.pyx":1495
 *         tdDst[0].mipmapFilterMode    = <cudaTextureFilterMode>tdSrc[0].mipmapFilterMode
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp             # <<<<<<<<<<<<<<
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy
 */
      __pyx_t_8 = (__pyx_v_tdSrc[0]).minMipmapLevelClamp;
      (__pyx_v_tdDst[0]).minMipmapLevelClamp = __pyx_t_8;

      /* "cuda/_lib/ccudart/utils.pyx":1496
 *         tdDst[0].mipmapLevelBias     = tdSrc[0].mipmapLevelBias
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp             # <<<<<<<<<<<<<<
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy
 *         i = 0
 */
      __pyx_t_8 = (__pyx_v_tdSrc[0]).maxMipmapLevelClamp;
      (__pyx_v_tdDst[0]).maxMipmapLevelClamp = __pyx_t_8;

      /* "cuda/_lib/ccudart/utils.pyx":1497
 *         tdDst[0].minMipmapLevelClamp = tdSrc[0].minMipmapLevelClamp
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy             # <<<<<<<<<<<<<<
 *         i = 0
 *         while i < 4:
 */
      __pyx_t_6 = (__pyx_v_tdSrc[0]).maxAnisotropy;
      (__pyx_v_tdDst[0]).maxAnisotropy = __pyx_t_6;

      /* "cuda/_lib/ccudart/utils.pyx":1498
 *         tdDst[0].maxMipmapLevelClamp = tdSrc[0].maxMipmapLevelClamp
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy
 *         i = 0             # <<<<<<<<<<<<<<
 *         while i < 4:
 *             tdDst[0].borderColor[i] = tdSrc[0].borderColor[i]
 */
      __pyx_v_i = 0;

      /* "cuda/_lib/ccudart/utils.pyx":1499
 *         tdDst[0].maxAnisotropy       = tdSrc[0].maxAnisotropy
 *         i = 0
 *         while i < 4:             # <<<<<<<<<<<<<<
 *             tdDst[0].borderColor[i] = tdSrc[0].borderColor[i]
 *             i += 1
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_i < 4) != 0);
        if (!__pyx_t_1) break;

        /* "cuda/_lib/ccudart/utils.pyx":1500
 *         i = 0
 *         while i < 4:
 *             tdDst[0].borderColor[i] = tdSrc[0].borderColor[i]             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
        ((__pyx_v_tdDst[0]).borderColor[__pyx_v_i]) = ((__pyx_v_tdSrc[0]).borderColor[__pyx_v_i]);

        /* "cuda/_lib/ccudart/utils.pyx":1501
 *         while i < 4:
 *             tdDst[0].borderColor[i] = tdSrc[0].borderColor[i]
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_SRGB:
 */
        __pyx_v_i = (__pyx_v_i + 1);
      }

      /* "cuda/_lib/ccudart/utils.pyx":1503
 *             i += 1
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_SRGB:             # <<<<<<<<<<<<<<
 *             tdDst[0].sRGB                         = 1
 *         else:
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).flags & __pyx_e_4cuda_5ccuda_CU_TRSF_SRGB) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1504
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_SRGB:
 *             tdDst[0].sRGB                         = 1             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].sRGB                         = 0
 */
        (__pyx_v_tdDst[0]).sRGB = 1;

        /* "cuda/_lib/ccudart/utils.pyx":1503
 *             i += 1
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_SRGB:             # <<<<<<<<<<<<<<
 *             tdDst[0].sRGB                         = 1
 *         else:
 */
        goto __pyx_L19;
      }

      /* "cuda/_lib/ccudart/utils.pyx":1506
 *             tdDst[0].sRGB                         = 1
 *         else:
 *             tdDst[0].sRGB                         = 0             # <<<<<<<<<<<<<<
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_NORMALIZED_COORDINATES:
 */
      /*else*/ {
        (__pyx_v_tdDst[0]).sRGB = 0;
      }
      __pyx_L19:;

      /* "cuda/_lib/ccudart/utils.pyx":1508
 *             tdDst[0].sRGB                         = 0
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_NORMALIZED_COORDINATES:             # <<<<<<<<<<<<<<
 *             tdDst[0].normalizedCoords             = 1
 *         else:
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).flags & __pyx_e_4cuda_5ccuda_CU_TRSF_NORMALIZED_COORDINATES) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1509
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_NORMALIZED_COORDINATES:
 *             tdDst[0].normalizedCoords             = 1             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].normalizedCoords             = 0
 */
        (__pyx_v_tdDst[0]).normalizedCoords = 1;

        /* "cuda/_lib/ccudart/utils.pyx":1508
 *             tdDst[0].sRGB                         = 0
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_NORMALIZED_COORDINATES:             # <<<<<<<<<<<<<<
 *             tdDst[0].normalizedCoords             = 1
 *         else:
 */
        goto __pyx_L20;
      }

      /* "cuda/_lib/ccudart/utils.pyx":1511
 *             tdDst[0].normalizedCoords             = 1
 *         else:
 *             tdDst[0].normalizedCoords             = 0             # <<<<<<<<<<<<<<
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION:
 */
      /*else*/ {
        (__pyx_v_tdDst[0]).normalizedCoords = 0;
      }
      __pyx_L20:;

      /* "cuda/_lib/ccudart/utils.pyx":1513
 *             tdDst[0].normalizedCoords             = 0
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION:             # <<<<<<<<<<<<<<
 *             tdDst[0].disableTrilinearOptimization = 1
 *         else:
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).flags & __pyx_e_4cuda_5ccuda_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1514
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION:
 *             tdDst[0].disableTrilinearOptimization = 1             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].disableTrilinearOptimization = 0
 */
        (__pyx_v_tdDst[0]).disableTrilinearOptimization = 1;

        /* "cuda/_lib/ccudart/utils.pyx":1513
 *             tdDst[0].normalizedCoords             = 0
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION:             # <<<<<<<<<<<<<<
 *             tdDst[0].disableTrilinearOptimization = 1
 *         else:
 */
        goto __pyx_L21;
      }

      /* "cuda/_lib/ccudart/utils.pyx":1516
 *             tdDst[0].disableTrilinearOptimization = 1
 *         else:
 *             tdDst[0].disableTrilinearOptimization = 0             # <<<<<<<<<<<<<<
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_SEAMLESS_CUBEMAP:
 */
      /*else*/ {
        (__pyx_v_tdDst[0]).disableTrilinearOptimization = 0;
      }
      __pyx_L21:;

      /* "cuda/_lib/ccudart/utils.pyx":1518
 *             tdDst[0].disableTrilinearOptimization = 0
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_SEAMLESS_CUBEMAP:             # <<<<<<<<<<<<<<
 *             tdDst[0].seamlessCubemap |= 1
 *         else:
 */
      __pyx_t_1 = (((__pyx_v_tdSrc[0]).flags & __pyx_e_4cuda_5ccuda_CU_TRSF_SEAMLESS_CUBEMAP) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":1519
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_SEAMLESS_CUBEMAP:
 *             tdDst[0].seamlessCubemap |= 1             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].seamlessCubemap |= 0
 */
        __pyx_t_9 = 0;
        (__pyx_v_tdDst[__pyx_t_9]).seamlessCubemap = ((__pyx_v_tdDst[__pyx_t_9]).seamlessCubemap | 1);

        /* "cuda/_lib/ccudart/utils.pyx":1518
 *             tdDst[0].disableTrilinearOptimization = 0
 * 
 *         if tdSrc[0].flags & ccuda.CU_TRSF_SEAMLESS_CUBEMAP:             # <<<<<<<<<<<<<<
 *             tdDst[0].seamlessCubemap |= 1
 *         else:
 */
        goto __pyx_L22;
      }

      /* "cuda/_lib/ccudart/utils.pyx":1521
 *             tdDst[0].seamlessCubemap |= 1
 *         else:
 *             tdDst[0].seamlessCubemap |= 0             # <<<<<<<<<<<<<<
 * 
 *         if ad.Format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 */
      /*else*/ {
        __pyx_t_9 = 0;
        (__pyx_v_tdDst[__pyx_t_9]).seamlessCubemap = ((__pyx_v_tdDst[__pyx_t_9]).seamlessCubemap | 0);
      }
      __pyx_L22:;

      /* "cuda/_lib/ccudart/utils.pyx":1523
 *             tdDst[0].seamlessCubemap |= 0
 * 
 *         if ad.Format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 */
      switch (__pyx_v_ad.Format) {
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X1:
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X2:

        /* "cuda/_lib/ccudart/utils.pyx":1524
 * 
 *         if ad.Format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT8X4:

        /* "cuda/_lib/ccudart/utils.pyx":1525
 *         if ad.Format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X1:

        /* "cuda/_lib/ccudart/utils.pyx":1526
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X2:

        /* "cuda/_lib/ccudart/utils.pyx":1527
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X2,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT8X4:

        /* "cuda/_lib/ccudart/utils.pyx":1528
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X1,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X4,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X1:

        /* "cuda/_lib/ccudart/utils.pyx":1529
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X2,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X1,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X2:

        /* "cuda/_lib/ccudart/utils.pyx":1530
 *                          ccuda.CU_AD_FORMAT_UNORM_INT8X4,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X2,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SNORM_INT16X4:

        /* "cuda/_lib/ccudart/utils.pyx":1531
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X1,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X4,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X1:

        /* "cuda/_lib/ccudart/utils.pyx":1532
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X2,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X1,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X4,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X2:

        /* "cuda/_lib/ccudart/utils.pyx":1533
 *                          ccuda.CU_AD_FORMAT_SNORM_INT16X4,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X2,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X4,
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNORM_INT16X4:

        /* "cuda/_lib/ccudart/utils.pyx":1534
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X1,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X4,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM:

        /* "cuda/_lib/ccudart/utils.pyx":1535
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X2,
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X4,
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC1_UNORM_SRGB:

        /* "cuda/_lib/ccudart/utils.pyx":1536
 *                          ccuda.CU_AD_FORMAT_UNORM_INT16X4,
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM:

        /* "cuda/_lib/ccudart/utils.pyx":1537
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC2_UNORM_SRGB:

        /* "cuda/_lib/ccudart/utils.pyx":1538
 *                          ccuda.CU_AD_FORMAT_BC1_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM:

        /* "cuda/_lib/ccudart/utils.pyx":1539
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC4_UNORM,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC3_UNORM_SRGB:

        /* "cuda/_lib/ccudart/utils.pyx":1540
 *                          ccuda.CU_AD_FORMAT_BC2_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC4_SNORM,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_UNORM:

        /* "cuda/_lib/ccudart/utils.pyx":1541
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC4_UNORM,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                          ccuda.CU_AD_FORMAT_BC5_UNORM,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC4_SNORM:

        /* "cuda/_lib/ccudart/utils.pyx":1542
 *                          ccuda.CU_AD_FORMAT_BC3_UNORM_SRGB,
 *                          ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC4_SNORM,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC5_SNORM,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_UNORM:

        /* "cuda/_lib/ccudart/utils.pyx":1543
 *                          ccuda.CU_AD_FORMAT_BC4_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                          ccuda.CU_AD_FORMAT_BC5_UNORM,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC5_SNORM:

        /* "cuda/_lib/ccudart/utils.pyx":1544
 *                          ccuda.CU_AD_FORMAT_BC4_SNORM,
 *                          ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC5_SNORM,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM:

        /* "cuda/_lib/ccudart/utils.pyx":1545
 *                          ccuda.CU_AD_FORMAT_BC5_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC5_SNORM,
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeNormalizedFloat
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_BC7_UNORM_SRGB:

        /* "cuda/_lib/ccudart/utils.pyx":1547
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM,
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeNormalizedFloat             # <<<<<<<<<<<<<<
 *         elif ad.Format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                            ccuda.CU_AD_FORMAT_SIGNED_INT16,
 */
        (__pyx_v_tdDst[0]).readMode = __pyx_e_4cuda_7ccudart_cudaReadModeNormalizedFloat;

        /* "cuda/_lib/ccudart/utils.pyx":1523
 *             tdDst[0].seamlessCubemap |= 0
 * 
 *         if ad.Format in (ccuda.CU_AD_FORMAT_SNORM_INT8X1,             # <<<<<<<<<<<<<<
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X2,
 *                          ccuda.CU_AD_FORMAT_SNORM_INT8X4,
 */
        break;
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8:

        /* "cuda/_lib/ccudart/utils.pyx":1548
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeNormalizedFloat
 *         elif ad.Format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,             # <<<<<<<<<<<<<<
 *                            ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16:

        /* "cuda/_lib/ccudart/utils.pyx":1549
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeNormalizedFloat
 *         elif ad.Format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                            ccuda.CU_AD_FORMAT_SIGNED_INT16,             # <<<<<<<<<<<<<<
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8:

        /* "cuda/_lib/ccudart/utils.pyx":1550
 *         elif ad.Format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,
 *                            ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT8,             # <<<<<<<<<<<<<<
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             with gil:
 */
        case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16:

        /* "cuda/_lib/ccudart/utils.pyx":1552
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             with gil:             # <<<<<<<<<<<<<<
 *                 if (tdSrc[0].flags & ccuda.CU_TRSF_READ_AS_INTEGER):
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType
 */
        {
            #ifdef WITH_THREAD
            PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
            #endif
            /*try:*/ {

              /* "cuda/_lib/ccudart/utils.pyx":1553
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             with gil:
 *                 if (tdSrc[0].flags & ccuda.CU_TRSF_READ_AS_INTEGER):             # <<<<<<<<<<<<<<
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType
 *                 else:
 */
              __pyx_t_1 = (((__pyx_v_tdSrc[0]).flags & __pyx_e_4cuda_5ccuda_CU_TRSF_READ_AS_INTEGER) != 0);
              if (__pyx_t_1) {

                /* "cuda/_lib/ccudart/utils.pyx":1554
 *             with gil:
 *                 if (tdSrc[0].flags & ccuda.CU_TRSF_READ_AS_INTEGER):
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType             # <<<<<<<<<<<<<<
 *                 else:
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeNormalizedFloat
 */
                (__pyx_v_tdDst[0]).readMode = __pyx_e_4cuda_7ccudart_cudaReadModeElementType;

                /* "cuda/_lib/ccudart/utils.pyx":1553
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             with gil:
 *                 if (tdSrc[0].flags & ccuda.CU_TRSF_READ_AS_INTEGER):             # <<<<<<<<<<<<<<
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType
 *                 else:
 */
                goto __pyx_L26;
              }

              /* "cuda/_lib/ccudart/utils.pyx":1556
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType
 *                 else:
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeNormalizedFloat             # <<<<<<<<<<<<<<
 *         else:
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType
 */
              /*else*/ {
                (__pyx_v_tdDst[0]).readMode = __pyx_e_4cuda_7ccudart_cudaReadModeNormalizedFloat;
              }
              __pyx_L26:;
            }

            /* "cuda/_lib/ccudart/utils.pyx":1552
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *             with gil:             # <<<<<<<<<<<<<<
 *                 if (tdSrc[0].flags & ccuda.CU_TRSF_READ_AS_INTEGER):
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType
 */
            /*finally:*/ {
              /*normal exit:*/{
                #ifdef WITH_THREAD
                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                #endif
                goto __pyx_L25;
              }
              __pyx_L25:;
            }
        }

        /* "cuda/_lib/ccudart/utils.pyx":1548
 *                          ccuda.CU_AD_FORMAT_BC7_UNORM_SRGB):
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeNormalizedFloat
 *         elif ad.Format in (ccuda.CU_AD_FORMAT_SIGNED_INT8,             # <<<<<<<<<<<<<<
 *                            ccuda.CU_AD_FORMAT_SIGNED_INT16,
 *                            ccuda.CU_AD_FORMAT_UNSIGNED_INT8,
 */
        break;
        default:

        /* "cuda/_lib/ccudart/utils.pyx":1558
 *                     tdDst[0].readMode = cudaTextureReadMode.cudaReadModeNormalizedFloat
 *         else:
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType             # <<<<<<<<<<<<<<
 * 
 *     if rvdDst and rvdSrc:
 */
        (__pyx_v_tdDst[0]).readMode = __pyx_e_4cuda_7ccudart_cudaReadModeElementType;
        break;
      }

      /* "cuda/_lib/ccudart/utils.pyx":1485
 *         return cudaErrorInvalidValue
 * 
 *     if tdDst and tdSrc:             # <<<<<<<<<<<<<<
 *         memset(tdDst, 0, sizeof(tdDst[0]))
 *         i = 0
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1560
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType
 * 
 *     if rvdDst and rvdSrc:             # <<<<<<<<<<<<<<
 *         memset(rvdDst, 0, sizeof(rvdDst[0]))
 * 
 */
    __pyx_t_7 = (__pyx_v_rvdDst != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_1 = __pyx_t_7;
      goto __pyx_L28_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_rvdSrc != 0);
    __pyx_t_1 = __pyx_t_7;
    __pyx_L28_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1561
 * 
 *     if rvdDst and rvdSrc:
 *         memset(rvdDst, 0, sizeof(rvdDst[0]))             # <<<<<<<<<<<<<<
 * 
 *         rvdDst[0].format           = <cudaResourceViewFormat>rvdSrc[0].format
 */
      (void)(memset(__pyx_v_rvdDst, 0, (sizeof((__pyx_v_rvdDst[0])))));

      /* "cuda/_lib/ccudart/utils.pyx":1563
 *         memset(rvdDst, 0, sizeof(rvdDst[0]))
 * 
 *         rvdDst[0].format           = <cudaResourceViewFormat>rvdSrc[0].format             # <<<<<<<<<<<<<<
 *         rvdDst[0].width            = rvdSrc[0].width
 *         rvdDst[0].height           = rvdSrc[0].height
 */
      (__pyx_v_rvdDst[0]).format = ((enum __pyx_t_4cuda_7ccudart_cudaResourceViewFormat)(__pyx_v_rvdSrc[0]).format);

      /* "cuda/_lib/ccudart/utils.pyx":1564
 * 
 *         rvdDst[0].format           = <cudaResourceViewFormat>rvdSrc[0].format
 *         rvdDst[0].width            = rvdSrc[0].width             # <<<<<<<<<<<<<<
 *         rvdDst[0].height           = rvdSrc[0].height
 *         rvdDst[0].depth            = rvdSrc[0].depth
 */
      __pyx_t_4 = (__pyx_v_rvdSrc[0]).width;
      (__pyx_v_rvdDst[0]).width = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":1565
 *         rvdDst[0].format           = <cudaResourceViewFormat>rvdSrc[0].format
 *         rvdDst[0].width            = rvdSrc[0].width
 *         rvdDst[0].height           = rvdSrc[0].height             # <<<<<<<<<<<<<<
 *         rvdDst[0].depth            = rvdSrc[0].depth
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel
 */
      __pyx_t_4 = (__pyx_v_rvdSrc[0]).height;
      (__pyx_v_rvdDst[0]).height = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":1566
 *         rvdDst[0].width            = rvdSrc[0].width
 *         rvdDst[0].height           = rvdSrc[0].height
 *         rvdDst[0].depth            = rvdSrc[0].depth             # <<<<<<<<<<<<<<
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel
 */
      __pyx_t_4 = (__pyx_v_rvdSrc[0]).depth;
      (__pyx_v_rvdDst[0]).depth = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":1567
 *         rvdDst[0].height           = rvdSrc[0].height
 *         rvdDst[0].depth            = rvdSrc[0].depth
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel             # <<<<<<<<<<<<<<
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel
 *         rvdDst[0].firstLayer       = rvdSrc[0].firstLayer
 */
      __pyx_t_6 = (__pyx_v_rvdSrc[0]).firstMipmapLevel;
      (__pyx_v_rvdDst[0]).firstMipmapLevel = __pyx_t_6;

      /* "cuda/_lib/ccudart/utils.pyx":1568
 *         rvdDst[0].depth            = rvdSrc[0].depth
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel             # <<<<<<<<<<<<<<
 *         rvdDst[0].firstLayer       = rvdSrc[0].firstLayer
 *         rvdDst[0].lastLayer        = rvdSrc[0].lastLayer
 */
      __pyx_t_6 = (__pyx_v_rvdSrc[0]).lastMipmapLevel;
      (__pyx_v_rvdDst[0]).lastMipmapLevel = __pyx_t_6;

      /* "cuda/_lib/ccudart/utils.pyx":1569
 *         rvdDst[0].firstMipmapLevel = rvdSrc[0].firstMipmapLevel
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel
 *         rvdDst[0].firstLayer       = rvdSrc[0].firstLayer             # <<<<<<<<<<<<<<
 *         rvdDst[0].lastLayer        = rvdSrc[0].lastLayer
 * 
 */
      __pyx_t_6 = (__pyx_v_rvdSrc[0]).firstLayer;
      (__pyx_v_rvdDst[0]).firstLayer = __pyx_t_6;

      /* "cuda/_lib/ccudart/utils.pyx":1570
 *         rvdDst[0].lastMipmapLevel  = rvdSrc[0].lastMipmapLevel
 *         rvdDst[0].firstLayer       = rvdSrc[0].firstLayer
 *         rvdDst[0].lastLayer        = rvdSrc[0].lastLayer             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
      __pyx_t_6 = (__pyx_v_rvdSrc[0]).lastLayer;
      (__pyx_v_rvdDst[0]).lastLayer = __pyx_t_6;

      /* "cuda/_lib/ccudart/utils.pyx":1560
 *             tdDst[0].readMode = cudaTextureReadMode.cudaReadModeElementType
 * 
 *     if rvdDst and rvdSrc:             # <<<<<<<<<<<<<<
 *         memset(rvdDst, 0, sizeof(rvdDst[0]))
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1572
 *         rvdDst[0].lastLayer        = rvdSrc[0].lastLayer
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L3_return;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1436
 *                                              cudaTextureDesc *tdDst, const ccuda.CUDA_TEXTURE_DESC *tdSrc,
 *                                              cudaResourceViewDesc *rvdDst, const ccuda.CUDA_RESOURCE_VIEW_DESC *rvdSrc) nogil except +:
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     cdef int numChannels = 0
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_lib/ccudart/utils.pyx":1433
 * 
 * 
 * cdef cudaError_t getResDescFromDriverResDesc(cudaResourceDesc *rdDst, const ccuda.CUDA_RESOURCE_DESC *rdSrc,             # <<<<<<<<<<<<<<
 *                                              cudaTextureDesc *tdDst, const ccuda.CUDA_TEXTURE_DESC *tdSrc,
 *                                              cudaResourceViewDesc *rvdDst, const ccuda.CUDA_RESOURCE_VIEW_DESC *rvdSrc) nogil except +:
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda._lib.ccudart.utils.getResDescFromDriverResDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1575
 * 
 * 
 * cdef cudaError_t memsetPtr(char *mem, int c, size_t count, cudaStream_t sid, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     if count == 0:
 *         return cudaSuccess
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memsetPtr(char *__pyx_v_mem, int __pyx_v_c, size_t __pyx_v_count, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memsetPtr", __pyx_f[1], 1575, 1, __PYX_ERR(1, 1575, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1576
 * 
 * cdef cudaError_t memsetPtr(char *mem, int c, size_t count, cudaStream_t sid, bool async) nogil except +:
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  __pyx_t_1 = ((__pyx_v_count == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1577
 * cdef cudaError_t memsetPtr(char *mem, int c, size_t count, cudaStream_t sid, bool async) nogil except +:
 *     if count == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 *     if not async:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1576
 * 
 * cdef cudaError_t memsetPtr(char *mem, int c, size_t count, cudaStream_t sid, bool async) nogil except +:
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1579
 *         return cudaSuccess
 * 
 *     if not async:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemsetD8_v2(<ccuda.CUdeviceptr_v2>mem, <unsigned char>c, count)
 *     else:
 */
  __pyx_t_1 = ((!(__pyx_v_async != 0)) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1580
 * 
 *     if not async:
 *         return <cudaError_t>ccuda._cuMemsetD8_v2(<ccuda.CUdeviceptr_v2>mem, <unsigned char>c, count)             # <<<<<<<<<<<<<<
 *     else:
 *         return <cudaError_t>ccuda._cuMemsetD8Async(<ccuda.CUdeviceptr_v2>mem, <unsigned char>c, count, sid)
 */
    __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_mem), ((unsigned char)__pyx_v_c), __pyx_v_count); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1580, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_2);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1579
 *         return cudaSuccess
 * 
 *     if not async:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemsetD8_v2(<ccuda.CUdeviceptr_v2>mem, <unsigned char>c, count)
 *     else:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1582
 *         return <cudaError_t>ccuda._cuMemsetD8_v2(<ccuda.CUdeviceptr_v2>mem, <unsigned char>c, count)
 *     else:
 *         return <cudaError_t>ccuda._cuMemsetD8Async(<ccuda.CUdeviceptr_v2>mem, <unsigned char>c, count, sid)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_mem), ((unsigned char)__pyx_v_c), __pyx_v_count, __pyx_v_sid); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1582, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_2);
    goto __pyx_L0;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1575
 * 
 * 
 * cdef cudaError_t memsetPtr(char *mem, int c, size_t count, cudaStream_t sid, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     if count == 0:
 *         return cudaSuccess
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memsetPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1585
 * 
 * 
 * cdef cudaError_t memset2DPtr(char *mem, size_t pitch, int c, size_t width, size_t height, cudaStream_t sid, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memset2DPtr(char *__pyx_v_mem, size_t __pyx_v_pitch, int __pyx_v_c, size_t __pyx_v_width, size_t __pyx_v_height, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memset2DPtr", __pyx_f[1], 1585, 1, __PYX_ERR(1, 1585, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1586
 * 
 * cdef cudaError_t memset2DPtr(char *mem, size_t pitch, int c, size_t width, size_t height, cudaStream_t sid, bool async) nogil except +:
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  __pyx_t_2 = ((__pyx_v_width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_height == 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1587
 * cdef cudaError_t memset2DPtr(char *mem, size_t pitch, int c, size_t width, size_t height, cudaStream_t sid, bool async) nogil except +:
 *     if width == 0 or height == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 *     if not async:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1586
 * 
 * cdef cudaError_t memset2DPtr(char *mem, size_t pitch, int c, size_t width, size_t height, cudaStream_t sid, bool async) nogil except +:
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1589
 *         return cudaSuccess
 * 
 *     if not async:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemsetD2D8_v2(<ccuda.CUdeviceptr_v2>mem, pitch, <unsigned char>c, width, height)
 *     else:
 */
  __pyx_t_1 = ((!(__pyx_v_async != 0)) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1590
 * 
 *     if not async:
 *         return <cudaError_t>ccuda._cuMemsetD2D8_v2(<ccuda.CUdeviceptr_v2>mem, pitch, <unsigned char>c, width, height)             # <<<<<<<<<<<<<<
 *     else:
 *         return <cudaError_t>ccuda._cuMemsetD2D8Async(<ccuda.CUdeviceptr_v2>mem, pitch, <unsigned char>c, width, height, sid)
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_mem), __pyx_v_pitch, ((unsigned char)__pyx_v_c), __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1590, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1589
 *         return cudaSuccess
 * 
 *     if not async:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemsetD2D8_v2(<ccuda.CUdeviceptr_v2>mem, pitch, <unsigned char>c, width, height)
 *     else:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1592
 *         return <cudaError_t>ccuda._cuMemsetD2D8_v2(<ccuda.CUdeviceptr_v2>mem, pitch, <unsigned char>c, width, height)
 *     else:
 *         return <cudaError_t>ccuda._cuMemsetD2D8Async(<ccuda.CUdeviceptr_v2>mem, pitch, <unsigned char>c, width, height, sid)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_mem), __pyx_v_pitch, ((unsigned char)__pyx_v_c), __pyx_v_width, __pyx_v_height, __pyx_v_sid); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1592, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);
    goto __pyx_L0;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1585
 * 
 * 
 * cdef cudaError_t memset2DPtr(char *mem, size_t pitch, int c, size_t width, size_t height, cudaStream_t sid, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memset2DPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1595
 * 
 * 
 * cdef cudaError_t copyFromHost(cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *src, size_t count, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromHost(__pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char const *__pyx_v_src, size_t __pyx_v_count, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  size_t __pyx_v_copied;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  int __pyx_t_4;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_5;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyFromHost", __pyx_f[1], 1595, 1, __PYX_ERR(1, 1595, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1598
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1599
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1599, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1600
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef size_t copied = 0
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1601
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef size_t copied = 0
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1600
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef size_t copied = 0
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1602
 *     if err != cudaSuccess:
 *         return err
 *     cdef size_t copied = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 * 
 */
  __pyx_v_copied = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1603
 *         return err
 *     cdef size_t copied = 0
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)             # <<<<<<<<<<<<<<
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1603, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1605
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  __pyx_t_4 = ((__pyx_v_wOffset > 0) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_count >= (__pyx_v_arrayState.widthInBytes - __pyx_v_wOffset)) != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1606
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 *         cp.dstArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset
 */
    __pyx_t_5 = __pyx_v_arrayState.array;
    __pyx_v_cp.dstArray = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1607
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = hOffset
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1608
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.srcHost       = src
 */
    __pyx_v_cp.dstY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1610
 *         cp.dstY          = hOffset
 * 
 *         cp.srcHost       = src             # <<<<<<<<<<<<<<
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0
 */
    __pyx_v_cp.srcHost = __pyx_v_src;

    /* "cuda/_lib/ccudart/utils.pyx":1611
 * 
 *         cp.srcHost       = src
 *         cp.srcPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = 0
 *         cp.srcY          = 0
 */
    __pyx_t_6 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.srcPitch = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1612
 *         cp.srcHost       = src
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0             # <<<<<<<<<<<<<<
 *         cp.srcY          = 0
 * 
 */
    __pyx_v_cp.srcXInBytes = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1613
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0
 *         cp.srcY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = 1
 */
    __pyx_v_cp.srcY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1615
 *         cp.srcY          = 0
 * 
 *         cp.Height        = 1             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset
 * 
 */
    __pyx_v_cp.Height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1616
 * 
 *         cp.Height        = 1
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset             # <<<<<<<<<<<<<<
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 */
    __pyx_v_cp.WidthInBytes = (__pyx_v_arrayState.widthInBytes - __pyx_v_wOffset);

    /* "cuda/_lib/ccudart/utils.pyx":1618
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset
 * 
 *         copied  += cp.Height * cp.WidthInBytes             # <<<<<<<<<<<<<<
 *         hOffset += cp.Height
 *         wOffset  = 0
 */
    __pyx_v_copied = (__pyx_v_copied + (__pyx_v_cp.Height * __pyx_v_cp.WidthInBytes));

    /* "cuda/_lib/ccudart/utils.pyx":1619
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height             # <<<<<<<<<<<<<<
 *         wOffset  = 0
 * 
 */
    __pyx_v_hOffset = (__pyx_v_hOffset + __pyx_v_cp.Height);

    /* "cuda/_lib/ccudart/utils.pyx":1620
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height
 *         wOffset  = 0             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_wOffset = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1622
 *         wOffset  = 0
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1622, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1623
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1624
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     if (count - copied >= arrayState.widthInBytes):
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1623
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1605
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1626
 *             return err
 * 
 *     if (count - copied >= arrayState.widthInBytes):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  __pyx_t_2 = (((__pyx_v_count - __pyx_v_copied) >= __pyx_v_arrayState.widthInBytes) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1627
 * 
 *     if (count - copied >= arrayState.widthInBytes):
 *         cp.dstArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset
 */
    __pyx_t_5 = __pyx_v_arrayState.array;
    __pyx_v_cp.dstArray = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1628
 *     if (count - copied >= arrayState.widthInBytes):
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = hOffset
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1629
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.srcHost       = src + copied
 */
    __pyx_v_cp.dstY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1631
 *         cp.dstY          = hOffset
 * 
 *         cp.srcHost       = src + copied             # <<<<<<<<<<<<<<
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0
 */
    __pyx_v_cp.srcHost = (__pyx_v_src + __pyx_v_copied);

    /* "cuda/_lib/ccudart/utils.pyx":1632
 * 
 *         cp.srcHost       = src + copied
 *         cp.srcPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = 0
 *         cp.srcY          = 0
 */
    __pyx_t_6 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.srcPitch = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1633
 *         cp.srcHost       = src + copied
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0             # <<<<<<<<<<<<<<
 *         cp.srcY          = 0
 * 
 */
    __pyx_v_cp.srcXInBytes = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1634
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0
 *         cp.srcY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)
 */
    __pyx_v_cp.srcY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1636
 *         cp.srcY          = 0
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = arrayState.widthInBytes
 * 
 */
    __pyx_t_6 = (__pyx_v_count - __pyx_v_copied);
    if (unlikely(__pyx_v_arrayState.widthInBytes == 0)) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1636, __pyx_L1_error)
    }
    __pyx_v_cp.Height = ((size_t)(((double)__pyx_t_6) / ((double)__pyx_v_arrayState.widthInBytes)));

    /* "cuda/_lib/ccudart/utils.pyx":1637
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)
 *         cp.WidthInBytes  = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 */
    __pyx_t_6 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.WidthInBytes = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1639
 *         cp.WidthInBytes  = arrayState.widthInBytes
 * 
 *         copied  += cp.Height * cp.WidthInBytes             # <<<<<<<<<<<<<<
 *         hOffset += cp.Height
 *         wOffset  = 0
 */
    __pyx_v_copied = (__pyx_v_copied + (__pyx_v_cp.Height * __pyx_v_cp.WidthInBytes));

    /* "cuda/_lib/ccudart/utils.pyx":1640
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height             # <<<<<<<<<<<<<<
 *         wOffset  = 0
 * 
 */
    __pyx_v_hOffset = (__pyx_v_hOffset + __pyx_v_cp.Height);

    /* "cuda/_lib/ccudart/utils.pyx":1641
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height
 *         wOffset  = 0             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_wOffset = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1643
 *         wOffset  = 0
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1643, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1644
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1645
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     if (count - copied > 0):
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1644
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1626
 *             return err
 * 
 *     if (count - copied >= arrayState.widthInBytes):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1647
 *             return err
 * 
 *     if (count - copied > 0):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  __pyx_t_2 = (((__pyx_v_count - __pyx_v_copied) > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1648
 * 
 *     if (count - copied > 0):
 *         cp.dstArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset
 */
    __pyx_t_5 = __pyx_v_arrayState.array;
    __pyx_v_cp.dstArray = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1649
 *     if (count - copied > 0):
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = hOffset
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1650
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.srcHost       = src + copied
 */
    __pyx_v_cp.dstY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1652
 *         cp.dstY          = hOffset
 * 
 *         cp.srcHost       = src + copied             # <<<<<<<<<<<<<<
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0
 */
    __pyx_v_cp.srcHost = (__pyx_v_src + __pyx_v_copied);

    /* "cuda/_lib/ccudart/utils.pyx":1653
 * 
 *         cp.srcHost       = src + copied
 *         cp.srcPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = 0
 *         cp.srcY          = 0
 */
    __pyx_t_6 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.srcPitch = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1654
 *         cp.srcHost       = src + copied
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0             # <<<<<<<<<<<<<<
 *         cp.srcY          = 0
 * 
 */
    __pyx_v_cp.srcXInBytes = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1655
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = 0
 *         cp.srcY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = 1
 */
    __pyx_v_cp.srcY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1657
 *         cp.srcY          = 0
 * 
 *         cp.Height        = 1             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = count - copied
 * 
 */
    __pyx_v_cp.Height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1658
 * 
 *         cp.Height        = 1
 *         cp.WidthInBytes  = count - copied             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_cp.WidthInBytes = (__pyx_v_count - __pyx_v_copied);

    /* "cuda/_lib/ccudart/utils.pyx":1660
 *         cp.WidthInBytes  = count - copied
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1660, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1661
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1662
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1661
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1647
 *             return err
 * 
 *     if (count - copied > 0):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1664
 *             return err
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1595
 * 
 * 
 * cdef cudaError_t copyFromHost(cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *src, size_t count, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyFromHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1667
 * 
 * 
 * cdef cudaError_t copyFromDevice(ccuda.CUmemorytype type, cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *src, size_t srcOffset, size_t count, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice(__pyx_t_4cuda_5ccuda_CUmemorytype __pyx_v_type, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char const *__pyx_v_src, size_t __pyx_v_srcOffset, size_t __pyx_v_count, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  size_t __pyx_v_copied;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  int __pyx_t_4;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_5;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyFromDevice", __pyx_f[1], 1667, 1, __PYX_ERR(1, 1667, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1670
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1671
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1671, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1672
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef size_t copied = 0
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1673
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef size_t copied = 0
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1672
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef size_t copied = 0
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1674
 *     if err != cudaSuccess:
 *         return err
 *     cdef size_t copied = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)
 * 
 */
  __pyx_v_copied = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1675
 *         return err
 *     cdef size_t copied = 0
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)             # <<<<<<<<<<<<<<
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY, __pyx_v_type);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1675, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1677
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  __pyx_t_4 = ((__pyx_v_wOffset > 0) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_count >= (__pyx_v_arrayState.widthInBytes - __pyx_v_wOffset)) != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1678
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 *         cp.dstArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset
 */
    __pyx_t_5 = __pyx_v_arrayState.array;
    __pyx_v_cp.dstArray = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1679
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = hOffset
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1680
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>src
 */
    __pyx_v_cp.dstY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1682
 *         cp.dstY          = hOffset
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>src             # <<<<<<<<<<<<<<
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset
 */
    __pyx_v_cp.srcDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src);

    /* "cuda/_lib/ccudart/utils.pyx":1683
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>src
 *         cp.srcPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = srcOffset
 *         cp.srcY          = 0
 */
    __pyx_t_6 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.srcPitch = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1684
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>src
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = 0
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_srcOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1685
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset
 *         cp.srcY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = 1
 */
    __pyx_v_cp.srcY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1687
 *         cp.srcY          = 0
 * 
 *         cp.Height        = 1             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset
 * 
 */
    __pyx_v_cp.Height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1688
 * 
 *         cp.Height        = 1
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset             # <<<<<<<<<<<<<<
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 */
    __pyx_v_cp.WidthInBytes = (__pyx_v_arrayState.widthInBytes - __pyx_v_wOffset);

    /* "cuda/_lib/ccudart/utils.pyx":1690
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset
 * 
 *         copied  += cp.Height * cp.WidthInBytes             # <<<<<<<<<<<<<<
 *         hOffset += cp.Height
 *         wOffset  = 0
 */
    __pyx_v_copied = (__pyx_v_copied + (__pyx_v_cp.Height * __pyx_v_cp.WidthInBytes));

    /* "cuda/_lib/ccudart/utils.pyx":1691
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height             # <<<<<<<<<<<<<<
 *         wOffset  = 0
 * 
 */
    __pyx_v_hOffset = (__pyx_v_hOffset + __pyx_v_cp.Height);

    /* "cuda/_lib/ccudart/utils.pyx":1692
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height
 *         wOffset  = 0             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_wOffset = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1694
 *         wOffset  = 0
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1694, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1695
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1696
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     if (count - copied >= arrayState.widthInBytes):
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1695
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1677
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, type)
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1698
 *             return err
 * 
 *     if (count - copied >= arrayState.widthInBytes):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  __pyx_t_2 = (((__pyx_v_count - __pyx_v_copied) >= __pyx_v_arrayState.widthInBytes) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1699
 * 
 *     if (count - copied >= arrayState.widthInBytes):
 *         cp.dstArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset
 */
    __pyx_t_5 = __pyx_v_arrayState.array;
    __pyx_v_cp.dstArray = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1700
 *     if (count - copied >= arrayState.widthInBytes):
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = hOffset
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1701
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>(src + copied)
 */
    __pyx_v_cp.dstY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1703
 *         cp.dstY          = hOffset
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>(src + copied)             # <<<<<<<<<<<<<<
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset
 */
    __pyx_v_cp.srcDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_src + __pyx_v_copied));

    /* "cuda/_lib/ccudart/utils.pyx":1704
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>(src + copied)
 *         cp.srcPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = srcOffset
 *         cp.srcY          = 0
 */
    __pyx_t_6 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.srcPitch = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1705
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>(src + copied)
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = 0
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_srcOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1706
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset
 *         cp.srcY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)
 */
    __pyx_v_cp.srcY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1708
 *         cp.srcY          = 0
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = arrayState.widthInBytes
 * 
 */
    __pyx_t_6 = (__pyx_v_count - __pyx_v_copied);
    if (unlikely(__pyx_v_arrayState.widthInBytes == 0)) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1708, __pyx_L1_error)
    }
    __pyx_v_cp.Height = ((size_t)(((double)__pyx_t_6) / ((double)__pyx_v_arrayState.widthInBytes)));

    /* "cuda/_lib/ccudart/utils.pyx":1709
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)
 *         cp.WidthInBytes  = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 */
    __pyx_t_6 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.WidthInBytes = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1711
 *         cp.WidthInBytes  = arrayState.widthInBytes
 * 
 *         copied  += cp.Height * cp.WidthInBytes             # <<<<<<<<<<<<<<
 *         hOffset += cp.Height
 *         wOffset  = 0
 */
    __pyx_v_copied = (__pyx_v_copied + (__pyx_v_cp.Height * __pyx_v_cp.WidthInBytes));

    /* "cuda/_lib/ccudart/utils.pyx":1712
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height             # <<<<<<<<<<<<<<
 *         wOffset  = 0
 * 
 */
    __pyx_v_hOffset = (__pyx_v_hOffset + __pyx_v_cp.Height);

    /* "cuda/_lib/ccudart/utils.pyx":1713
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height
 *         wOffset  = 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_wOffset = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1716
 * 
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1716, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1717
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1718
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     if (count - copied > 0):
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1717
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1698
 *             return err
 * 
 *     if (count - copied >= arrayState.widthInBytes):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1720
 *             return err
 * 
 *     if (count - copied > 0):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  __pyx_t_2 = (((__pyx_v_count - __pyx_v_copied) > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1721
 * 
 *     if (count - copied > 0):
 *         cp.dstArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset
 */
    __pyx_t_5 = __pyx_v_arrayState.array;
    __pyx_v_cp.dstArray = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1722
 *     if (count - copied > 0):
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = hOffset
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1723
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 *         cp.dstY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>(src + copied)
 */
    __pyx_v_cp.dstY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1725
 *         cp.dstY          = hOffset
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>(src + copied)             # <<<<<<<<<<<<<<
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset
 */
    __pyx_v_cp.srcDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_src + __pyx_v_copied));

    /* "cuda/_lib/ccudart/utils.pyx":1726
 * 
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>(src + copied)
 *         cp.srcPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = srcOffset
 *         cp.srcY          = 0
 */
    __pyx_t_6 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.srcPitch = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1727
 *         cp.srcDevice     = <ccuda.CUdeviceptr_v2>(src + copied)
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = 0
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_srcOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1728
 *         cp.srcPitch      = arrayState.widthInBytes
 *         cp.srcXInBytes   = srcOffset
 *         cp.srcY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = 1
 */
    __pyx_v_cp.srcY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1730
 *         cp.srcY          = 0
 * 
 *         cp.Height        = 1             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = count - copied
 * 
 */
    __pyx_v_cp.Height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1731
 * 
 *         cp.Height        = 1
 *         cp.WidthInBytes  = count - copied             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_cp.WidthInBytes = (__pyx_v_count - __pyx_v_copied);

    /* "cuda/_lib/ccudart/utils.pyx":1733
 *         cp.WidthInBytes  = count - copied
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1733, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1734
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1735
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1734
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1720
 *             return err
 * 
 *     if (count - copied > 0):             # <<<<<<<<<<<<<<
 *         cp.dstArray      = arrayState.array
 *         cp.dstXInBytes   = wOffset
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1737
 *             return err
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1667
 * 
 * 
 * cdef cudaError_t copyFromDevice(ccuda.CUmemorytype type, cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *src, size_t srcOffset, size_t count, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyFromDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1740
 * 
 * 
 * cdef cudaError_t copyToHost(cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, char *dst, size_t count, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToHost(__pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char *__pyx_v_dst, size_t __pyx_v_count, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  size_t __pyx_v_copied;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  int __pyx_t_4;
  size_t __pyx_t_5;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyToHost", __pyx_f[1], 1740, 1, __PYX_ERR(1, 1740, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1743
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1744
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1744, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1745
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef size_t copied = 0
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1746
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef size_t copied = 0
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1745
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef size_t copied = 0
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1747
 *     if err != cudaSuccess:
 *         return err
 *     cdef size_t copied = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 */
  __pyx_v_copied = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1748
 *         return err
 *     cdef size_t copied = 0
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1748, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1750
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):             # <<<<<<<<<<<<<<
 *         cp.dstHost       = dst
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  __pyx_t_4 = ((__pyx_v_wOffset > 0) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_count >= (__pyx_v_arrayState.widthInBytes - __pyx_v_wOffset)) != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1751
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 *         cp.dstHost       = dst             # <<<<<<<<<<<<<<
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0
 */
    __pyx_v_cp.dstHost = __pyx_v_dst;

    /* "cuda/_lib/ccudart/utils.pyx":1752
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 *         cp.dstHost       = dst
 *         cp.dstPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = 0
 *         cp.dstY          = 0
 */
    __pyx_t_5 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.dstPitch = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1753
 *         cp.dstHost       = dst
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0             # <<<<<<<<<<<<<<
 *         cp.dstY          = 0
 * 
 */
    __pyx_v_cp.dstXInBytes = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1754
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0
 *         cp.dstY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.srcArray      = arrayState.array
 */
    __pyx_v_cp.dstY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1756
 *         cp.dstY          = 0
 * 
 *         cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset
 */
    __pyx_t_6 = __pyx_v_arrayState.array;
    __pyx_v_cp.srcArray = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1757
 * 
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = hOffset
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1758
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = 1
 */
    __pyx_v_cp.srcY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1760
 *         cp.srcY          = hOffset
 * 
 *         cp.Height        = 1             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset
 * 
 */
    __pyx_v_cp.Height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1761
 * 
 *         cp.Height        = 1
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset             # <<<<<<<<<<<<<<
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 */
    __pyx_v_cp.WidthInBytes = (__pyx_v_arrayState.widthInBytes - __pyx_v_wOffset);

    /* "cuda/_lib/ccudart/utils.pyx":1763
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset
 * 
 *         copied  += cp.Height * cp.WidthInBytes             # <<<<<<<<<<<<<<
 *         hOffset += cp.Height
 *         wOffset  = 0
 */
    __pyx_v_copied = (__pyx_v_copied + (__pyx_v_cp.Height * __pyx_v_cp.WidthInBytes));

    /* "cuda/_lib/ccudart/utils.pyx":1764
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height             # <<<<<<<<<<<<<<
 *         wOffset  = 0
 * 
 */
    __pyx_v_hOffset = (__pyx_v_hOffset + __pyx_v_cp.Height);

    /* "cuda/_lib/ccudart/utils.pyx":1765
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height
 *         wOffset  = 0             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_wOffset = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1767
 *         wOffset  = 0
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1767, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1768
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1769
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     if (count - copied >= arrayState.widthInBytes):
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1768
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1750
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):             # <<<<<<<<<<<<<<
 *         cp.dstHost       = dst
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1771
 *             return err
 * 
 *     if (count - copied >= arrayState.widthInBytes):             # <<<<<<<<<<<<<<
 *         cp.dstHost       = dst + copied
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  __pyx_t_2 = (((__pyx_v_count - __pyx_v_copied) >= __pyx_v_arrayState.widthInBytes) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1772
 * 
 *     if (count - copied >= arrayState.widthInBytes):
 *         cp.dstHost       = dst + copied             # <<<<<<<<<<<<<<
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0
 */
    __pyx_v_cp.dstHost = (__pyx_v_dst + __pyx_v_copied);

    /* "cuda/_lib/ccudart/utils.pyx":1773
 *     if (count - copied >= arrayState.widthInBytes):
 *         cp.dstHost       = dst + copied
 *         cp.dstPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = 0
 *         cp.dstY          = 0
 */
    __pyx_t_5 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.dstPitch = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1774
 *         cp.dstHost       = dst + copied
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0             # <<<<<<<<<<<<<<
 *         cp.dstY          = 0
 * 
 */
    __pyx_v_cp.dstXInBytes = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1775
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0
 *         cp.dstY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.srcArray      = arrayState.array
 */
    __pyx_v_cp.dstY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1777
 *         cp.dstY          = 0
 * 
 *         cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset
 */
    __pyx_t_6 = __pyx_v_arrayState.array;
    __pyx_v_cp.srcArray = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1778
 * 
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = hOffset
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1779
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)
 */
    __pyx_v_cp.srcY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1781
 *         cp.srcY          = hOffset
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = arrayState.widthInBytes
 * 
 */
    __pyx_t_5 = (__pyx_v_count - __pyx_v_copied);
    if (unlikely(__pyx_v_arrayState.widthInBytes == 0)) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1781, __pyx_L1_error)
    }
    __pyx_v_cp.Height = ((size_t)(((double)__pyx_t_5) / ((double)__pyx_v_arrayState.widthInBytes)));

    /* "cuda/_lib/ccudart/utils.pyx":1782
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)
 *         cp.WidthInBytes  = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 */
    __pyx_t_5 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.WidthInBytes = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1784
 *         cp.WidthInBytes  = arrayState.widthInBytes
 * 
 *         copied  += cp.Height * cp.WidthInBytes             # <<<<<<<<<<<<<<
 *         hOffset += cp.Height
 *         wOffset  = 0
 */
    __pyx_v_copied = (__pyx_v_copied + (__pyx_v_cp.Height * __pyx_v_cp.WidthInBytes));

    /* "cuda/_lib/ccudart/utils.pyx":1785
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height             # <<<<<<<<<<<<<<
 *         wOffset  = 0
 * 
 */
    __pyx_v_hOffset = (__pyx_v_hOffset + __pyx_v_cp.Height);

    /* "cuda/_lib/ccudart/utils.pyx":1786
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height
 *         wOffset  = 0             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_wOffset = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1788
 *         wOffset  = 0
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1788, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1789
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1790
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     if (count - copied > 0):
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1789
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1771
 *             return err
 * 
 *     if (count - copied >= arrayState.widthInBytes):             # <<<<<<<<<<<<<<
 *         cp.dstHost       = dst + copied
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1792
 *             return err
 * 
 *     if (count - copied > 0):             # <<<<<<<<<<<<<<
 *         cp.dstHost       = dst + copied
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  __pyx_t_2 = (((__pyx_v_count - __pyx_v_copied) > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1793
 * 
 *     if (count - copied > 0):
 *         cp.dstHost       = dst + copied             # <<<<<<<<<<<<<<
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0
 */
    __pyx_v_cp.dstHost = (__pyx_v_dst + __pyx_v_copied);

    /* "cuda/_lib/ccudart/utils.pyx":1794
 *     if (count - copied > 0):
 *         cp.dstHost       = dst + copied
 *         cp.dstPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = 0
 *         cp.dstY          = 0
 */
    __pyx_t_5 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.dstPitch = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1795
 *         cp.dstHost       = dst + copied
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0             # <<<<<<<<<<<<<<
 *         cp.dstY          = 0
 * 
 */
    __pyx_v_cp.dstXInBytes = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1796
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = 0
 *         cp.dstY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.srcArray      = arrayState.array
 */
    __pyx_v_cp.dstY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1798
 *         cp.dstY          = 0
 * 
 *         cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset
 */
    __pyx_t_6 = __pyx_v_arrayState.array;
    __pyx_v_cp.srcArray = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1799
 * 
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = hOffset
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1800
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = 1
 */
    __pyx_v_cp.srcY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1802
 *         cp.srcY          = hOffset
 * 
 *         cp.Height        = 1             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = count - copied
 * 
 */
    __pyx_v_cp.Height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1803
 * 
 *         cp.Height        = 1
 *         cp.WidthInBytes  = count - copied             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_cp.WidthInBytes = (__pyx_v_count - __pyx_v_copied);

    /* "cuda/_lib/ccudart/utils.pyx":1805
 *         cp.WidthInBytes  = count - copied
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1805, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1806
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1807
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1806
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1792
 *             return err
 * 
 *     if (count - copied > 0):             # <<<<<<<<<<<<<<
 *         cp.dstHost       = dst + copied
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1809
 *             return err
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1740
 * 
 * 
 * cdef cudaError_t copyToHost(cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, char *dst, size_t count, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyToHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1812
 * 
 * 
 * cdef cudaError_t driverMemcpy3DPeer(ccuda.CUDA_MEMCPY3D_PEER *cp, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     if async:
 *         return <cudaError_t>ccuda._cuMemcpy3DPeerAsync(cp, stream)
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3DPeer(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER *__pyx_v_cp, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("driverMemcpy3DPeer", __pyx_f[1], 1812, 1, __PYX_ERR(1, 1812, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1813
 * 
 * cdef cudaError_t driverMemcpy3DPeer(ccuda.CUDA_MEMCPY3D_PEER *cp, ccuda.CUstream stream, bool async) nogil except +:
 *     if async:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemcpy3DPeerAsync(cp, stream)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_async != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1814
 * cdef cudaError_t driverMemcpy3DPeer(ccuda.CUDA_MEMCPY3D_PEER *cp, ccuda.CUstream stream, bool async) nogil except +:
 *     if async:
 *         return <cudaError_t>ccuda._cuMemcpy3DPeerAsync(cp, stream)             # <<<<<<<<<<<<<<
 *     else:
 *         return <cudaError_t>ccuda._cuMemcpy3DPeer(cp)
 */
    __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync(__pyx_v_cp, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1814, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_2);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1813
 * 
 * cdef cudaError_t driverMemcpy3DPeer(ccuda.CUDA_MEMCPY3D_PEER *cp, ccuda.CUstream stream, bool async) nogil except +:
 *     if async:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemcpy3DPeerAsync(cp, stream)
 *     else:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1816
 *         return <cudaError_t>ccuda._cuMemcpy3DPeerAsync(cp, stream)
 *     else:
 *         return <cudaError_t>ccuda._cuMemcpy3DPeer(cp)             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t driverMemcpy3D(ccuda.CUDA_MEMCPY3D_v2 *cp, ccuda.CUstream stream, bool async) nogil except +:
 */
  /*else*/ {
    __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer(__pyx_v_cp); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1816, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_2);
    goto __pyx_L0;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1812
 * 
 * 
 * cdef cudaError_t driverMemcpy3DPeer(ccuda.CUDA_MEMCPY3D_PEER *cp, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     if async:
 *         return <cudaError_t>ccuda._cuMemcpy3DPeerAsync(cp, stream)
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.driverMemcpy3DPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1818
 *         return <cudaError_t>ccuda._cuMemcpy3DPeer(cp)
 * 
 * cdef cudaError_t driverMemcpy3D(ccuda.CUDA_MEMCPY3D_v2 *cp, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     if async:
 *         return <cudaError_t>ccuda._cuMemcpy3DAsync_v2(cp, stream)
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 *__pyx_v_cp, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("driverMemcpy3D", __pyx_f[1], 1818, 1, __PYX_ERR(1, 1818, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1819
 * 
 * cdef cudaError_t driverMemcpy3D(ccuda.CUDA_MEMCPY3D_v2 *cp, ccuda.CUstream stream, bool async) nogil except +:
 *     if async:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemcpy3DAsync_v2(cp, stream)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_async != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1820
 * cdef cudaError_t driverMemcpy3D(ccuda.CUDA_MEMCPY3D_v2 *cp, ccuda.CUstream stream, bool async) nogil except +:
 *     if async:
 *         return <cudaError_t>ccuda._cuMemcpy3DAsync_v2(cp, stream)             # <<<<<<<<<<<<<<
 *     else:
 *         return <cudaError_t>ccuda._cuMemcpy3D_v2(cp)
 */
    __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2(__pyx_v_cp, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1820, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_2);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1819
 * 
 * cdef cudaError_t driverMemcpy3D(ccuda.CUDA_MEMCPY3D_v2 *cp, ccuda.CUstream stream, bool async) nogil except +:
 *     if async:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemcpy3DAsync_v2(cp, stream)
 *     else:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1822
 *         return <cudaError_t>ccuda._cuMemcpy3DAsync_v2(cp, stream)
 *     else:
 *         return <cudaError_t>ccuda._cuMemcpy3D_v2(cp)             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t memcpy3D(const cudaMemcpy3DParms *p, bool peer, int srcDevice, int dstDevice, cudaStream_t sid, bool async) nogil except+:
 */
  /*else*/ {
    __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2(__pyx_v_cp); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1822, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_2);
    goto __pyx_L0;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1818
 *         return <cudaError_t>ccuda._cuMemcpy3DPeer(cp)
 * 
 * cdef cudaError_t driverMemcpy3D(ccuda.CUDA_MEMCPY3D_v2 *cp, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     if async:
 *         return <cudaError_t>ccuda._cuMemcpy3DAsync_v2(cp, stream)
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.driverMemcpy3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1824
 *         return <cudaError_t>ccuda._cuMemcpy3D_v2(cp)
 * 
 * cdef cudaError_t memcpy3D(const cudaMemcpy3DParms *p, bool peer, int srcDevice, int dstDevice, cudaStream_t sid, bool async) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cd
 *     cdef ccuda.CUDA_MEMCPY3D_PEER cdPeer
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy3D(struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms const *__pyx_v_p, bool __pyx_v_peer, int __pyx_v_srcDevice, int __pyx_v_dstDevice, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cd;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER __pyx_v_cdPeer;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  size_t __pyx_t_3;
  __pyx_t_4cuda_5ccuda_CUmemorytype __pyx_t_4;
  void const *__pyx_t_5;
  __pyx_t_4cuda_5ccuda_CUdeviceptr __pyx_t_6;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_7;
  void *__pyx_t_8;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpy3D", __pyx_f[1], 1824, 1, __PYX_ERR(1, 1824, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1828
 *     cdef ccuda.CUDA_MEMCPY3D_PEER cdPeer
 * 
 *     cdef cudaError_t err = toDriverMemCopy3DParams(p, &cd)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_toDriverMemCopy3DParams(__pyx_v_p, (&__pyx_v_cd));

  /* "cuda/_lib/ccudart/utils.pyx":1829
 * 
 *     cdef cudaError_t err = toDriverMemCopy3DParams(p, &cd)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1830
 *     cdef cudaError_t err = toDriverMemCopy3DParams(p, &cd)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 * 
 *     # Execute the copy
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1829
 * 
 *     cdef cudaError_t err = toDriverMemCopy3DParams(p, &cd)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1833
 * 
 *     # Execute the copy
 *     if peer:             # <<<<<<<<<<<<<<
 *         if srcDevice < 0 or srcDevice > m_global._numDevices or dstDevice < 0 or dstDevice > m_global._numDevices:
 *             return cudaErrorInvalidDevice
 */
  __pyx_t_1 = (__pyx_v_peer != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":1834
 *     # Execute the copy
 *     if peer:
 *         if srcDevice < 0 or srcDevice > m_global._numDevices or dstDevice < 0 or dstDevice > m_global._numDevices:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidDevice
 *         err = m_global.lazyInitDevice(srcDevice)
 */
    __pyx_t_2 = ((__pyx_v_srcDevice < 0) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_srcDevice > __pyx_v_4cuda_4_lib_7ccudart_5utils_m_global->_numDevices) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_dstDevice < 0) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_dstDevice > __pyx_v_4cuda_4_lib_7ccudart_5utils_m_global->_numDevices) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1835
 *     if peer:
 *         if srcDevice < 0 or srcDevice > m_global._numDevices or dstDevice < 0 or dstDevice > m_global._numDevices:
 *             return cudaErrorInvalidDevice             # <<<<<<<<<<<<<<
 *         err = m_global.lazyInitDevice(srcDevice)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidDevice;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1834
 *     # Execute the copy
 *     if peer:
 *         if srcDevice < 0 or srcDevice > m_global._numDevices or dstDevice < 0 or dstDevice > m_global._numDevices:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidDevice
 *         err = m_global.lazyInitDevice(srcDevice)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1836
 *         if srcDevice < 0 or srcDevice > m_global._numDevices or dstDevice < 0 or dstDevice > m_global._numDevices:
 *             return cudaErrorInvalidDevice
 *         err = m_global.lazyInitDevice(srcDevice)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = ((struct __pyx_vtabstruct_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global->__pyx_vtab)->lazyInitDevice(__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global, __pyx_v_srcDevice);

    /* "cuda/_lib/ccudart/utils.pyx":1837
 *             return cudaErrorInvalidDevice
 *         err = m_global.lazyInitDevice(srcDevice)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = m_global.lazyInitDevice(dstDevice)
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1838
 *         err = m_global.lazyInitDevice(srcDevice)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = m_global.lazyInitDevice(dstDevice)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1837
 *             return cudaErrorInvalidDevice
 *         err = m_global.lazyInitDevice(srcDevice)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = m_global.lazyInitDevice(dstDevice)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1839
 *         if err != cudaSuccess:
 *             return err
 *         err = m_global.lazyInitDevice(dstDevice)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = ((struct __pyx_vtabstruct_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global->__pyx_vtab)->lazyInitDevice(__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global, __pyx_v_dstDevice);

    /* "cuda/_lib/ccudart/utils.pyx":1840
 *             return err
 *         err = m_global.lazyInitDevice(dstDevice)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         cdPeer.srcXInBytes = cd.srcXInBytes
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":1841
 *         err = m_global.lazyInitDevice(dstDevice)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         cdPeer.srcXInBytes = cd.srcXInBytes
 *         cdPeer.srcY = cd.srcY
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1840
 *             return err
 *         err = m_global.lazyInitDevice(dstDevice)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         cdPeer.srcXInBytes = cd.srcXInBytes
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1842
 *         if err != cudaSuccess:
 *             return err
 *         cdPeer.srcXInBytes = cd.srcXInBytes             # <<<<<<<<<<<<<<
 *         cdPeer.srcY = cd.srcY
 *         cdPeer.srcZ = cd.srcZ
 */
    __pyx_t_3 = __pyx_v_cd.srcXInBytes;
    __pyx_v_cdPeer.srcXInBytes = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1843
 *             return err
 *         cdPeer.srcXInBytes = cd.srcXInBytes
 *         cdPeer.srcY = cd.srcY             # <<<<<<<<<<<<<<
 *         cdPeer.srcZ = cd.srcZ
 *         cdPeer.srcLOD = cd.srcLOD
 */
    __pyx_t_3 = __pyx_v_cd.srcY;
    __pyx_v_cdPeer.srcY = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1844
 *         cdPeer.srcXInBytes = cd.srcXInBytes
 *         cdPeer.srcY = cd.srcY
 *         cdPeer.srcZ = cd.srcZ             # <<<<<<<<<<<<<<
 *         cdPeer.srcLOD = cd.srcLOD
 *         cdPeer.srcMemoryType = cd.srcMemoryType
 */
    __pyx_t_3 = __pyx_v_cd.srcZ;
    __pyx_v_cdPeer.srcZ = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1845
 *         cdPeer.srcY = cd.srcY
 *         cdPeer.srcZ = cd.srcZ
 *         cdPeer.srcLOD = cd.srcLOD             # <<<<<<<<<<<<<<
 *         cdPeer.srcMemoryType = cd.srcMemoryType
 *         cdPeer.srcHost = cd.srcHost
 */
    __pyx_t_3 = __pyx_v_cd.srcLOD;
    __pyx_v_cdPeer.srcLOD = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1846
 *         cdPeer.srcZ = cd.srcZ
 *         cdPeer.srcLOD = cd.srcLOD
 *         cdPeer.srcMemoryType = cd.srcMemoryType             # <<<<<<<<<<<<<<
 *         cdPeer.srcHost = cd.srcHost
 *         cdPeer.srcDevice = cd.srcDevice
 */
    __pyx_t_4 = __pyx_v_cd.srcMemoryType;
    __pyx_v_cdPeer.srcMemoryType = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1847
 *         cdPeer.srcLOD = cd.srcLOD
 *         cdPeer.srcMemoryType = cd.srcMemoryType
 *         cdPeer.srcHost = cd.srcHost             # <<<<<<<<<<<<<<
 *         cdPeer.srcDevice = cd.srcDevice
 *         cdPeer.srcArray = cd.srcArray
 */
    __pyx_t_5 = __pyx_v_cd.srcHost;
    __pyx_v_cdPeer.srcHost = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1848
 *         cdPeer.srcMemoryType = cd.srcMemoryType
 *         cdPeer.srcHost = cd.srcHost
 *         cdPeer.srcDevice = cd.srcDevice             # <<<<<<<<<<<<<<
 *         cdPeer.srcArray = cd.srcArray
 *         cdPeer.srcContext = m_global._driverContext[srcDevice]
 */
    __pyx_t_6 = __pyx_v_cd.srcDevice;
    __pyx_v_cdPeer.srcDevice = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1849
 *         cdPeer.srcHost = cd.srcHost
 *         cdPeer.srcDevice = cd.srcDevice
 *         cdPeer.srcArray = cd.srcArray             # <<<<<<<<<<<<<<
 *         cdPeer.srcContext = m_global._driverContext[srcDevice]
 *         cdPeer.srcPitch = cd.srcPitch
 */
    __pyx_t_7 = __pyx_v_cd.srcArray;
    __pyx_v_cdPeer.srcArray = __pyx_t_7;

    /* "cuda/_lib/ccudart/utils.pyx":1850
 *         cdPeer.srcDevice = cd.srcDevice
 *         cdPeer.srcArray = cd.srcArray
 *         cdPeer.srcContext = m_global._driverContext[srcDevice]             # <<<<<<<<<<<<<<
 *         cdPeer.srcPitch = cd.srcPitch
 *         cdPeer.srcHeight = cd.srcHeight
 */
    __pyx_v_cdPeer.srcContext = (__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global->_driverContext[__pyx_v_srcDevice]);

    /* "cuda/_lib/ccudart/utils.pyx":1851
 *         cdPeer.srcArray = cd.srcArray
 *         cdPeer.srcContext = m_global._driverContext[srcDevice]
 *         cdPeer.srcPitch = cd.srcPitch             # <<<<<<<<<<<<<<
 *         cdPeer.srcHeight = cd.srcHeight
 *         cdPeer.dstXInBytes = cd.dstXInBytes
 */
    __pyx_t_3 = __pyx_v_cd.srcPitch;
    __pyx_v_cdPeer.srcPitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1852
 *         cdPeer.srcContext = m_global._driverContext[srcDevice]
 *         cdPeer.srcPitch = cd.srcPitch
 *         cdPeer.srcHeight = cd.srcHeight             # <<<<<<<<<<<<<<
 *         cdPeer.dstXInBytes = cd.dstXInBytes
 *         cdPeer.dstY = cd.dstY
 */
    __pyx_t_3 = __pyx_v_cd.srcHeight;
    __pyx_v_cdPeer.srcHeight = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1853
 *         cdPeer.srcPitch = cd.srcPitch
 *         cdPeer.srcHeight = cd.srcHeight
 *         cdPeer.dstXInBytes = cd.dstXInBytes             # <<<<<<<<<<<<<<
 *         cdPeer.dstY = cd.dstY
 *         cdPeer.dstZ = cd.dstZ
 */
    __pyx_t_3 = __pyx_v_cd.dstXInBytes;
    __pyx_v_cdPeer.dstXInBytes = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1854
 *         cdPeer.srcHeight = cd.srcHeight
 *         cdPeer.dstXInBytes = cd.dstXInBytes
 *         cdPeer.dstY = cd.dstY             # <<<<<<<<<<<<<<
 *         cdPeer.dstZ = cd.dstZ
 *         cdPeer.dstLOD = cd.dstLOD
 */
    __pyx_t_3 = __pyx_v_cd.dstY;
    __pyx_v_cdPeer.dstY = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1855
 *         cdPeer.dstXInBytes = cd.dstXInBytes
 *         cdPeer.dstY = cd.dstY
 *         cdPeer.dstZ = cd.dstZ             # <<<<<<<<<<<<<<
 *         cdPeer.dstLOD = cd.dstLOD
 *         cdPeer.dstMemoryType = cd.dstMemoryType
 */
    __pyx_t_3 = __pyx_v_cd.dstZ;
    __pyx_v_cdPeer.dstZ = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1856
 *         cdPeer.dstY = cd.dstY
 *         cdPeer.dstZ = cd.dstZ
 *         cdPeer.dstLOD = cd.dstLOD             # <<<<<<<<<<<<<<
 *         cdPeer.dstMemoryType = cd.dstMemoryType
 *         cdPeer.dstHost = cd.dstHost
 */
    __pyx_t_3 = __pyx_v_cd.dstLOD;
    __pyx_v_cdPeer.dstLOD = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1857
 *         cdPeer.dstZ = cd.dstZ
 *         cdPeer.dstLOD = cd.dstLOD
 *         cdPeer.dstMemoryType = cd.dstMemoryType             # <<<<<<<<<<<<<<
 *         cdPeer.dstHost = cd.dstHost
 *         cdPeer.dstDevice = cd.dstDevice
 */
    __pyx_t_4 = __pyx_v_cd.dstMemoryType;
    __pyx_v_cdPeer.dstMemoryType = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":1858
 *         cdPeer.dstLOD = cd.dstLOD
 *         cdPeer.dstMemoryType = cd.dstMemoryType
 *         cdPeer.dstHost = cd.dstHost             # <<<<<<<<<<<<<<
 *         cdPeer.dstDevice = cd.dstDevice
 *         cdPeer.dstArray = cd.dstArray
 */
    __pyx_t_8 = __pyx_v_cd.dstHost;
    __pyx_v_cdPeer.dstHost = __pyx_t_8;

    /* "cuda/_lib/ccudart/utils.pyx":1859
 *         cdPeer.dstMemoryType = cd.dstMemoryType
 *         cdPeer.dstHost = cd.dstHost
 *         cdPeer.dstDevice = cd.dstDevice             # <<<<<<<<<<<<<<
 *         cdPeer.dstArray = cd.dstArray
 *         cdPeer.dstContext = m_global._driverContext[dstDevice]
 */
    __pyx_t_6 = __pyx_v_cd.dstDevice;
    __pyx_v_cdPeer.dstDevice = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1860
 *         cdPeer.dstHost = cd.dstHost
 *         cdPeer.dstDevice = cd.dstDevice
 *         cdPeer.dstArray = cd.dstArray             # <<<<<<<<<<<<<<
 *         cdPeer.dstContext = m_global._driverContext[dstDevice]
 *         cdPeer.dstPitch = cd.dstPitch
 */
    __pyx_t_7 = __pyx_v_cd.dstArray;
    __pyx_v_cdPeer.dstArray = __pyx_t_7;

    /* "cuda/_lib/ccudart/utils.pyx":1861
 *         cdPeer.dstDevice = cd.dstDevice
 *         cdPeer.dstArray = cd.dstArray
 *         cdPeer.dstContext = m_global._driverContext[dstDevice]             # <<<<<<<<<<<<<<
 *         cdPeer.dstPitch = cd.dstPitch
 *         cdPeer.dstHeight = cd.dstHeight
 */
    __pyx_v_cdPeer.dstContext = (__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global->_driverContext[__pyx_v_dstDevice]);

    /* "cuda/_lib/ccudart/utils.pyx":1862
 *         cdPeer.dstArray = cd.dstArray
 *         cdPeer.dstContext = m_global._driverContext[dstDevice]
 *         cdPeer.dstPitch = cd.dstPitch             # <<<<<<<<<<<<<<
 *         cdPeer.dstHeight = cd.dstHeight
 *         cdPeer.WidthInBytes = cd.WidthInBytes
 */
    __pyx_t_3 = __pyx_v_cd.dstPitch;
    __pyx_v_cdPeer.dstPitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1863
 *         cdPeer.dstContext = m_global._driverContext[dstDevice]
 *         cdPeer.dstPitch = cd.dstPitch
 *         cdPeer.dstHeight = cd.dstHeight             # <<<<<<<<<<<<<<
 *         cdPeer.WidthInBytes = cd.WidthInBytes
 *         cdPeer.Height = cd.Height
 */
    __pyx_t_3 = __pyx_v_cd.dstHeight;
    __pyx_v_cdPeer.dstHeight = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1864
 *         cdPeer.dstPitch = cd.dstPitch
 *         cdPeer.dstHeight = cd.dstHeight
 *         cdPeer.WidthInBytes = cd.WidthInBytes             # <<<<<<<<<<<<<<
 *         cdPeer.Height = cd.Height
 *         cdPeer.Depth = cd.Depth
 */
    __pyx_t_3 = __pyx_v_cd.WidthInBytes;
    __pyx_v_cdPeer.WidthInBytes = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1865
 *         cdPeer.dstHeight = cd.dstHeight
 *         cdPeer.WidthInBytes = cd.WidthInBytes
 *         cdPeer.Height = cd.Height             # <<<<<<<<<<<<<<
 *         cdPeer.Depth = cd.Depth
 *         err = driverMemcpy3DPeer(&cdPeer, sid, async)
 */
    __pyx_t_3 = __pyx_v_cd.Height;
    __pyx_v_cdPeer.Height = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1866
 *         cdPeer.WidthInBytes = cd.WidthInBytes
 *         cdPeer.Height = cd.Height
 *         cdPeer.Depth = cd.Depth             # <<<<<<<<<<<<<<
 *         err = driverMemcpy3DPeer(&cdPeer, sid, async)
 *     else:
 */
    __pyx_t_3 = __pyx_v_cd.Depth;
    __pyx_v_cdPeer.Depth = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1867
 *         cdPeer.Height = cd.Height
 *         cdPeer.Depth = cd.Depth
 *         err = driverMemcpy3DPeer(&cdPeer, sid, async)             # <<<<<<<<<<<<<<
 *     else:
 *         err = driverMemcpy3D(&cd, sid, async)
 */
    try {
      __pyx_t_9 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3DPeer((&__pyx_v_cdPeer), __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1867, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_9;

    /* "cuda/_lib/ccudart/utils.pyx":1833
 * 
 *     # Execute the copy
 *     if peer:             # <<<<<<<<<<<<<<
 *         if srcDevice < 0 or srcDevice > m_global._numDevices or dstDevice < 0 or dstDevice > m_global._numDevices:
 *             return cudaErrorInvalidDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1869
 *         err = driverMemcpy3DPeer(&cdPeer, sid, async)
 *     else:
 *         err = driverMemcpy3D(&cd, sid, async)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
  /*else*/ {
    try {
      __pyx_t_9 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cd), __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1869, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_9;
  }
  __pyx_L4:;

  /* "cuda/_lib/ccudart/utils.pyx":1870
 *     else:
 *         err = driverMemcpy3D(&cd, sid, async)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_err;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1824
 *         return <cudaError_t>ccuda._cuMemcpy3D_v2(cp)
 * 
 * cdef cudaError_t memcpy3D(const cudaMemcpy3DParms *p, bool peer, int srcDevice, int dstDevice, cudaStream_t sid, bool async) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cd
 *     cdef ccuda.CUDA_MEMCPY3D_PEER cdPeer
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpy3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1873
 * 
 * 
 * cdef cudaError_t copyToDevice(ccuda.CUmemorytype type, cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *dst, size_t dstOffset, size_t count, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice(__pyx_t_4cuda_5ccuda_CUmemorytype __pyx_v_type, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_thisArray, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char const *__pyx_v_dst, size_t __pyx_v_dstOffset, size_t __pyx_v_count, __pyx_t_4cuda_5ccuda_CUstream __pyx_v_stream, bool __pyx_v_async) {
  struct __pyx_t_4cuda_4_lib_7ccudart_5utils_cudaArrayLocalState __pyx_v_arrayState;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  size_t __pyx_v_copied;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 __pyx_t_3;
  int __pyx_t_4;
  size_t __pyx_t_5;
  __pyx_t_4cuda_5ccuda_CUarray __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copyToDevice", __pyx_f[1], 1873, 1, __PYX_ERR(1, 1873, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1876
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))             # <<<<<<<<<<<<<<
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 */
  (void)(memset((&__pyx_v_arrayState), 0, (sizeof(__pyx_v_arrayState))));

  /* "cuda/_lib/ccudart/utils.pyx":1877
 *     cdef cudaError_t err
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  try {
    __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getLocalState((&__pyx_v_arrayState), __pyx_v_thisArray);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1877, __pyx_L1_error)
  }
  __pyx_v_err = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1878
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef size_t copied = 0
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1879
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     cdef size_t copied = 0
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1878
 *     memset(&arrayState, 0, sizeof(arrayState))
 *     err = getLocalState(&arrayState, thisArray)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     cdef size_t copied = 0
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1880
 *     if err != cudaSuccess:
 *         return err
 *     cdef size_t copied = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 */
  __pyx_v_copied = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1881
 *         return err
 *     cdef size_t copied = 0
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy3DInit(__pyx_v_type, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 1881, __pyx_L1_error)
  }
  __pyx_v_cp = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":1883
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):             # <<<<<<<<<<<<<<
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  __pyx_t_4 = ((__pyx_v_wOffset > 0) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_count >= (__pyx_v_arrayState.widthInBytes - __pyx_v_wOffset)) != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1884
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst             # <<<<<<<<<<<<<<
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset
 */
    __pyx_v_cp.dstDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst);

    /* "cuda/_lib/ccudart/utils.pyx":1885
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst
 *         cp.dstPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = dstOffset
 *         cp.dstY          = 0
 */
    __pyx_t_5 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.dstPitch = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1886
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = 0
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_dstOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1887
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset
 *         cp.dstY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.srcArray      = arrayState.array
 */
    __pyx_v_cp.dstY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1889
 *         cp.dstY          = 0
 * 
 *         cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset
 */
    __pyx_t_6 = __pyx_v_arrayState.array;
    __pyx_v_cp.srcArray = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1890
 * 
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = hOffset
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1891
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = 1
 */
    __pyx_v_cp.srcY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1893
 *         cp.srcY          = hOffset
 * 
 *         cp.Height        = 1             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset
 * 
 */
    __pyx_v_cp.Height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1894
 * 
 *         cp.Height        = 1
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset             # <<<<<<<<<<<<<<
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 */
    __pyx_v_cp.WidthInBytes = (__pyx_v_arrayState.widthInBytes - __pyx_v_wOffset);

    /* "cuda/_lib/ccudart/utils.pyx":1896
 *         cp.WidthInBytes  = arrayState.widthInBytes - wOffset
 * 
 *         copied  += cp.Height * cp.WidthInBytes             # <<<<<<<<<<<<<<
 *         hOffset += cp.Height
 *         wOffset  = 0
 */
    __pyx_v_copied = (__pyx_v_copied + (__pyx_v_cp.Height * __pyx_v_cp.WidthInBytes));

    /* "cuda/_lib/ccudart/utils.pyx":1897
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height             # <<<<<<<<<<<<<<
 *         wOffset  = 0
 * 
 */
    __pyx_v_hOffset = (__pyx_v_hOffset + __pyx_v_cp.Height);

    /* "cuda/_lib/ccudart/utils.pyx":1898
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height
 *         wOffset  = 0             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_wOffset = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1900
 *         wOffset  = 0
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1900, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1901
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1902
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     if (count - copied >= arrayState.widthInBytes):
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1901
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1883
 *     cdef ccuda.CUDA_MEMCPY3D_v2 cp = memCopy3DInit(type, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 * 
 *     if (wOffset > 0) and (count >= arrayState.widthInBytes - wOffset):             # <<<<<<<<<<<<<<
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>dst
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1904
 *             return err
 * 
 *     if (count - copied >= arrayState.widthInBytes):             # <<<<<<<<<<<<<<
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  __pyx_t_2 = (((__pyx_v_count - __pyx_v_copied) >= __pyx_v_arrayState.widthInBytes) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1905
 * 
 *     if (count - copied >= arrayState.widthInBytes):
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)             # <<<<<<<<<<<<<<
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset
 */
    __pyx_v_cp.dstDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_dst + __pyx_v_copied));

    /* "cuda/_lib/ccudart/utils.pyx":1906
 *     if (count - copied >= arrayState.widthInBytes):
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)
 *         cp.dstPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = dstOffset
 *         cp.dstY          = 0
 */
    __pyx_t_5 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.dstPitch = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1907
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = 0
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_dstOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1908
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset
 *         cp.dstY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.srcArray      = arrayState.array
 */
    __pyx_v_cp.dstY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1910
 *         cp.dstY          = 0
 * 
 *         cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset
 */
    __pyx_t_6 = __pyx_v_arrayState.array;
    __pyx_v_cp.srcArray = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1911
 * 
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = hOffset
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1912
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)
 */
    __pyx_v_cp.srcY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1914
 *         cp.srcY          = hOffset
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = arrayState.widthInBytes
 * 
 */
    __pyx_t_5 = (__pyx_v_count - __pyx_v_copied);
    if (unlikely(__pyx_v_arrayState.widthInBytes == 0)) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1914, __pyx_L1_error)
    }
    __pyx_v_cp.Height = ((size_t)(((double)__pyx_t_5) / ((double)__pyx_v_arrayState.widthInBytes)));

    /* "cuda/_lib/ccudart/utils.pyx":1915
 * 
 *         cp.Height        = <size_t>((count - copied) / arrayState.widthInBytes)
 *         cp.WidthInBytes  = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 */
    __pyx_t_5 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.WidthInBytes = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1917
 *         cp.WidthInBytes  = arrayState.widthInBytes
 * 
 *         copied  += cp.Height * cp.WidthInBytes             # <<<<<<<<<<<<<<
 *         hOffset += cp.Height
 *         wOffset  = 0
 */
    __pyx_v_copied = (__pyx_v_copied + (__pyx_v_cp.Height * __pyx_v_cp.WidthInBytes));

    /* "cuda/_lib/ccudart/utils.pyx":1918
 * 
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height             # <<<<<<<<<<<<<<
 *         wOffset  = 0
 * 
 */
    __pyx_v_hOffset = (__pyx_v_hOffset + __pyx_v_cp.Height);

    /* "cuda/_lib/ccudart/utils.pyx":1919
 *         copied  += cp.Height * cp.WidthInBytes
 *         hOffset += cp.Height
 *         wOffset  = 0             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_wOffset = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1921
 *         wOffset  = 0
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1921, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1922
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1923
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     if (count - copied > 0):
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1922
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1904
 *             return err
 * 
 *     if (count - copied >= arrayState.widthInBytes):             # <<<<<<<<<<<<<<
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1925
 *             return err
 * 
 *     if (count - copied > 0):             # <<<<<<<<<<<<<<
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  __pyx_t_2 = (((__pyx_v_count - __pyx_v_copied) > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1926
 * 
 *     if (count - copied > 0):
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)             # <<<<<<<<<<<<<<
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset
 */
    __pyx_v_cp.dstDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_dst + __pyx_v_copied));

    /* "cuda/_lib/ccudart/utils.pyx":1927
 *     if (count - copied > 0):
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)
 *         cp.dstPitch      = arrayState.widthInBytes             # <<<<<<<<<<<<<<
 *         cp.dstXInBytes   = dstOffset
 *         cp.dstY          = 0
 */
    __pyx_t_5 = __pyx_v_arrayState.widthInBytes;
    __pyx_v_cp.dstPitch = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":1928
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset             # <<<<<<<<<<<<<<
 *         cp.dstY          = 0
 * 
 */
    __pyx_v_cp.dstXInBytes = __pyx_v_dstOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1929
 *         cp.dstPitch      = arrayState.widthInBytes
 *         cp.dstXInBytes   = dstOffset
 *         cp.dstY          = 0             # <<<<<<<<<<<<<<
 * 
 *         cp.srcArray      = arrayState.array
 */
    __pyx_v_cp.dstY = 0;

    /* "cuda/_lib/ccudart/utils.pyx":1931
 *         cp.dstY          = 0
 * 
 *         cp.srcArray      = arrayState.array             # <<<<<<<<<<<<<<
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset
 */
    __pyx_t_6 = __pyx_v_arrayState.array;
    __pyx_v_cp.srcArray = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":1932
 * 
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset             # <<<<<<<<<<<<<<
 *         cp.srcY          = hOffset
 * 
 */
    __pyx_v_cp.srcXInBytes = __pyx_v_wOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1933
 *         cp.srcArray      = arrayState.array
 *         cp.srcXInBytes   = wOffset
 *         cp.srcY          = hOffset             # <<<<<<<<<<<<<<
 * 
 *         cp.Height        = 1
 */
    __pyx_v_cp.srcY = __pyx_v_hOffset;

    /* "cuda/_lib/ccudart/utils.pyx":1935
 *         cp.srcY          = hOffset
 * 
 *         cp.Height        = 1             # <<<<<<<<<<<<<<
 *         cp.WidthInBytes  = count - copied
 * 
 */
    __pyx_v_cp.Height = 1;

    /* "cuda/_lib/ccudart/utils.pyx":1936
 * 
 *         cp.Height        = 1
 *         cp.WidthInBytes  = count - copied             # <<<<<<<<<<<<<<
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 */
    __pyx_v_cp.WidthInBytes = (__pyx_v_count - __pyx_v_copied);

    /* "cuda/_lib/ccudart/utils.pyx":1938
 *         cp.WidthInBytes  = count - copied
 * 
 *         err = driverMemcpy3D(&cp, stream, async)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_1 = __pyx_f_4cuda_4_lib_7ccudart_5utils_driverMemcpy3D((&__pyx_v_cp), __pyx_v_stream, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 1938, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_1;

    /* "cuda/_lib/ccudart/utils.pyx":1939
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_2) {

      /* "cuda/_lib/ccudart/utils.pyx":1940
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":1939
 * 
 *         err = driverMemcpy3D(&cp, stream, async)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":1925
 *             return err
 * 
 *     if (count - copied > 0):             # <<<<<<<<<<<<<<
 *         cp.dstDevice     = <ccuda.CUdeviceptr_v2>(dst + copied)
 *         cp.dstPitch      = arrayState.widthInBytes
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1942
 *             return err
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1873
 * 
 * 
 * cdef cudaError_t copyToDevice(ccuda.CUmemorytype type, cudaArray_const_t thisArray, size_t hOffset, size_t wOffset, const char *dst, size_t dstOffset, size_t count, ccuda.CUstream stream, bool async) nogil except +:             # <<<<<<<<<<<<<<
 *     cdef cudaArrayLocalState arrayState
 *     cdef cudaError_t err
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.copyToDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1945
 * 
 * 
 * cdef cudaError_t copy1DConvertTo3DParams(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaMemcpy3DParms *p) nogil:             # <<<<<<<<<<<<<<
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))
 *     p[0].extent.width = count
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_copy1DConvertTo3DParams(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind, struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms *__pyx_v_p) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("copy1DConvertTo3DParams", __pyx_f[1], 1945, 1, __PYX_ERR(1, 1945, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1946
 * 
 * cdef cudaError_t copy1DConvertTo3DParams(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaMemcpy3DParms *p) nogil:
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))             # <<<<<<<<<<<<<<
 *     p[0].extent.width = count
 *     p[0].extent.height = 1
 */
  (void)(memset(__pyx_v_p, 0, (sizeof(struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms))));

  /* "cuda/_lib/ccudart/utils.pyx":1947
 * cdef cudaError_t copy1DConvertTo3DParams(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaMemcpy3DParms *p) nogil:
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))
 *     p[0].extent.width = count             # <<<<<<<<<<<<<<
 *     p[0].extent.height = 1
 *     p[0].extent.depth = 1
 */
  (__pyx_v_p[0]).extent.width = __pyx_v_count;

  /* "cuda/_lib/ccudart/utils.pyx":1948
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))
 *     p[0].extent.width = count
 *     p[0].extent.height = 1             # <<<<<<<<<<<<<<
 *     p[0].extent.depth = 1
 *     p[0].dstPtr.ptr = dst
 */
  (__pyx_v_p[0]).extent.height = 1;

  /* "cuda/_lib/ccudart/utils.pyx":1949
 *     p[0].extent.width = count
 *     p[0].extent.height = 1
 *     p[0].extent.depth = 1             # <<<<<<<<<<<<<<
 *     p[0].dstPtr.ptr = dst
 *     p[0].srcPtr.ptr = <void *>src
 */
  (__pyx_v_p[0]).extent.depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":1950
 *     p[0].extent.height = 1
 *     p[0].extent.depth = 1
 *     p[0].dstPtr.ptr = dst             # <<<<<<<<<<<<<<
 *     p[0].srcPtr.ptr = <void *>src
 *     p[0].kind = kind
 */
  (__pyx_v_p[0]).dstPtr.ptr = __pyx_v_dst;

  /* "cuda/_lib/ccudart/utils.pyx":1951
 *     p[0].extent.depth = 1
 *     p[0].dstPtr.ptr = dst
 *     p[0].srcPtr.ptr = <void *>src             # <<<<<<<<<<<<<<
 *     p[0].kind = kind
 * 
 */
  (__pyx_v_p[0]).srcPtr.ptr = ((void *)__pyx_v_src);

  /* "cuda/_lib/ccudart/utils.pyx":1952
 *     p[0].dstPtr.ptr = dst
 *     p[0].srcPtr.ptr = <void *>src
 *     p[0].kind = kind             # <<<<<<<<<<<<<<
 * 
 * cdef void toDriverMemsetNodeParams(const cudaMemsetParams *pRuntimeParams, ccuda.CUDA_MEMSET_NODE_PARAMS *pDriverParams) nogil:
 */
  (__pyx_v_p[0]).kind = __pyx_v_kind;

  /* "cuda/_lib/ccudart/utils.pyx":1945
 * 
 * 
 * cdef cudaError_t copy1DConvertTo3DParams(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaMemcpy3DParms *p) nogil:             # <<<<<<<<<<<<<<
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))
 *     p[0].extent.width = count
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.copy1DConvertTo3DParams", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1954
 *     p[0].kind = kind
 * 
 * cdef void toDriverMemsetNodeParams(const cudaMemsetParams *pRuntimeParams, ccuda.CUDA_MEMSET_NODE_PARAMS *pDriverParams) nogil:             # <<<<<<<<<<<<<<
 *     pDriverParams[0].dst = <ccuda.CUdeviceptr_v2>pRuntimeParams[0].dst
 *     pDriverParams[0].pitch = pRuntimeParams[0].pitch
 */

static void __pyx_f_4cuda_4_lib_7ccudart_5utils_toDriverMemsetNodeParams(struct __pyx_t_4cuda_7ccudart_cudaMemsetParams const *__pyx_v_pRuntimeParams, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_pDriverParams) {
  __Pyx_TraceDeclarations
  size_t __pyx_t_1;
  unsigned int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("toDriverMemsetNodeParams", __pyx_f[1], 1954, 1, __PYX_ERR(1, 1954, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1955
 * 
 * cdef void toDriverMemsetNodeParams(const cudaMemsetParams *pRuntimeParams, ccuda.CUDA_MEMSET_NODE_PARAMS *pDriverParams) nogil:
 *     pDriverParams[0].dst = <ccuda.CUdeviceptr_v2>pRuntimeParams[0].dst             # <<<<<<<<<<<<<<
 *     pDriverParams[0].pitch = pRuntimeParams[0].pitch
 *     pDriverParams[0].value = pRuntimeParams[0].value
 */
  (__pyx_v_pDriverParams[0]).dst = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_pRuntimeParams[0]).dst);

  /* "cuda/_lib/ccudart/utils.pyx":1956
 * cdef void toDriverMemsetNodeParams(const cudaMemsetParams *pRuntimeParams, ccuda.CUDA_MEMSET_NODE_PARAMS *pDriverParams) nogil:
 *     pDriverParams[0].dst = <ccuda.CUdeviceptr_v2>pRuntimeParams[0].dst
 *     pDriverParams[0].pitch = pRuntimeParams[0].pitch             # <<<<<<<<<<<<<<
 *     pDriverParams[0].value = pRuntimeParams[0].value
 *     pDriverParams[0].elementSize = pRuntimeParams[0].elementSize
 */
  __pyx_t_1 = (__pyx_v_pRuntimeParams[0]).pitch;
  (__pyx_v_pDriverParams[0]).pitch = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1957
 *     pDriverParams[0].dst = <ccuda.CUdeviceptr_v2>pRuntimeParams[0].dst
 *     pDriverParams[0].pitch = pRuntimeParams[0].pitch
 *     pDriverParams[0].value = pRuntimeParams[0].value             # <<<<<<<<<<<<<<
 *     pDriverParams[0].elementSize = pRuntimeParams[0].elementSize
 *     pDriverParams[0].width = pRuntimeParams[0].width
 */
  __pyx_t_2 = (__pyx_v_pRuntimeParams[0]).value;
  (__pyx_v_pDriverParams[0]).value = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":1958
 *     pDriverParams[0].pitch = pRuntimeParams[0].pitch
 *     pDriverParams[0].value = pRuntimeParams[0].value
 *     pDriverParams[0].elementSize = pRuntimeParams[0].elementSize             # <<<<<<<<<<<<<<
 *     pDriverParams[0].width = pRuntimeParams[0].width
 *     pDriverParams[0].height = pRuntimeParams[0].height
 */
  __pyx_t_2 = (__pyx_v_pRuntimeParams[0]).elementSize;
  (__pyx_v_pDriverParams[0]).elementSize = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":1959
 *     pDriverParams[0].value = pRuntimeParams[0].value
 *     pDriverParams[0].elementSize = pRuntimeParams[0].elementSize
 *     pDriverParams[0].width = pRuntimeParams[0].width             # <<<<<<<<<<<<<<
 *     pDriverParams[0].height = pRuntimeParams[0].height
 * 
 */
  __pyx_t_1 = (__pyx_v_pRuntimeParams[0]).width;
  (__pyx_v_pDriverParams[0]).width = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1960
 *     pDriverParams[0].elementSize = pRuntimeParams[0].elementSize
 *     pDriverParams[0].width = pRuntimeParams[0].width
 *     pDriverParams[0].height = pRuntimeParams[0].height             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = (__pyx_v_pRuntimeParams[0]).height;
  (__pyx_v_pDriverParams[0]).height = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":1954
 *     p[0].kind = kind
 * 
 * cdef void toDriverMemsetNodeParams(const cudaMemsetParams *pRuntimeParams, ccuda.CUDA_MEMSET_NODE_PARAMS *pDriverParams) nogil:             # <<<<<<<<<<<<<<
 *     pDriverParams[0].dst = <ccuda.CUdeviceptr_v2>pRuntimeParams[0].dst
 *     pDriverParams[0].pitch = pRuntimeParams[0].pitch
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.toDriverMemsetNodeParams", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
}

/* "cuda/_lib/ccudart/utils.pyx":1963
 * 
 * 
 * cdef cudaError_t getElementSize(size_t *elementSize, cudaArray_t array) nogil:             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR driverDesc
 *     cdef cudaError_t err
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getElementSize(size_t *__pyx_v_elementSize, __pyx_t_4cuda_7ccudart_cudaArray_t __pyx_v_array) {
  __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR __pyx_v_driverDesc;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_1;
  int __pyx_t_2;
  unsigned int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getElementSize", __pyx_f[1], 1963, 1, __PYX_ERR(1, 1963, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1966
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR driverDesc
 *     cdef cudaError_t err
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>array)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2((&__pyx_v_driverDesc), ((__pyx_t_4cuda_5ccuda_CUarray)__pyx_v_array)); if (unlikely(__pyx_t_1 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 1966, __pyx_L1_error)
  __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_1);

  /* "cuda/_lib/ccudart/utils.pyx":1967
 *     cdef cudaError_t err
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>array)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     if (driverDesc.Format == ccuda.CU_AD_FORMAT_FLOAT or
 */
  __pyx_t_2 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_2) {

    /* "cuda/_lib/ccudart/utils.pyx":1968
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>array)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     if (driverDesc.Format == ccuda.CU_AD_FORMAT_FLOAT or
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32 or
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1967
 *     cdef cudaError_t err
 *     err = <cudaError_t>ccuda._cuArray3DGetDescriptor_v2(&driverDesc, <ccuda.CUarray>array)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     if (driverDesc.Format == ccuda.CU_AD_FORMAT_FLOAT or
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":1969
 *     if err != cudaSuccess:
 *         return err
 *     if (driverDesc.Format == ccuda.CU_AD_FORMAT_FLOAT or             # <<<<<<<<<<<<<<
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32 or
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT32):
 */
  switch (__pyx_v_driverDesc.Format) {
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_FLOAT:
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT32:

    /* "cuda/_lib/ccudart/utils.pyx":1970
 *         return err
 *     if (driverDesc.Format == ccuda.CU_AD_FORMAT_FLOAT or
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32 or             # <<<<<<<<<<<<<<
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT32):
 *         elementSize[0] = driverDesc.NumChannels * 4
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT32:

    /* "cuda/_lib/ccudart/utils.pyx":1972
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32 or
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT32):
 *         elementSize[0] = driverDesc.NumChannels * 4             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_HALF or
 */
    (__pyx_v_elementSize[0]) = (__pyx_v_driverDesc.NumChannels * 4);

    /* "cuda/_lib/ccudart/utils.pyx":1973
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT32):
 *         elementSize[0] = driverDesc.NumChannels * 4
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_HALF or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT16 or
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1969
 *     if err != cudaSuccess:
 *         return err
 *     if (driverDesc.Format == ccuda.CU_AD_FORMAT_FLOAT or             # <<<<<<<<<<<<<<
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT32 or
 *         driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT32):
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_HALF:

    /* "cuda/_lib/ccudart/utils.pyx":1974
 *         elementSize[0] = driverDesc.NumChannels * 4
 *         return cudaSuccess
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_HALF or             # <<<<<<<<<<<<<<
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT16 or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT16:

    /* "cuda/_lib/ccudart/utils.pyx":1975
 *         return cudaSuccess
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_HALF or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT16 or             # <<<<<<<<<<<<<<
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *         elementSize[0] = driverDesc.NumChannels * 2
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT16:

    /* "cuda/_lib/ccudart/utils.pyx":1977
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT16 or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *         elementSize[0] = driverDesc.NumChannels * 2             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT8 or
 */
    (__pyx_v_elementSize[0]) = (__pyx_v_driverDesc.NumChannels * 2);

    /* "cuda/_lib/ccudart/utils.pyx":1978
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 *         elementSize[0] = driverDesc.NumChannels * 2
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT8 or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8 or
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1974
 *         elementSize[0] = driverDesc.NumChannels * 4
 *         return cudaSuccess
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_HALF or             # <<<<<<<<<<<<<<
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT16 or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT16):
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_SIGNED_INT8:

    /* "cuda/_lib/ccudart/utils.pyx":1979
 *         elementSize[0] = driverDesc.NumChannels * 2
 *         return cudaSuccess
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT8 or             # <<<<<<<<<<<<<<
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8 or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_NV12):
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_UNSIGNED_INT8:

    /* "cuda/_lib/ccudart/utils.pyx":1980
 *         return cudaSuccess
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT8 or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8 or             # <<<<<<<<<<<<<<
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_NV12):
 *         elementSize[0] = driverDesc.NumChannels
 */
    case __pyx_e_4cuda_5ccuda_CU_AD_FORMAT_NV12:

    /* "cuda/_lib/ccudart/utils.pyx":1982
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8 or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_NV12):
 *         elementSize[0] = driverDesc.NumChannels             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     return cudaErrorInvalidChannelDescriptor
 */
    __pyx_t_3 = __pyx_v_driverDesc.NumChannels;
    (__pyx_v_elementSize[0]) = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":1983
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_NV12):
 *         elementSize[0] = driverDesc.NumChannels
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     return cudaErrorInvalidChannelDescriptor
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":1979
 *         elementSize[0] = driverDesc.NumChannels * 2
 *         return cudaSuccess
 *     elif (driverDesc.Format == ccuda.CU_AD_FORMAT_SIGNED_INT8 or             # <<<<<<<<<<<<<<
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_UNSIGNED_INT8 or
 *           driverDesc.Format == ccuda.CU_AD_FORMAT_NV12):
 */
    break;
    default: break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":1984
 *         elementSize[0] = driverDesc.NumChannels
 *         return cudaSuccess
 *     return cudaErrorInvalidChannelDescriptor             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidChannelDescriptor;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1963
 * 
 * 
 * cdef cudaError_t getElementSize(size_t *elementSize, cudaArray_t array) nogil:             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR driverDesc
 *     cdef cudaError_t err
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.getElementSize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":1987
 * 
 * 
 * cdef cudaError_t toDriverMemCopy3DParams(const cudaMemcpy3DParms *p, ccuda.CUDA_MEMCPY3D *cd) nogil:             # <<<<<<<<<<<<<<
 *     memset(cd, 0, sizeof(ccuda.CUDA_MEMCPY3D))
 *     cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_toDriverMemCopy3DParams(struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms const *__pyx_v_p, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D *__pyx_v_cd) {
  size_t __pyx_v_srcElementSize;
  size_t __pyx_v_dstElementSize;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  struct __pyx_t_4cuda_7ccudart_cudaExtent __pyx_v_srcBlockExtent;
  struct __pyx_t_4cuda_7ccudart_cudaExtent __pyx_v_dstBlockExtent;
  struct __pyx_t_4cuda_7ccudart_cudaExtent __pyx_v_copyBlockExtent;
  __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_srcFmt;
  __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_dstFmt;
  int __pyx_v_numChannels;
  size_t __pyx_v_adjustedSrcHeight;
  size_t __pyx_v_adjustedDstHeight;
  size_t __pyx_v_elementSize;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_3;
  void *__pyx_t_4;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("toDriverMemCopy3DParams", __pyx_f[1], 1987, 1, __PYX_ERR(1, 1987, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":1988
 * 
 * cdef cudaError_t toDriverMemCopy3DParams(const cudaMemcpy3DParms *p, ccuda.CUDA_MEMCPY3D *cd) nogil:
 *     memset(cd, 0, sizeof(ccuda.CUDA_MEMCPY3D))             # <<<<<<<<<<<<<<
 *     cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */
  (void)(memset(__pyx_v_cd, 0, (sizeof(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D))));

  /* "cuda/_lib/ccudart/utils.pyx":1989
 * cdef cudaError_t toDriverMemCopy3DParams(const cudaMemcpy3DParms *p, ccuda.CUDA_MEMCPY3D *cd) nogil:
 *     memset(cd, 0, sizeof(ccuda.CUDA_MEMCPY3D))
 *     cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE             # <<<<<<<<<<<<<<
 *     cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     cd[0].WidthInBytes = 0
 */
  (__pyx_v_cd[0]).dstMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE;

  /* "cuda/_lib/ccudart/utils.pyx":1990
 *     memset(cd, 0, sizeof(ccuda.CUDA_MEMCPY3D))
 *     cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE             # <<<<<<<<<<<<<<
 *     cd[0].WidthInBytes = 0
 *     cd[0].Height = 1
 */
  (__pyx_v_cd[0]).srcMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE;

  /* "cuda/_lib/ccudart/utils.pyx":1991
 *     cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     cd[0].WidthInBytes = 0             # <<<<<<<<<<<<<<
 *     cd[0].Height = 1
 *     cd[0].Depth = 1
 */
  (__pyx_v_cd[0]).WidthInBytes = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1992
 *     cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     cd[0].WidthInBytes = 0
 *     cd[0].Height = 1             # <<<<<<<<<<<<<<
 *     cd[0].Depth = 1
 *     cdef size_t srcElementSize = 0
 */
  (__pyx_v_cd[0]).Height = 1;

  /* "cuda/_lib/ccudart/utils.pyx":1993
 *     cd[0].WidthInBytes = 0
 *     cd[0].Height = 1
 *     cd[0].Depth = 1             # <<<<<<<<<<<<<<
 *     cdef size_t srcElementSize = 0
 *     cdef size_t dstElementSize = 0
 */
  (__pyx_v_cd[0]).Depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":1994
 *     cd[0].Height = 1
 *     cd[0].Depth = 1
 *     cdef size_t srcElementSize = 0             # <<<<<<<<<<<<<<
 *     cdef size_t dstElementSize = 0
 *     cdef cudaError_t err
 */
  __pyx_v_srcElementSize = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1995
 *     cd[0].Depth = 1
 *     cdef size_t srcElementSize = 0
 *     cdef size_t dstElementSize = 0             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err
 * 
 */
  __pyx_v_dstElementSize = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2003
 *     cdef ccuda.CUarray_format srcFmt
 *     cdef ccuda.CUarray_format dstFmt
 *     cdef int numChannels = 0             # <<<<<<<<<<<<<<
 *     srcBlockExtent.width = srcBlockExtent.height = srcBlockExtent.depth = 1
 *     dstBlockExtent.width = dstBlockExtent.height = dstBlockExtent.depth = 1
 */
  __pyx_v_numChannels = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2004
 *     cdef ccuda.CUarray_format dstFmt
 *     cdef int numChannels = 0
 *     srcBlockExtent.width = srcBlockExtent.height = srcBlockExtent.depth = 1             # <<<<<<<<<<<<<<
 *     dstBlockExtent.width = dstBlockExtent.height = dstBlockExtent.depth = 1
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1
 */
  __pyx_v_srcBlockExtent.width = 1;
  __pyx_v_srcBlockExtent.height = 1;
  __pyx_v_srcBlockExtent.depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":2005
 *     cdef int numChannels = 0
 *     srcBlockExtent.width = srcBlockExtent.height = srcBlockExtent.depth = 1
 *     dstBlockExtent.width = dstBlockExtent.height = dstBlockExtent.depth = 1             # <<<<<<<<<<<<<<
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1
 * 
 */
  __pyx_v_dstBlockExtent.width = 1;
  __pyx_v_dstBlockExtent.height = 1;
  __pyx_v_dstBlockExtent.depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":2006
 *     srcBlockExtent.width = srcBlockExtent.height = srcBlockExtent.depth = 1
 *     dstBlockExtent.width = dstBlockExtent.height = dstBlockExtent.depth = 1
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1             # <<<<<<<<<<<<<<
 * 
 *     if p[0].extent.width == 0 or p[0].extent.height == 0 or p[0].extent.depth == 0:
 */
  __pyx_v_copyBlockExtent.width = 1;
  __pyx_v_copyBlockExtent.height = 1;
  __pyx_v_copyBlockExtent.depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":2008
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1
 * 
 *     if p[0].extent.width == 0 or p[0].extent.height == 0 or p[0].extent.depth == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  __pyx_t_2 = (((__pyx_v_p[0]).extent.width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_p[0]).extent.height == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_p[0]).extent.depth == 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2009
 * 
 *     if p[0].extent.width == 0 or p[0].extent.height == 0 or p[0].extent.depth == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 *     if p[0].kind == cudaMemcpyHostToHost:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2008
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1
 * 
 *     if p[0].extent.width == 0 or p[0].extent.height == 0 or p[0].extent.depth == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2011
 *         return cudaSuccess
 * 
 *     if p[0].kind == cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 */
  __pyx_t_1 = (((__pyx_v_p[0]).kind == __pyx_e_4cuda_7ccudart_cudaMemcpyHostToHost) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2012
 * 
 *     if p[0].kind == cudaMemcpyHostToHost:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST             # <<<<<<<<<<<<<<
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *     elif p[0].kind == cudaMemcpyHostToDevice:
 */
    (__pyx_v_cd[0]).srcMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST;

    /* "cuda/_lib/ccudart/utils.pyx":2013
 *     if p[0].kind == cudaMemcpyHostToHost:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST             # <<<<<<<<<<<<<<
 *     elif p[0].kind == cudaMemcpyHostToDevice:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 */
    (__pyx_v_cd[0]).dstMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST;

    /* "cuda/_lib/ccudart/utils.pyx":2011
 *         return cudaSuccess
 * 
 *     if p[0].kind == cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 */
    goto __pyx_L7;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2014
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *     elif p[0].kind == cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */
  __pyx_t_1 = (((__pyx_v_p[0]).kind == __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2015
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *     elif p[0].kind == cudaMemcpyHostToDevice:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST             # <<<<<<<<<<<<<<
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     elif p[0].kind == cudaMemcpyDeviceToHost:
 */
    (__pyx_v_cd[0]).srcMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST;

    /* "cuda/_lib/ccudart/utils.pyx":2016
 *     elif p[0].kind == cudaMemcpyHostToDevice:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE             # <<<<<<<<<<<<<<
 *     elif p[0].kind == cudaMemcpyDeviceToHost:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */
    (__pyx_v_cd[0]).dstMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE;

    /* "cuda/_lib/ccudart/utils.pyx":2014
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *     elif p[0].kind == cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */
    goto __pyx_L7;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2017
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     elif p[0].kind == cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 */
  __pyx_t_1 = (((__pyx_v_p[0]).kind == __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2018
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     elif p[0].kind == cudaMemcpyDeviceToHost:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE             # <<<<<<<<<<<<<<
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *     elif p[0].kind == cudaMemcpyDeviceToDevice:
 */
    (__pyx_v_cd[0]).srcMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE;

    /* "cuda/_lib/ccudart/utils.pyx":2019
 *     elif p[0].kind == cudaMemcpyDeviceToHost:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST             # <<<<<<<<<<<<<<
 *     elif p[0].kind == cudaMemcpyDeviceToDevice:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */
    (__pyx_v_cd[0]).dstMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST;

    /* "cuda/_lib/ccudart/utils.pyx":2017
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     elif p[0].kind == cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 */
    goto __pyx_L7;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2020
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *     elif p[0].kind == cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */
  __pyx_t_1 = (((__pyx_v_p[0]).kind == __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2021
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *     elif p[0].kind == cudaMemcpyDeviceToDevice:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE             # <<<<<<<<<<<<<<
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     elif p[0].kind == cudaMemcpyDefault:
 */
    (__pyx_v_cd[0]).srcMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE;

    /* "cuda/_lib/ccudart/utils.pyx":2022
 *     elif p[0].kind == cudaMemcpyDeviceToDevice:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE             # <<<<<<<<<<<<<<
 *     elif p[0].kind == cudaMemcpyDefault:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 */
    (__pyx_v_cd[0]).dstMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE;

    /* "cuda/_lib/ccudart/utils.pyx":2020
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *     elif p[0].kind == cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */
    goto __pyx_L7;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2023
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     elif p[0].kind == cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 */
  __pyx_t_1 = (((__pyx_v_p[0]).kind == __pyx_e_4cuda_7ccudart_cudaMemcpyDefault) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2024
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     elif p[0].kind == cudaMemcpyDefault:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED             # <<<<<<<<<<<<<<
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 *     else:
 */
    (__pyx_v_cd[0]).srcMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED;

    /* "cuda/_lib/ccudart/utils.pyx":2025
 *     elif p[0].kind == cudaMemcpyDefault:
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidMemcpyDirection
 */
    (__pyx_v_cd[0]).dstMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED;

    /* "cuda/_lib/ccudart/utils.pyx":2023
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *     elif p[0].kind == cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 */
    goto __pyx_L7;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2027
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 *     else:
 *         return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 * 
 *     if p[0].srcArray:
 */
  /*else*/ {
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    goto __pyx_L0;
  }
  __pyx_L7:;

  /* "cuda/_lib/ccudart/utils.pyx":2029
 *         return cudaErrorInvalidMemcpyDirection
 * 
 *     if p[0].srcArray:             # <<<<<<<<<<<<<<
 *         err = getFormat(p[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:
 */
  __pyx_t_1 = ((__pyx_v_p[0]).srcArray != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2030
 * 
 *     if p[0].srcArray:
 *         err = getFormat(p[0].srcArray, numChannels, &srcFmt)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat((__pyx_v_p[0]).srcArray, __pyx_v_numChannels, (&__pyx_v_srcFmt));
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2030, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2031
 *     if p[0].srcArray:
 *         err = getFormat(p[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2032
 *         err = getFormat(p[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2031
 *     if p[0].srcArray:
 *         err = getFormat(p[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2033
 *         if err != cudaSuccess:
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getArrayBlockExtent((&__pyx_v_srcBlockExtent), __pyx_v_srcFmt);

    /* "cuda/_lib/ccudart/utils.pyx":2034
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         copyBlockExtent = srcBlockExtent
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2035
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         copyBlockExtent = srcBlockExtent
 *     if p[0].dstArray:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2034
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         copyBlockExtent = srcBlockExtent
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2036
 *         if err != cudaSuccess:
 *             return err
 *         copyBlockExtent = srcBlockExtent             # <<<<<<<<<<<<<<
 *     if p[0].dstArray:
 *         err = getFormat(p[0].dstArray, numChannels, &dstFmt)
 */
    __pyx_v_copyBlockExtent = __pyx_v_srcBlockExtent;

    /* "cuda/_lib/ccudart/utils.pyx":2029
 *         return cudaErrorInvalidMemcpyDirection
 * 
 *     if p[0].srcArray:             # <<<<<<<<<<<<<<
 *         err = getFormat(p[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2037
 *             return err
 *         copyBlockExtent = srcBlockExtent
 *     if p[0].dstArray:             # <<<<<<<<<<<<<<
 *         err = getFormat(p[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:
 */
  __pyx_t_1 = ((__pyx_v_p[0]).dstArray != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2038
 *         copyBlockExtent = srcBlockExtent
 *     if p[0].dstArray:
 *         err = getFormat(p[0].dstArray, numChannels, &dstFmt)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat((__pyx_v_p[0]).dstArray, __pyx_v_numChannels, (&__pyx_v_dstFmt));
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2038, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2039
 *     if p[0].dstArray:
 *         err = getFormat(p[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2040
 *         err = getFormat(p[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2039
 *     if p[0].dstArray:
 *         err = getFormat(p[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2041
 *         if err != cudaSuccess:
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getArrayBlockExtent((&__pyx_v_dstBlockExtent), __pyx_v_dstFmt);

    /* "cuda/_lib/ccudart/utils.pyx":2042
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         if not p[0].srcArray:
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2043
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         if not p[0].srcArray:
 *             copyBlockExtent = dstBlockExtent
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2042
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         if not p[0].srcArray:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2044
 *         if err != cudaSuccess:
 *             return err
 *         if not p[0].srcArray:             # <<<<<<<<<<<<<<
 *             copyBlockExtent = dstBlockExtent
 * 
 */
    __pyx_t_1 = ((!((__pyx_v_p[0]).srcArray != 0)) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2045
 *             return err
 *         if not p[0].srcArray:
 *             copyBlockExtent = dstBlockExtent             # <<<<<<<<<<<<<<
 * 
 *     if p[0].srcArray:
 */
      __pyx_v_copyBlockExtent = __pyx_v_dstBlockExtent;

      /* "cuda/_lib/ccudart/utils.pyx":2044
 *         if err != cudaSuccess:
 *             return err
 *         if not p[0].srcArray:             # <<<<<<<<<<<<<<
 *             copyBlockExtent = dstBlockExtent
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2037
 *             return err
 *         copyBlockExtent = srcBlockExtent
 *     if p[0].dstArray:             # <<<<<<<<<<<<<<
 *         err = getFormat(p[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2047
 *             copyBlockExtent = dstBlockExtent
 * 
 *     if p[0].srcArray:             # <<<<<<<<<<<<<<
 *         if NULL != p[0].srcPtr.ptr or ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:
 *             return cudaErrorInvalidValue
 */
  __pyx_t_1 = ((__pyx_v_p[0]).srcArray != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2048
 * 
 *     if p[0].srcArray:
 *         if NULL != p[0].srcPtr.ptr or ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 */
    __pyx_t_2 = ((NULL != (__pyx_v_p[0]).srcPtr.ptr) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST == (__pyx_v_cd[0]).srcMemoryType) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L17_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2049
 *     if p[0].srcArray:
 *         if NULL != p[0].srcPtr.ptr or ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:
 *             return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 *         cd[0].srcArray = <ccuda.CUarray>p[0].srcArray
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2048
 * 
 *     if p[0].srcArray:
 *         if NULL != p[0].srcPtr.ptr or ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2050
 *         if NULL != p[0].srcPtr.ptr or ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:
 *             return cudaErrorInvalidValue
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY             # <<<<<<<<<<<<<<
 *         cd[0].srcArray = <ccuda.CUarray>p[0].srcArray
 *         err = getElementSize(&srcElementSize, p[0].srcArray)
 */
    (__pyx_v_cd[0]).srcMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY;

    /* "cuda/_lib/ccudart/utils.pyx":2051
 *             return cudaErrorInvalidValue
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 *         cd[0].srcArray = <ccuda.CUarray>p[0].srcArray             # <<<<<<<<<<<<<<
 *         err = getElementSize(&srcElementSize, p[0].srcArray)
 *         if err != cudaSuccess:
 */
    (__pyx_v_cd[0]).srcArray = ((__pyx_t_4cuda_5ccuda_CUarray)(__pyx_v_p[0]).srcArray);

    /* "cuda/_lib/ccudart/utils.pyx":2052
 *         cd[0].srcMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 *         cd[0].srcArray = <ccuda.CUarray>p[0].srcArray
 *         err = getElementSize(&srcElementSize, p[0].srcArray)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getElementSize((&__pyx_v_srcElementSize), (__pyx_v_p[0]).srcArray);

    /* "cuda/_lib/ccudart/utils.pyx":2053
 *         cd[0].srcArray = <ccuda.CUarray>p[0].srcArray
 *         err = getElementSize(&srcElementSize, p[0].srcArray)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     else:
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2054
 *         err = getElementSize(&srcElementSize, p[0].srcArray)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     else:
 *         if NULL == p[0].srcPtr.ptr:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2053
 *         cd[0].srcArray = <ccuda.CUarray>p[0].srcArray
 *         err = getElementSize(&srcElementSize, p[0].srcArray)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     else:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2047
 *             copyBlockExtent = dstBlockExtent
 * 
 *     if p[0].srcArray:             # <<<<<<<<<<<<<<
 *         if NULL != p[0].srcPtr.ptr or ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:
 *             return cudaErrorInvalidValue
 */
    goto __pyx_L15;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2056
 *             return err
 *     else:
 *         if NULL == p[0].srcPtr.ptr:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].srcPtr.pitch):
 */
  /*else*/ {
    __pyx_t_1 = ((NULL == (__pyx_v_p[0]).srcPtr.ptr) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2057
 *     else:
 *         if NULL == p[0].srcPtr.ptr:
 *             return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].srcPtr.pitch):
 *             return cudaErrorInvalidPitchValue
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2056
 *             return err
 *     else:
 *         if NULL == p[0].srcPtr.ptr:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].srcPtr.pitch):
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2058
 *         if NULL == p[0].srcPtr.ptr:
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].srcPtr.pitch):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:
 */
    __pyx_t_2 = (((__pyx_v_p[0]).extent.height > 1) != 0);
    if (!__pyx_t_2) {
    } else {
      goto __pyx_L23_next_and;
    }
    __pyx_t_2 = (((__pyx_v_p[0]).extent.depth > 1) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L22_bool_binop_done;
    }
    __pyx_L23_next_and:;
    __pyx_t_2 = (((__pyx_v_p[0]).extent.width > (__pyx_v_p[0]).srcPtr.pitch) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L22_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2059
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].srcPtr.pitch):
 *             return cudaErrorInvalidPitchValue             # <<<<<<<<<<<<<<
 *         if p[0].extent.depth > 1:
 *             adjustedSrcHeight = p[0].srcPtr.ysize * copyBlockExtent.height
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2058
 *         if NULL == p[0].srcPtr.ptr:
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].srcPtr.pitch):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2060
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].srcPtr.pitch):
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:             # <<<<<<<<<<<<<<
 *             adjustedSrcHeight = p[0].srcPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedSrcHeight:
 */
    __pyx_t_1 = (((__pyx_v_p[0]).extent.depth > 1) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2061
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:
 *             adjustedSrcHeight = p[0].srcPtr.ysize * copyBlockExtent.height             # <<<<<<<<<<<<<<
 *             if p[0].extent.height > adjustedSrcHeight:
 *                 return cudaErrorInvalidPitchValue
 */
      __pyx_v_adjustedSrcHeight = ((__pyx_v_p[0]).srcPtr.ysize * __pyx_v_copyBlockExtent.height);

      /* "cuda/_lib/ccudart/utils.pyx":2062
 *         if p[0].extent.depth > 1:
 *             adjustedSrcHeight = p[0].srcPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedSrcHeight:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidPitchValue
 * 
 */
      __pyx_t_1 = (((__pyx_v_p[0]).extent.height > __pyx_v_adjustedSrcHeight) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":2063
 *             adjustedSrcHeight = p[0].srcPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedSrcHeight:
 *                 return cudaErrorInvalidPitchValue             # <<<<<<<<<<<<<<
 * 
 *         if ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:
 */
        __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue;
        goto __pyx_L0;

        /* "cuda/_lib/ccudart/utils.pyx":2062
 *         if p[0].extent.depth > 1:
 *             adjustedSrcHeight = p[0].srcPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedSrcHeight:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidPitchValue
 * 
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":2060
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].srcPtr.pitch):
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:             # <<<<<<<<<<<<<<
 *             adjustedSrcHeight = p[0].srcPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedSrcHeight:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2065
 *                 return cudaErrorInvalidPitchValue
 * 
 *         if ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:             # <<<<<<<<<<<<<<
 *             cd[0].srcHost = p[0].srcPtr.ptr
 *         else:
 */
    __pyx_t_1 = ((__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST == (__pyx_v_cd[0]).srcMemoryType) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2066
 * 
 *         if ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:
 *             cd[0].srcHost = p[0].srcPtr.ptr             # <<<<<<<<<<<<<<
 *         else:
 *             cd[0].srcDevice = <ccuda.CUdeviceptr_v2>(p[0].srcPtr.ptr)
 */
      __pyx_t_4 = (__pyx_v_p[0]).srcPtr.ptr;
      (__pyx_v_cd[0]).srcHost = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2065
 *                 return cudaErrorInvalidPitchValue
 * 
 *         if ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].srcMemoryType:             # <<<<<<<<<<<<<<
 *             cd[0].srcHost = p[0].srcPtr.ptr
 *         else:
 */
      goto __pyx_L27;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2068
 *             cd[0].srcHost = p[0].srcPtr.ptr
 *         else:
 *             cd[0].srcDevice = <ccuda.CUdeviceptr_v2>(p[0].srcPtr.ptr)             # <<<<<<<<<<<<<<
 *         cd[0].srcPitch = p[0].srcPtr.pitch
 *         cd[0].srcHeight = p[0].srcPtr.ysize
 */
    /*else*/ {
      (__pyx_v_cd[0]).srcDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_p[0]).srcPtr.ptr);
    }
    __pyx_L27:;

    /* "cuda/_lib/ccudart/utils.pyx":2069
 *         else:
 *             cd[0].srcDevice = <ccuda.CUdeviceptr_v2>(p[0].srcPtr.ptr)
 *         cd[0].srcPitch = p[0].srcPtr.pitch             # <<<<<<<<<<<<<<
 *         cd[0].srcHeight = p[0].srcPtr.ysize
 * 
 */
    __pyx_t_5 = (__pyx_v_p[0]).srcPtr.pitch;
    (__pyx_v_cd[0]).srcPitch = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":2070
 *             cd[0].srcDevice = <ccuda.CUdeviceptr_v2>(p[0].srcPtr.ptr)
 *         cd[0].srcPitch = p[0].srcPtr.pitch
 *         cd[0].srcHeight = p[0].srcPtr.ysize             # <<<<<<<<<<<<<<
 * 
 *     if p[0].dstArray:
 */
    __pyx_t_5 = (__pyx_v_p[0]).srcPtr.ysize;
    (__pyx_v_cd[0]).srcHeight = __pyx_t_5;
  }
  __pyx_L15:;

  /* "cuda/_lib/ccudart/utils.pyx":2072
 *         cd[0].srcHeight = p[0].srcPtr.ysize
 * 
 *     if p[0].dstArray:             # <<<<<<<<<<<<<<
 *         if NULL != p[0].dstPtr.ptr:
 *             return cudaErrorInvalidValue
 */
  __pyx_t_1 = ((__pyx_v_p[0]).dstArray != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2073
 * 
 *     if p[0].dstArray:
 *         if NULL != p[0].dstPtr.ptr:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 */
    __pyx_t_1 = ((NULL != (__pyx_v_p[0]).dstPtr.ptr) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2074
 *     if p[0].dstArray:
 *         if NULL != p[0].dstPtr.ptr:
 *             return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 *         cd[0].dstArray = <ccuda.CUarray>p[0].dstArray
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2073
 * 
 *     if p[0].dstArray:
 *         if NULL != p[0].dstPtr.ptr:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2075
 *         if NULL != p[0].dstPtr.ptr:
 *             return cudaErrorInvalidValue
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY             # <<<<<<<<<<<<<<
 *         cd[0].dstArray = <ccuda.CUarray>p[0].dstArray
 *         err = getElementSize(&dstElementSize, p[0].dstArray)
 */
    (__pyx_v_cd[0]).dstMemoryType = __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY;

    /* "cuda/_lib/ccudart/utils.pyx":2076
 *             return cudaErrorInvalidValue
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 *         cd[0].dstArray = <ccuda.CUarray>p[0].dstArray             # <<<<<<<<<<<<<<
 *         err = getElementSize(&dstElementSize, p[0].dstArray)
 *         if err != cudaSuccess:
 */
    (__pyx_v_cd[0]).dstArray = ((__pyx_t_4cuda_5ccuda_CUarray)(__pyx_v_p[0]).dstArray);

    /* "cuda/_lib/ccudart/utils.pyx":2077
 *         cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY
 *         cd[0].dstArray = <ccuda.CUarray>p[0].dstArray
 *         err = getElementSize(&dstElementSize, p[0].dstArray)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getElementSize((&__pyx_v_dstElementSize), (__pyx_v_p[0]).dstArray);

    /* "cuda/_lib/ccudart/utils.pyx":2078
 *         cd[0].dstArray = <ccuda.CUarray>p[0].dstArray
 *         err = getElementSize(&dstElementSize, p[0].dstArray)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     else:
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2079
 *         err = getElementSize(&dstElementSize, p[0].dstArray)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *     else:
 *         if NULL == p[0].dstPtr.ptr:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2078
 *         cd[0].dstArray = <ccuda.CUarray>p[0].dstArray
 *         err = getElementSize(&dstElementSize, p[0].dstArray)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *     else:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2072
 *         cd[0].srcHeight = p[0].srcPtr.ysize
 * 
 *     if p[0].dstArray:             # <<<<<<<<<<<<<<
 *         if NULL != p[0].dstPtr.ptr:
 *             return cudaErrorInvalidValue
 */
    goto __pyx_L28;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2081
 *             return err
 *     else:
 *         if NULL == p[0].dstPtr.ptr:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].dstPtr.pitch):
 */
  /*else*/ {
    __pyx_t_1 = ((NULL == (__pyx_v_p[0]).dstPtr.ptr) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2082
 *     else:
 *         if NULL == p[0].dstPtr.ptr:
 *             return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].dstPtr.pitch):
 *             return cudaErrorInvalidPitchValue
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2081
 *             return err
 *     else:
 *         if NULL == p[0].dstPtr.ptr:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].dstPtr.pitch):
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2083
 *         if NULL == p[0].dstPtr.ptr:
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].dstPtr.pitch):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:
 */
    __pyx_t_2 = (((__pyx_v_p[0]).extent.height > 1) != 0);
    if (!__pyx_t_2) {
    } else {
      goto __pyx_L34_next_and;
    }
    __pyx_t_2 = (((__pyx_v_p[0]).extent.depth > 1) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L33_bool_binop_done;
    }
    __pyx_L34_next_and:;
    __pyx_t_2 = (((__pyx_v_p[0]).extent.width > (__pyx_v_p[0]).dstPtr.pitch) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L33_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2084
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].dstPtr.pitch):
 *             return cudaErrorInvalidPitchValue             # <<<<<<<<<<<<<<
 *         if p[0].extent.depth > 1:
 *             adjustedDstHeight = p[0].dstPtr.ysize * copyBlockExtent.height
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2083
 *         if NULL == p[0].dstPtr.ptr:
 *             return cudaErrorInvalidValue
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].dstPtr.pitch):             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2085
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].dstPtr.pitch):
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:             # <<<<<<<<<<<<<<
 *             adjustedDstHeight = p[0].dstPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedDstHeight:
 */
    __pyx_t_1 = (((__pyx_v_p[0]).extent.depth > 1) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2086
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:
 *             adjustedDstHeight = p[0].dstPtr.ysize * copyBlockExtent.height             # <<<<<<<<<<<<<<
 *             if p[0].extent.height > adjustedDstHeight:
 *                 return cudaErrorInvalidPitchValue
 */
      __pyx_v_adjustedDstHeight = ((__pyx_v_p[0]).dstPtr.ysize * __pyx_v_copyBlockExtent.height);

      /* "cuda/_lib/ccudart/utils.pyx":2087
 *         if p[0].extent.depth > 1:
 *             adjustedDstHeight = p[0].dstPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedDstHeight:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidPitchValue
 * 
 */
      __pyx_t_1 = (((__pyx_v_p[0]).extent.height > __pyx_v_adjustedDstHeight) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":2088
 *             adjustedDstHeight = p[0].dstPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedDstHeight:
 *                 return cudaErrorInvalidPitchValue             # <<<<<<<<<<<<<<
 * 
 *         if ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].dstMemoryType:
 */
        __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue;
        goto __pyx_L0;

        /* "cuda/_lib/ccudart/utils.pyx":2087
 *         if p[0].extent.depth > 1:
 *             adjustedDstHeight = p[0].dstPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedDstHeight:             # <<<<<<<<<<<<<<
 *                 return cudaErrorInvalidPitchValue
 * 
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":2085
 *         if (p[0].extent.height > 1 or p[0].extent.depth > 1) and (p[0].extent.width > p[0].dstPtr.pitch):
 *             return cudaErrorInvalidPitchValue
 *         if p[0].extent.depth > 1:             # <<<<<<<<<<<<<<
 *             adjustedDstHeight = p[0].dstPtr.ysize * copyBlockExtent.height
 *             if p[0].extent.height > adjustedDstHeight:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2090
 *                 return cudaErrorInvalidPitchValue
 * 
 *         if ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].dstMemoryType:             # <<<<<<<<<<<<<<
 *             cd[0].dstHost = p[0].dstPtr.ptr
 *         else:
 */
    __pyx_t_1 = ((__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST == (__pyx_v_cd[0]).dstMemoryType) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2091
 * 
 *         if ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].dstMemoryType:
 *             cd[0].dstHost = p[0].dstPtr.ptr             # <<<<<<<<<<<<<<
 *         else:
 *             cd[0].dstDevice = <ccuda.CUdeviceptr_v2>(p[0].dstPtr.ptr)
 */
      __pyx_t_4 = (__pyx_v_p[0]).dstPtr.ptr;
      (__pyx_v_cd[0]).dstHost = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2090
 *                 return cudaErrorInvalidPitchValue
 * 
 *         if ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST == cd[0].dstMemoryType:             # <<<<<<<<<<<<<<
 *             cd[0].dstHost = p[0].dstPtr.ptr
 *         else:
 */
      goto __pyx_L38;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2093
 *             cd[0].dstHost = p[0].dstPtr.ptr
 *         else:
 *             cd[0].dstDevice = <ccuda.CUdeviceptr_v2>(p[0].dstPtr.ptr)             # <<<<<<<<<<<<<<
 *         cd[0].dstPitch = p[0].dstPtr.pitch
 *         cd[0].dstHeight = p[0].dstPtr.ysize
 */
    /*else*/ {
      (__pyx_v_cd[0]).dstDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)(__pyx_v_p[0]).dstPtr.ptr);
    }
    __pyx_L38:;

    /* "cuda/_lib/ccudart/utils.pyx":2094
 *         else:
 *             cd[0].dstDevice = <ccuda.CUdeviceptr_v2>(p[0].dstPtr.ptr)
 *         cd[0].dstPitch = p[0].dstPtr.pitch             # <<<<<<<<<<<<<<
 *         cd[0].dstHeight = p[0].dstPtr.ysize
 * 
 */
    __pyx_t_5 = (__pyx_v_p[0]).dstPtr.pitch;
    (__pyx_v_cd[0]).dstPitch = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":2095
 *             cd[0].dstDevice = <ccuda.CUdeviceptr_v2>(p[0].dstPtr.ptr)
 *         cd[0].dstPitch = p[0].dstPtr.pitch
 *         cd[0].dstHeight = p[0].dstPtr.ysize             # <<<<<<<<<<<<<<
 * 
 *     if srcElementSize and dstElementSize and srcElementSize != dstElementSize:
 */
    __pyx_t_5 = (__pyx_v_p[0]).dstPtr.ysize;
    (__pyx_v_cd[0]).dstHeight = __pyx_t_5;
  }
  __pyx_L28:;

  /* "cuda/_lib/ccudart/utils.pyx":2097
 *         cd[0].dstHeight = p[0].dstPtr.ysize
 * 
 *     if srcElementSize and dstElementSize and srcElementSize != dstElementSize:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  __pyx_t_2 = (__pyx_v_srcElementSize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L40_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dstElementSize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L40_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_srcElementSize != __pyx_v_dstElementSize) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L40_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2098
 * 
 *     if srcElementSize and dstElementSize and srcElementSize != dstElementSize:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     cdef size_t elementSize = sizeof(char)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2097
 *         cd[0].dstHeight = p[0].dstPtr.ysize
 * 
 *     if srcElementSize and dstElementSize and srcElementSize != dstElementSize:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2100
 *         return cudaErrorInvalidValue
 * 
 *     cdef size_t elementSize = sizeof(char)             # <<<<<<<<<<<<<<
 *     if srcElementSize:
 *         elementSize = srcElementSize
 */
  __pyx_v_elementSize = (sizeof(char));

  /* "cuda/_lib/ccudart/utils.pyx":2101
 * 
 *     cdef size_t elementSize = sizeof(char)
 *     if srcElementSize:             # <<<<<<<<<<<<<<
 *         elementSize = srcElementSize
 *     if dstElementSize:
 */
  __pyx_t_1 = (__pyx_v_srcElementSize != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2102
 *     cdef size_t elementSize = sizeof(char)
 *     if srcElementSize:
 *         elementSize = srcElementSize             # <<<<<<<<<<<<<<
 *     if dstElementSize:
 *         elementSize = dstElementSize
 */
    __pyx_v_elementSize = __pyx_v_srcElementSize;

    /* "cuda/_lib/ccudart/utils.pyx":2101
 * 
 *     cdef size_t elementSize = sizeof(char)
 *     if srcElementSize:             # <<<<<<<<<<<<<<
 *         elementSize = srcElementSize
 *     if dstElementSize:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2103
 *     if srcElementSize:
 *         elementSize = srcElementSize
 *     if dstElementSize:             # <<<<<<<<<<<<<<
 *         elementSize = dstElementSize
 *     srcElementSize = elementSize
 */
  __pyx_t_1 = (__pyx_v_dstElementSize != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2104
 *         elementSize = srcElementSize
 *     if dstElementSize:
 *         elementSize = dstElementSize             # <<<<<<<<<<<<<<
 *     srcElementSize = elementSize
 *     dstElementSize = elementSize
 */
    __pyx_v_elementSize = __pyx_v_dstElementSize;

    /* "cuda/_lib/ccudart/utils.pyx":2103
 *     if srcElementSize:
 *         elementSize = srcElementSize
 *     if dstElementSize:             # <<<<<<<<<<<<<<
 *         elementSize = dstElementSize
 *     srcElementSize = elementSize
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2105
 *     if dstElementSize:
 *         elementSize = dstElementSize
 *     srcElementSize = elementSize             # <<<<<<<<<<<<<<
 *     dstElementSize = elementSize
 * 
 */
  __pyx_v_srcElementSize = __pyx_v_elementSize;

  /* "cuda/_lib/ccudart/utils.pyx":2106
 *         elementSize = dstElementSize
 *     srcElementSize = elementSize
 *     dstElementSize = elementSize             # <<<<<<<<<<<<<<
 * 
 *     # Determine the extent of the transfer
 */
  __pyx_v_dstElementSize = __pyx_v_elementSize;

  /* "cuda/_lib/ccudart/utils.pyx":2109
 * 
 *     # Determine the extent of the transfer
 *     cd[0].WidthInBytes = <size_t>((p[0].extent.width + copyBlockExtent.width - 1) / copyBlockExtent.width)  * elementSize             # <<<<<<<<<<<<<<
 *     cd[0].Height       = <size_t>((p[0].extent.height + copyBlockExtent.height - 1) / copyBlockExtent.height);
 *     cd[0].Depth        = p[0].extent.depth
 */
  __pyx_t_5 = (((__pyx_v_p[0]).extent.width + __pyx_v_copyBlockExtent.width) - 1);
  if (unlikely(__pyx_v_copyBlockExtent.width == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2109, __pyx_L1_error)
  }
  (__pyx_v_cd[0]).WidthInBytes = (((size_t)(((double)__pyx_t_5) / ((double)__pyx_v_copyBlockExtent.width))) * __pyx_v_elementSize);

  /* "cuda/_lib/ccudart/utils.pyx":2110
 *     # Determine the extent of the transfer
 *     cd[0].WidthInBytes = <size_t>((p[0].extent.width + copyBlockExtent.width - 1) / copyBlockExtent.width)  * elementSize
 *     cd[0].Height       = <size_t>((p[0].extent.height + copyBlockExtent.height - 1) / copyBlockExtent.height);             # <<<<<<<<<<<<<<
 *     cd[0].Depth        = p[0].extent.depth
 * 
 */
  __pyx_t_5 = (((__pyx_v_p[0]).extent.height + __pyx_v_copyBlockExtent.height) - 1);
  if (unlikely(__pyx_v_copyBlockExtent.height == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2110, __pyx_L1_error)
  }
  (__pyx_v_cd[0]).Height = ((size_t)(((double)__pyx_t_5) / ((double)__pyx_v_copyBlockExtent.height)));

  /* "cuda/_lib/ccudart/utils.pyx":2111
 *     cd[0].WidthInBytes = <size_t>((p[0].extent.width + copyBlockExtent.width - 1) / copyBlockExtent.width)  * elementSize
 *     cd[0].Height       = <size_t>((p[0].extent.height + copyBlockExtent.height - 1) / copyBlockExtent.height);
 *     cd[0].Depth        = p[0].extent.depth             # <<<<<<<<<<<<<<
 * 
 *     # Populate bloated src copy origin
 */
  __pyx_t_5 = (__pyx_v_p[0]).extent.depth;
  (__pyx_v_cd[0]).Depth = __pyx_t_5;

  /* "cuda/_lib/ccudart/utils.pyx":2114
 * 
 *     # Populate bloated src copy origin
 *     cd[0].srcXInBytes  = <size_t>(p[0].srcPos.x / srcBlockExtent.width) * elementSize             # <<<<<<<<<<<<<<
 *     cd[0].srcY         = <size_t>(p[0].srcPos.y / srcBlockExtent.height)
 *     cd[0].srcZ         = p[0].srcPos.z
 */
  if (unlikely(__pyx_v_srcBlockExtent.width == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2114, __pyx_L1_error)
  }
  (__pyx_v_cd[0]).srcXInBytes = (((size_t)(((double)(__pyx_v_p[0]).srcPos.x) / ((double)__pyx_v_srcBlockExtent.width))) * __pyx_v_elementSize);

  /* "cuda/_lib/ccudart/utils.pyx":2115
 *     # Populate bloated src copy origin
 *     cd[0].srcXInBytes  = <size_t>(p[0].srcPos.x / srcBlockExtent.width) * elementSize
 *     cd[0].srcY         = <size_t>(p[0].srcPos.y / srcBlockExtent.height)             # <<<<<<<<<<<<<<
 *     cd[0].srcZ         = p[0].srcPos.z
 * 
 */
  if (unlikely(__pyx_v_srcBlockExtent.height == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2115, __pyx_L1_error)
  }
  (__pyx_v_cd[0]).srcY = ((size_t)(((double)(__pyx_v_p[0]).srcPos.y) / ((double)__pyx_v_srcBlockExtent.height)));

  /* "cuda/_lib/ccudart/utils.pyx":2116
 *     cd[0].srcXInBytes  = <size_t>(p[0].srcPos.x / srcBlockExtent.width) * elementSize
 *     cd[0].srcY         = <size_t>(p[0].srcPos.y / srcBlockExtent.height)
 *     cd[0].srcZ         = p[0].srcPos.z             # <<<<<<<<<<<<<<
 * 
 *     # Populate bloated dst copy origin
 */
  __pyx_t_5 = (__pyx_v_p[0]).srcPos.z;
  (__pyx_v_cd[0]).srcZ = __pyx_t_5;

  /* "cuda/_lib/ccudart/utils.pyx":2119
 * 
 *     # Populate bloated dst copy origin
 *     cd[0].dstXInBytes  = <size_t>(p[0].dstPos.x / dstBlockExtent.width) * elementSize             # <<<<<<<<<<<<<<
 *     cd[0].dstY         = <size_t>(p[0].dstPos.y / dstBlockExtent.height)
 *     cd[0].dstZ         = p[0].dstPos.z
 */
  if (unlikely(__pyx_v_dstBlockExtent.width == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2119, __pyx_L1_error)
  }
  (__pyx_v_cd[0]).dstXInBytes = (((size_t)(((double)(__pyx_v_p[0]).dstPos.x) / ((double)__pyx_v_dstBlockExtent.width))) * __pyx_v_elementSize);

  /* "cuda/_lib/ccudart/utils.pyx":2120
 *     # Populate bloated dst copy origin
 *     cd[0].dstXInBytes  = <size_t>(p[0].dstPos.x / dstBlockExtent.width) * elementSize
 *     cd[0].dstY         = <size_t>(p[0].dstPos.y / dstBlockExtent.height)             # <<<<<<<<<<<<<<
 *     cd[0].dstZ         = p[0].dstPos.z
 * 
 */
  if (unlikely(__pyx_v_dstBlockExtent.height == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2120, __pyx_L1_error)
  }
  (__pyx_v_cd[0]).dstY = ((size_t)(((double)(__pyx_v_p[0]).dstPos.y) / ((double)__pyx_v_dstBlockExtent.height)));

  /* "cuda/_lib/ccudart/utils.pyx":2121
 *     cd[0].dstXInBytes  = <size_t>(p[0].dstPos.x / dstBlockExtent.width) * elementSize
 *     cd[0].dstY         = <size_t>(p[0].dstPos.y / dstBlockExtent.height)
 *     cd[0].dstZ         = p[0].dstPos.z             # <<<<<<<<<<<<<<
 * 
 *     return cudaSuccess
 */
  __pyx_t_5 = (__pyx_v_p[0]).dstPos.z;
  (__pyx_v_cd[0]).dstZ = __pyx_t_5;

  /* "cuda/_lib/ccudart/utils.pyx":2123
 *     cd[0].dstZ         = p[0].dstPos.z
 * 
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":1987
 * 
 * 
 * cdef cudaError_t toDriverMemCopy3DParams(const cudaMemcpy3DParms *p, ccuda.CUDA_MEMCPY3D *cd) nogil:             # <<<<<<<<<<<<<<
 *     memset(cd, 0, sizeof(ccuda.CUDA_MEMCPY3D))
 *     cd[0].dstMemoryType = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda._lib.ccudart.utils.toDriverMemCopy3DParams", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2126
 * 
 * 
 * cdef cudaError_t mallocArray(cudaArray_t *arrayPtr, const cudaChannelFormatDesc *desc,             # <<<<<<<<<<<<<<
 *         size_t depth, size_t height, size_t width, int corr2D, unsigned int flags) nogil except+:
 *     if arrayPtr == NULL:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_mallocArray(__pyx_t_4cuda_7ccudart_cudaArray_t *__pyx_v_arrayPtr, struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *__pyx_v_desc, size_t __pyx_v_depth, size_t __pyx_v_height, size_t __pyx_v_width, int __pyx_v_corr2D, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUarray __pyx_v_array;
  __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_v_ad;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("mallocArray", __pyx_f[1], 2126, 1, __PYX_ERR(1, 2126, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2128
 * cdef cudaError_t mallocArray(cudaArray_t *arrayPtr, const cudaChannelFormatDesc *desc,
 *         size_t depth, size_t height, size_t width, int corr2D, unsigned int flags) nogil except+:
 *     if arrayPtr == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  __pyx_t_1 = ((__pyx_v_arrayPtr == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2129
 *         size_t depth, size_t height, size_t width, int corr2D, unsigned int flags) nogil except+:
 *     if arrayPtr == NULL:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarray array = NULL
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2128
 * cdef cudaError_t mallocArray(cudaArray_t *arrayPtr, const cudaChannelFormatDesc *desc,
 *         size_t depth, size_t height, size_t width, int corr2D, unsigned int flags) nogil except+:
 *     if arrayPtr == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2131
 *         return cudaErrorInvalidValue
 * 
 *     cdef ccuda.CUarray array = NULL             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 *     cdef cudaError_t err
 */
  __pyx_v_array = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":2134
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 *     cdef cudaError_t err
 *     arrayPtr[0] = NULL             # <<<<<<<<<<<<<<
 *     if (((width == 0)) or
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 */
  (__pyx_v_arrayPtr[0]) = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":2135
 *     cdef cudaError_t err
 *     arrayPtr[0] = NULL
 *     if (((width == 0)) or             # <<<<<<<<<<<<<<
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 */
  __pyx_t_2 = ((__pyx_v_width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2136
 *     arrayPtr[0] = NULL
 *     if (((width == 0)) or
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or             # <<<<<<<<<<<<<<
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or
 */
  __pyx_t_2 = ((__pyx_v_height == 0) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L7_next_or;
  } else {
  }
  __pyx_t_2 = ((__pyx_v_depth != 0) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L7_next_or;
  } else {
  }
  __pyx_t_2 = ((!((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayLayered) != 0)) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L7_next_or:;

  /* "cuda/_lib/ccudart/utils.pyx":2137
 *     if (((width == 0)) or
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or             # <<<<<<<<<<<<<<
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or
 *         ((flags & cudaArrayLayered) and (flags & cudaArrayCubemap) and ((width != height) or (depth % 6 != 0)))):
 */
  __pyx_t_2 = ((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayLayered) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L10_next_or;
  } else {
  }
  __pyx_t_2 = ((__pyx_v_depth == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L10_next_or:;

  /* "cuda/_lib/ccudart/utils.pyx":2138
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or             # <<<<<<<<<<<<<<
 *         ((flags & cudaArrayLayered) and (flags & cudaArrayCubemap) and ((width != height) or (depth % 6 != 0)))):
 *         return cudaErrorInvalidValue
 */
  __pyx_t_2 = ((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayCubemap) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L12_next_or;
  } else {
  }
  __pyx_t_2 = ((!((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayLayered) != 0)) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L12_next_or;
  } else {
  }
  __pyx_t_2 = ((__pyx_v_width != __pyx_v_height) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_depth != 6) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L12_next_or:;

  /* "cuda/_lib/ccudart/utils.pyx":2139
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or
 *         ((flags & cudaArrayLayered) and (flags & cudaArrayCubemap) and ((width != height) or (depth % 6 != 0)))):             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 *     else:
 */
  __pyx_t_2 = ((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayLayered) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayCubemap) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_width != __pyx_v_height) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_depth % 6) != 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":2135
 *     cdef cudaError_t err
 *     arrayPtr[0] = NULL
 *     if (((width == 0)) or             # <<<<<<<<<<<<<<
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 */
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2140
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or
 *         ((flags & cudaArrayLayered) and (flags & cudaArrayCubemap) and ((width != height) or (depth % 6 != 0)))):
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *     else:
 *         memset(&ad, 0, sizeof(ad))
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2135
 *     cdef cudaError_t err
 *     arrayPtr[0] = NULL
 *     if (((width == 0)) or             # <<<<<<<<<<<<<<
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2142
 *         return cudaErrorInvalidValue
 *     else:
 *         memset(&ad, 0, sizeof(ad))             # <<<<<<<<<<<<<<
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, <ccuda.CUarray_format*>&ad.Format)
 *         if err != cudaSuccess:
 */
  /*else*/ {
    (void)(memset((&__pyx_v_ad), 0, (sizeof(__pyx_v_ad))));

    /* "cuda/_lib/ccudart/utils.pyx":2143
 *     else:
 *         memset(&ad, 0, sizeof(ad))
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, <ccuda.CUarray_format*>&ad.Format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo(__pyx_v_desc, ((int *)(&__pyx_v_ad.NumChannels)), ((__pyx_t_4cuda_5ccuda_CUarray_format *)(&__pyx_v_ad.Format)));

    /* "cuda/_lib/ccudart/utils.pyx":2144
 *         memset(&ad, 0, sizeof(ad))
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, <ccuda.CUarray_format*>&ad.Format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         ad.Height = <unsigned int>height
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2145
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, <ccuda.CUarray_format*>&ad.Format)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         ad.Height = <unsigned int>height
 *         ad.Width  = <unsigned int>width
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2144
 *         memset(&ad, 0, sizeof(ad))
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, <ccuda.CUarray_format*>&ad.Format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         ad.Height = <unsigned int>height
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2146
 *         if err != cudaSuccess:
 *             return err
 *         ad.Height = <unsigned int>height             # <<<<<<<<<<<<<<
 *         ad.Width  = <unsigned int>width
 *         ad.Depth  = <unsigned int>(depth - corr2D)
 */
    __pyx_v_ad.Height = ((unsigned int)__pyx_v_height);

    /* "cuda/_lib/ccudart/utils.pyx":2147
 *             return err
 *         ad.Height = <unsigned int>height
 *         ad.Width  = <unsigned int>width             # <<<<<<<<<<<<<<
 *         ad.Depth  = <unsigned int>(depth - corr2D)
 *         ad.Flags  = flags
 */
    __pyx_v_ad.Width = ((unsigned int)__pyx_v_width);

    /* "cuda/_lib/ccudart/utils.pyx":2148
 *         ad.Height = <unsigned int>height
 *         ad.Width  = <unsigned int>width
 *         ad.Depth  = <unsigned int>(depth - corr2D)             # <<<<<<<<<<<<<<
 *         ad.Flags  = flags
 *         err = <cudaError_t>ccuda._cuArray3DCreate_v2(&array, &ad)
 */
    __pyx_v_ad.Depth = ((unsigned int)(__pyx_v_depth - __pyx_v_corr2D));

    /* "cuda/_lib/ccudart/utils.pyx":2149
 *         ad.Width  = <unsigned int>width
 *         ad.Depth  = <unsigned int>(depth - corr2D)
 *         ad.Flags  = flags             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuArray3DCreate_v2(&array, &ad)
 *         if err != cudaSuccess:
 */
    __pyx_v_ad.Flags = __pyx_v_flags;

    /* "cuda/_lib/ccudart/utils.pyx":2150
 *         ad.Depth  = <unsigned int>(depth - corr2D)
 *         ad.Flags  = flags
 *         err = <cudaError_t>ccuda._cuArray3DCreate_v2(&array, &ad)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2((&__pyx_v_array), (&__pyx_v_ad)); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2150, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":2151
 *         ad.Flags  = flags
 *         err = <cudaError_t>ccuda._cuArray3DCreate_v2(&array, &ad)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2152
 *         err = <cudaError_t>ccuda._cuArray3DCreate_v2(&array, &ad)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *         arrayPtr[0] = <cudaArray_t>array
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2151
 *         ad.Flags  = flags
 *         err = <cudaError_t>ccuda._cuArray3DCreate_v2(&array, &ad)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2154
 *             return err
 * 
 *         arrayPtr[0] = <cudaArray_t>array             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
    (__pyx_v_arrayPtr[0]) = ((__pyx_t_4cuda_7ccudart_cudaArray_t)__pyx_v_array);
  }

  /* "cuda/_lib/ccudart/utils.pyx":2155
 * 
 *         arrayPtr[0] = <cudaArray_t>array
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2126
 * 
 * 
 * cdef cudaError_t mallocArray(cudaArray_t *arrayPtr, const cudaChannelFormatDesc *desc,             # <<<<<<<<<<<<<<
 *         size_t depth, size_t height, size_t width, int corr2D, unsigned int flags) nogil except+:
 *     if arrayPtr == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.mallocArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2158
 * 
 * 
 * cdef cudaError_t memcpy2DToArray(cudaArray_t dst, size_t hOffset, size_t wOffset, const char *src,             # <<<<<<<<<<<<<<
 *                                  size_t spitch, size_t width, size_t height, cudaMemcpyKind kind,
 *                                  cudaStream_t sid, bool async) nogil except+:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DToArray(__pyx_t_4cuda_7ccudart_cudaArray_t __pyx_v_dst, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpy2DToArray", __pyx_f[1], 2158, 1, __PYX_ERR(1, 2158, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2161
 *                                  size_t spitch, size_t width, size_t height, cudaMemcpyKind kind,
 *                                  cudaStream_t sid, bool async) nogil except+:
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if height > 1 and width > spitch:
 */
  __pyx_t_2 = ((__pyx_v_width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_height == 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2162
 *                                  cudaStream_t sid, bool async) nogil except+:
 *     if width == 0 or height == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     if height > 1 and width > spitch:
 *         return cudaErrorInvalidPitchValue
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2161
 *                                  size_t spitch, size_t width, size_t height, cudaMemcpyKind kind,
 *                                  cudaStream_t sid, bool async) nogil except+:
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if height > 1 and width > spitch:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2163
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 *     if height > 1 and width > spitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidPitchValue
 * 
 */
  __pyx_t_2 = ((__pyx_v_height > 1) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_width > __pyx_v_spitch) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2164
 *         return cudaSuccess
 *     if height > 1 and width > spitch:
 *         return cudaErrorInvalidPitchValue             # <<<<<<<<<<<<<<
 * 
 *     cdef cudaError_t err
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2163
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 *     if height > 1 and width > spitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidPitchValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2167
 * 
 *     cdef cudaError_t err
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *        err = copyFromHost2D(dst, hOffset, wOffset, src, spitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
  switch (__pyx_v_kind) {
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2168
 *     cdef cudaError_t err
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *        err = copyFromHost2D(dst, hOffset, wOffset, src, spitch, width, height, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromHost2D(__pyx_v_dst, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2168, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2167
 * 
 *     cdef cudaError_t err
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *        err = copyFromHost2D(dst, hOffset, wOffset, src, spitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2170
 *        err = copyFromHost2D(dst, hOffset, wOffset, src, spitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice2D(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE, __pyx_v_dst, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_src, 0, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2170, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2169
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *        err = copyFromHost2D(dst, hOffset, wOffset, src, spitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDefault:

    /* "cuda/_lib/ccudart/utils.pyx":2172
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidMemcpyDirection
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice2D(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED, __pyx_v_dst, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_src, 0, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2172, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2171
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)
 *     else:
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":2174
 *        err = copyFromDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, spitch, width, height, sid, async)
 *     else:
 *         return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2175
 *     else:
 *         return cudaErrorInvalidMemcpyDirection
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_err;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2158
 * 
 * 
 * cdef cudaError_t memcpy2DToArray(cudaArray_t dst, size_t hOffset, size_t wOffset, const char *src,             # <<<<<<<<<<<<<<
 *                                  size_t spitch, size_t width, size_t height, cudaMemcpyKind kind,
 *                                  cudaStream_t sid, bool async) nogil except+:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpy2DToArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2178
 * 
 * 
 * cdef cudaError_t memcpy2DPtr(char *dst, size_t dpitch, const char *src, size_t spitch, size_t width,             # <<<<<<<<<<<<<<
 *                              size_t height, cudaMemcpyKind kind,
 *                              cudaStream_t sid, bool async) nogil except+:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DPtr(char *__pyx_v_dst, size_t __pyx_v_dpitch, char const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2 __pyx_v_cp;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D_v2 __pyx_t_3;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpy2DPtr", __pyx_f[1], 2178, 1, __PYX_ERR(1, 2178, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2181
 *                              size_t height, cudaMemcpyKind kind,
 *                              cudaStream_t sid, bool async) nogil except+:
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:
 */
  __pyx_t_2 = ((__pyx_v_width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_height == 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2182
 *                              cudaStream_t sid, bool async) nogil except+:
 *     if width == 0 or height == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     if height > 1 and width > dpitch:
 *         return cudaErrorInvalidPitchValue
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2181
 *                              size_t height, cudaMemcpyKind kind,
 *                              cudaStream_t sid, bool async) nogil except+:
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2183
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidPitchValue
 *     if height > 1 and width > spitch:
 */
  __pyx_t_2 = ((__pyx_v_height > 1) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_width > __pyx_v_dpitch) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2184
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:
 *         return cudaErrorInvalidPitchValue             # <<<<<<<<<<<<<<
 *     if height > 1 and width > spitch:
 *         return cudaErrorInvalidPitchValue
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2183
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidPitchValue
 *     if height > 1 and width > spitch:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2185
 *     if height > 1 and width > dpitch:
 *         return cudaErrorInvalidPitchValue
 *     if height > 1 and width > spitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidPitchValue
 * 
 */
  __pyx_t_2 = ((__pyx_v_height > 1) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_width > __pyx_v_spitch) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2186
 *         return cudaErrorInvalidPitchValue
 *     if height > 1 and width > spitch:
 *         return cudaErrorInvalidPitchValue             # <<<<<<<<<<<<<<
 * 
 *     cdef cudaError_t err
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2185
 *     if height > 1 and width > dpitch:
 *         return cudaErrorInvalidPitchValue
 *     if height > 1 and width > spitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidPitchValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2190
 *     cdef cudaError_t err
 *     cdef ccuda.CUDA_MEMCPY2D_v2 cp
 *     memset(&cp, 0, sizeof(cp))             # <<<<<<<<<<<<<<
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 */
  (void)(memset((&__pyx_v_cp), 0, (sizeof(__pyx_v_cp))));

  /* "cuda/_lib/ccudart/utils.pyx":2192
 *     memset(&cp, 0, sizeof(cp))
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 *         cp.dstHost = dst
 */
  switch (__pyx_v_kind) {
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2193
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)             # <<<<<<<<<<<<<<
 *         cp.dstHost = dst
 *         cp.srcHost = src
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy2DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2193, __pyx_L1_error)
    }
    __pyx_v_cp = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2194
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 *         cp.dstHost = dst             # <<<<<<<<<<<<<<
 *         cp.srcHost = src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 */
    __pyx_v_cp.dstHost = __pyx_v_dst;

    /* "cuda/_lib/ccudart/utils.pyx":2195
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 *         cp.dstHost = dst
 *         cp.srcHost = src             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)
 */
    __pyx_v_cp.srcHost = __pyx_v_src;

    /* "cuda/_lib/ccudart/utils.pyx":2192
 *     memset(&cp, 0, sizeof(cp))
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 *         cp.dstHost = dst
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2197
 *         cp.srcHost = src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)             # <<<<<<<<<<<<<<
 *         cp.dstHost = dst
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy2DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2197, __pyx_L1_error)
    }
    __pyx_v_cp = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2198
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)
 *         cp.dstHost = dst             # <<<<<<<<<<<<<<
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 */
    __pyx_v_cp.dstHost = __pyx_v_dst;

    /* "cuda/_lib/ccudart/utils.pyx":2199
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)
 *         cp.dstHost = dst
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 */
    __pyx_v_cp.srcDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src);

    /* "cuda/_lib/ccudart/utils.pyx":2196
 *         cp.dstHost = dst
 *         cp.srcHost = src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)
 *         cp.dstHost = dst
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2201
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)             # <<<<<<<<<<<<<<
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 *         cp.srcHost = src
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy2DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2201, __pyx_L1_error)
    }
    __pyx_v_cp = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2202
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst             # <<<<<<<<<<<<<<
 *         cp.srcHost = src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
    __pyx_v_cp.dstDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst);

    /* "cuda/_lib/ccudart/utils.pyx":2203
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 *         cp.srcHost = src             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)
 */
    __pyx_v_cp.srcHost = __pyx_v_src;

    /* "cuda/_lib/ccudart/utils.pyx":2200
 *         cp.dstHost = dst
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2205
 *         cp.srcHost = src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)             # <<<<<<<<<<<<<<
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy2DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2205, __pyx_L1_error)
    }
    __pyx_v_cp = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2206
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst             # <<<<<<<<<<<<<<
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 */
    __pyx_v_cp.dstDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst);

    /* "cuda/_lib/ccudart/utils.pyx":2207
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED)
 */
    __pyx_v_cp.srcDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src);

    /* "cuda/_lib/ccudart/utils.pyx":2204
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 *         cp.srcHost = src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDefault:

    /* "cuda/_lib/ccudart/utils.pyx":2209
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED)             # <<<<<<<<<<<<<<
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memCopy2DInit(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED, __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2209, __pyx_L1_error)
    }
    __pyx_v_cp = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2210
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst             # <<<<<<<<<<<<<<
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 *     else:
 */
    __pyx_v_cp.dstDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst);

    /* "cuda/_lib/ccudart/utils.pyx":2211
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src             # <<<<<<<<<<<<<<
 *     else:
 *         err = cudaErrorInvalidMemcpyDirection
 */
    __pyx_v_cp.srcDevice = ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src);

    /* "cuda/_lib/ccudart/utils.pyx":2208
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         cp = memCopy2DInit(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED)
 *         cp.dstDevice = <ccuda.CUdeviceptr_v2>dst
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":2213
 *         cp.srcDevice = <ccuda.CUdeviceptr_v2>src
 *     else:
 *         err = cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 * 
 *     if err != cudaSuccess:
 */
    __pyx_v_err = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2215
 *         err = cudaErrorInvalidMemcpyDirection
 * 
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2216
 * 
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 * 
 *     cp.dstPitch      = dpitch
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2215
 *         err = cudaErrorInvalidMemcpyDirection
 * 
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2218
 *         return err
 * 
 *     cp.dstPitch      = dpitch             # <<<<<<<<<<<<<<
 *     cp.srcPitch      = spitch
 *     cp.WidthInBytes  = width
 */
  __pyx_v_cp.dstPitch = __pyx_v_dpitch;

  /* "cuda/_lib/ccudart/utils.pyx":2219
 * 
 *     cp.dstPitch      = dpitch
 *     cp.srcPitch      = spitch             # <<<<<<<<<<<<<<
 *     cp.WidthInBytes  = width
 *     cp.Height        = height
 */
  __pyx_v_cp.srcPitch = __pyx_v_spitch;

  /* "cuda/_lib/ccudart/utils.pyx":2220
 *     cp.dstPitch      = dpitch
 *     cp.srcPitch      = spitch
 *     cp.WidthInBytes  = width             # <<<<<<<<<<<<<<
 *     cp.Height        = height
 * 
 */
  __pyx_v_cp.WidthInBytes = __pyx_v_width;

  /* "cuda/_lib/ccudart/utils.pyx":2221
 *     cp.srcPitch      = spitch
 *     cp.WidthInBytes  = width
 *     cp.Height        = height             # <<<<<<<<<<<<<<
 * 
 *     if async:
 */
  __pyx_v_cp.Height = __pyx_v_height;

  /* "cuda/_lib/ccudart/utils.pyx":2223
 *     cp.Height        = height
 * 
 *     if async:             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMemcpy2DAsync_v2(&cp, sid)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_async != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2224
 * 
 *     if async:
 *         err = <cudaError_t>ccuda._cuMemcpy2DAsync_v2(&cp, sid)             # <<<<<<<<<<<<<<
 *     else:
 *         err = <cudaError_t>ccuda._cuMemcpy2DUnaligned_v2(&cp)
 */
    __pyx_t_4 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2((&__pyx_v_cp), __pyx_v_sid); if (unlikely(__pyx_t_4 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2224, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_4);

    /* "cuda/_lib/ccudart/utils.pyx":2223
 *     cp.Height        = height
 * 
 *     if async:             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMemcpy2DAsync_v2(&cp, sid)
 *     else:
 */
    goto __pyx_L13;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2226
 *         err = <cudaError_t>ccuda._cuMemcpy2DAsync_v2(&cp, sid)
 *     else:
 *         err = <cudaError_t>ccuda._cuMemcpy2DUnaligned_v2(&cp)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
  /*else*/ {
    __pyx_t_4 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2((&__pyx_v_cp)); if (unlikely(__pyx_t_4 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2226, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_4);
  }
  __pyx_L13:;

  /* "cuda/_lib/ccudart/utils.pyx":2227
 *     else:
 *         err = <cudaError_t>ccuda._cuMemcpy2DUnaligned_v2(&cp)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_err;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2178
 * 
 * 
 * cdef cudaError_t memcpy2DPtr(char *dst, size_t dpitch, const char *src, size_t spitch, size_t width,             # <<<<<<<<<<<<<<
 *                              size_t height, cudaMemcpyKind kind,
 *                              cudaStream_t sid, bool async) nogil except+:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpy2DPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2230
 * 
 * 
 * cdef cudaError_t memcpyDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind) nogil except+:             # <<<<<<<<<<<<<<
 *     if size == 0:
 *         return cudaSuccess
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyDispatch(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_size, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind) {
  CYTHON_UNUSED __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpyDispatch", __pyx_f[1], 2230, 1, __PYX_ERR(1, 2230, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2231
 * 
 * cdef cudaError_t memcpyDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind) nogil except+:
 *     if size == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  __pyx_t_1 = ((__pyx_v_size == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2232
 * cdef cudaError_t memcpyDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind) nogil except+:
 *     if size == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 *     cdef cudaError_t err
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2231
 * 
 * cdef cudaError_t memcpyDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind) nogil except+:
 *     if size == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2235
 * 
 *     cdef cudaError_t err
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, NULL, 0)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 */
  switch (__pyx_v_kind) {
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2236
 *     cdef cudaError_t err
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, NULL, 0)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         err = <cudaError_t>ccuda._cuMemcpyDtoH_v2(dst, <ccuda.CUdeviceptr_v2>src, size)
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DPtr(((char *)__pyx_v_dst), __pyx_v_size, ((char const *)__pyx_v_src), __pyx_v_size, __pyx_v_size, 1, __pyx_v_kind, NULL, 0);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2236, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2235
 * 
 *     cdef cudaError_t err
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, NULL, 0)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2238
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, NULL, 0)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         err = <cudaError_t>ccuda._cuMemcpyDtoH_v2(dst, <ccuda.CUdeviceptr_v2>src, size)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         err = <cudaError_t>ccuda._cuMemcpyHtoD_v2(<ccuda.CUdeviceptr_v2>dst, src, size)
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2(__pyx_v_dst, ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src), __pyx_v_size); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2238, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":2237
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, NULL, 0)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMemcpyDtoH_v2(dst, <ccuda.CUdeviceptr_v2>src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2240
 *         err = <cudaError_t>ccuda._cuMemcpyDtoH_v2(dst, <ccuda.CUdeviceptr_v2>src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         err = <cudaError_t>ccuda._cuMemcpyHtoD_v2(<ccuda.CUdeviceptr_v2>dst, src, size)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         err = <cudaError_t>ccuda._cuMemcpyDtoD_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst), __pyx_v_src, __pyx_v_size); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2240, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":2239
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         err = <cudaError_t>ccuda._cuMemcpyDtoH_v2(dst, <ccuda.CUdeviceptr_v2>src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMemcpyHtoD_v2(<ccuda.CUdeviceptr_v2>dst, src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2242
 *         err = <cudaError_t>ccuda._cuMemcpyHtoD_v2(<ccuda.CUdeviceptr_v2>dst, src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         err = <cudaError_t>ccuda._cuMemcpyDtoD_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         err = <cudaError_t>ccuda._cuMemcpy(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst), ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src), __pyx_v_size); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2242, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":2241
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         err = <cudaError_t>ccuda._cuMemcpyHtoD_v2(<ccuda.CUdeviceptr_v2>dst, src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMemcpyDtoD_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDefault:

    /* "cuda/_lib/ccudart/utils.pyx":2244
 *         err = <cudaError_t>ccuda._cuMemcpyDtoD_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         err = <cudaError_t>ccuda._cuMemcpy(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidMemcpyDirection
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst), ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src), __pyx_v_size); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2244, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":2243
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         err = <cudaError_t>ccuda._cuMemcpyDtoD_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMemcpy(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)
 *     else:
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":2246
 *         err = <cudaError_t>ccuda._cuMemcpy(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size)
 *     else:
 *         return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2230
 * 
 * 
 * cdef cudaError_t memcpyDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind) nogil except+:             # <<<<<<<<<<<<<<
 *     if size == 0:
 *         return cudaSuccess
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpyDispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2249
 * 
 * 
 * cdef cudaError_t mallocHost(size_t size, void **mem, unsigned int flags) nogil except+:             # <<<<<<<<<<<<<<
 *     if size == 0:
 *         if mem == NULL:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_mallocHost(size_t __pyx_v_size, void **__pyx_v_mem, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("mallocHost", __pyx_f[1], 2249, 1, __PYX_ERR(1, 2249, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2250
 * 
 * cdef cudaError_t mallocHost(size_t size, void **mem, unsigned int flags) nogil except+:
 *     if size == 0:             # <<<<<<<<<<<<<<
 *         if mem == NULL:
 *             return cudaErrorInvalidValue
 */
  __pyx_t_1 = ((__pyx_v_size == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2251
 * cdef cudaError_t mallocHost(size_t size, void **mem, unsigned int flags) nogil except+:
 *     if size == 0:
 *         if mem == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         mem[0] = NULL
 */
    __pyx_t_1 = ((__pyx_v_mem == NULL) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2252
 *     if size == 0:
 *         if mem == NULL:
 *             return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *         mem[0] = NULL
 *         return cudaSuccess
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2251
 * cdef cudaError_t mallocHost(size_t size, void **mem, unsigned int flags) nogil except+:
 *     if size == 0:
 *         if mem == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         mem[0] = NULL
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2253
 *         if mem == NULL:
 *             return cudaErrorInvalidValue
 *         mem[0] = NULL             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     else:
 */
    (__pyx_v_mem[0]) = NULL;

    /* "cuda/_lib/ccudart/utils.pyx":2254
 *             return cudaErrorInvalidValue
 *         mem[0] = NULL
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     else:
 *         return <cudaError_t>ccuda._cuMemHostAlloc(mem, size, flags)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2250
 * 
 * cdef cudaError_t mallocHost(size_t size, void **mem, unsigned int flags) nogil except+:
 *     if size == 0:             # <<<<<<<<<<<<<<
 *         if mem == NULL:
 *             return cudaErrorInvalidValue
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2256
 *         return cudaSuccess
 *     else:
 *         return <cudaError_t>ccuda._cuMemHostAlloc(mem, size, flags)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_2 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc(__pyx_v_mem, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2256, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_2);
    goto __pyx_L0;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2249
 * 
 * 
 * cdef cudaError_t mallocHost(size_t size, void **mem, unsigned int flags) nogil except+:             # <<<<<<<<<<<<<<
 *     if size == 0:
 *         if mem == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.mallocHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2259
 * 
 * 
 * cdef cudaError_t mallocPitch(size_t width, size_t height, size_t depth, void **mem, size_t *pitch) nogil except+:             # <<<<<<<<<<<<<<
 *     height *= depth
 * 
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_mallocPitch(size_t __pyx_v_width, size_t __pyx_v_height, size_t __pyx_v_depth, void **__pyx_v_mem, size_t *__pyx_v_pitch) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("mallocPitch", __pyx_f[1], 2259, 1, __PYX_ERR(1, 2259, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2260
 * 
 * cdef cudaError_t mallocPitch(size_t width, size_t height, size_t depth, void **mem, size_t *pitch) nogil except+:
 *     height *= depth             # <<<<<<<<<<<<<<
 * 
 *     if width == 0 or height == 0:
 */
  __pyx_v_height = (__pyx_v_height * __pyx_v_depth);

  /* "cuda/_lib/ccudart/utils.pyx":2262
 *     height *= depth
 * 
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         if mem == NULL or pitch == NULL:
 *             return cudaErrorInvalidValue
 */
  __pyx_t_2 = ((__pyx_v_width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_height == 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2263
 * 
 *     if width == 0 or height == 0:
 *         if mem == NULL or pitch == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         mem[0]   = NULL
 */
    __pyx_t_2 = ((__pyx_v_mem == NULL) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_pitch == NULL) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2264
 *     if width == 0 or height == 0:
 *         if mem == NULL or pitch == NULL:
 *             return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *         mem[0]   = NULL
 *         pitch[0] = 0
 */
      __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2263
 * 
 *     if width == 0 or height == 0:
 *         if mem == NULL or pitch == NULL:             # <<<<<<<<<<<<<<
 *             return cudaErrorInvalidValue
 *         mem[0]   = NULL
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2265
 *         if mem == NULL or pitch == NULL:
 *             return cudaErrorInvalidValue
 *         mem[0]   = NULL             # <<<<<<<<<<<<<<
 *         pitch[0] = 0
 *     else:
 */
    (__pyx_v_mem[0]) = NULL;

    /* "cuda/_lib/ccudart/utils.pyx":2266
 *             return cudaErrorInvalidValue
 *         mem[0]   = NULL
 *         pitch[0] = 0             # <<<<<<<<<<<<<<
 *     else:
 *         return <cudaError_t>ccuda._cuMemAllocPitch_v2(<ccuda.CUdeviceptr_v2*>mem, pitch, width, height, 4)
 */
    (__pyx_v_pitch[0]) = 0;

    /* "cuda/_lib/ccudart/utils.pyx":2262
 *     height *= depth
 * 
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         if mem == NULL or pitch == NULL:
 *             return cudaErrorInvalidValue
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2268
 *         pitch[0] = 0
 *     else:
 *         return <cudaError_t>ccuda._cuMemAllocPitch_v2(<ccuda.CUdeviceptr_v2*>mem, pitch, width, height, 4)             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
  /*else*/ {
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2 *)__pyx_v_mem), __pyx_v_pitch, __pyx_v_width, __pyx_v_height, 4); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2268, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "cuda/_lib/ccudart/utils.pyx":2269
 *     else:
 *         return <cudaError_t>ccuda._cuMemAllocPitch_v2(<ccuda.CUdeviceptr_v2*>mem, pitch, width, height, 4)
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2259
 * 
 * 
 * cdef cudaError_t mallocPitch(size_t width, size_t height, size_t depth, void **mem, size_t *pitch) nogil except+:             # <<<<<<<<<<<<<<
 *     height *= depth
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.mallocPitch", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2272
 * 
 * 
 * cdef cudaError_t mallocMipmappedArray(cudaMipmappedArray_t *mipmappedArray, const cudaChannelFormatDesc *desc,             # <<<<<<<<<<<<<<
 *                                       size_t depth, size_t height, size_t width, unsigned int numLevels, unsigned int flags) nogil except+:
 *     if mipmappedArray == NULL:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_mallocMipmappedArray(__pyx_t_4cuda_7ccudart_cudaMipmappedArray_t *__pyx_v_mipmappedArray, struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *__pyx_v_desc, size_t __pyx_v_depth, size_t __pyx_v_height, size_t __pyx_v_width, unsigned int __pyx_v_numLevels, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_CUmipmappedArray __pyx_v_mipmap;
  __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_v_ad;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("mallocMipmappedArray", __pyx_f[1], 2272, 1, __PYX_ERR(1, 2272, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2274
 * cdef cudaError_t mallocMipmappedArray(cudaMipmappedArray_t *mipmappedArray, const cudaChannelFormatDesc *desc,
 *                                       size_t depth, size_t height, size_t width, unsigned int numLevels, unsigned int flags) nogil except+:
 *     if mipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  __pyx_t_1 = ((__pyx_v_mipmappedArray == NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2275
 *                                       size_t depth, size_t height, size_t width, unsigned int numLevels, unsigned int flags) nogil except+:
 *     if mipmappedArray == NULL:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmipmappedArray mipmap = NULL
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2274
 * cdef cudaError_t mallocMipmappedArray(cudaMipmappedArray_t *mipmappedArray, const cudaChannelFormatDesc *desc,
 *                                       size_t depth, size_t height, size_t width, unsigned int numLevels, unsigned int flags) nogil except+:
 *     if mipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2277
 *         return cudaErrorInvalidValue
 * 
 *     cdef ccuda.CUmipmappedArray mipmap = NULL             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 *     memset(&ad, 0, sizeof(ad))
 */
  __pyx_v_mipmap = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":2279
 *     cdef ccuda.CUmipmappedArray mipmap = NULL
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 *     memset(&ad, 0, sizeof(ad))             # <<<<<<<<<<<<<<
 * 
 *     mipmappedArray[0] = NULL
 */
  (void)(memset((&__pyx_v_ad), 0, (sizeof(__pyx_v_ad))));

  /* "cuda/_lib/ccudart/utils.pyx":2281
 *     memset(&ad, 0, sizeof(ad))
 * 
 *     mipmappedArray[0] = NULL             # <<<<<<<<<<<<<<
 *     if (((width == 0)) or
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 */
  (__pyx_v_mipmappedArray[0]) = NULL;

  /* "cuda/_lib/ccudart/utils.pyx":2282
 * 
 *     mipmappedArray[0] = NULL
 *     if (((width == 0)) or             # <<<<<<<<<<<<<<
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 */
  __pyx_t_2 = ((__pyx_v_width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2283
 *     mipmappedArray[0] = NULL
 *     if (((width == 0)) or
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or             # <<<<<<<<<<<<<<
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or
 */
  __pyx_t_2 = ((__pyx_v_height == 0) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L7_next_or;
  } else {
  }
  __pyx_t_2 = ((__pyx_v_depth != 0) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L7_next_or;
  } else {
  }
  __pyx_t_2 = ((!((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayLayered) != 0)) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L7_next_or:;

  /* "cuda/_lib/ccudart/utils.pyx":2284
 *     if (((width == 0)) or
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or             # <<<<<<<<<<<<<<
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or
 *         ((flags & cudaArrayLayered) and (flags & cudaArrayCubemap) and ((width != height) or (depth % 6 != 0)))):
 */
  __pyx_t_2 = ((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayLayered) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L10_next_or;
  } else {
  }
  __pyx_t_2 = ((__pyx_v_depth == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L10_next_or:;

  /* "cuda/_lib/ccudart/utils.pyx":2285
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or             # <<<<<<<<<<<<<<
 *         ((flags & cudaArrayLayered) and (flags & cudaArrayCubemap) and ((width != height) or (depth % 6 != 0)))):
 *         return cudaErrorInvalidValue
 */
  __pyx_t_2 = ((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayCubemap) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L12_next_or;
  } else {
  }
  __pyx_t_2 = ((!((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayLayered) != 0)) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L12_next_or;
  } else {
  }
  __pyx_t_2 = ((__pyx_v_width != __pyx_v_height) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_depth != 6) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_L12_next_or:;

  /* "cuda/_lib/ccudart/utils.pyx":2286
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or
 *         ((flags & cudaArrayLayered) and (flags & cudaArrayCubemap) and ((width != height) or (depth % 6 != 0)))):             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 *     else:
 */
  __pyx_t_2 = ((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayLayered) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_flags & __pyx_e_4cuda_7ccudart_cudaArrayCubemap) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_width != __pyx_v_height) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_depth % 6) != 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":2282
 * 
 *     mipmappedArray[0] = NULL
 *     if (((width == 0)) or             # <<<<<<<<<<<<<<
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 */
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2287
 *         ((flags & cudaArrayCubemap) and not (flags & cudaArrayLayered) and ((width != height) or (depth != 6))) or
 *         ((flags & cudaArrayLayered) and (flags & cudaArrayCubemap) and ((width != height) or (depth % 6 != 0)))):
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *     else:
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, &ad.Format)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2282
 * 
 *     mipmappedArray[0] = NULL
 *     if (((width == 0)) or             # <<<<<<<<<<<<<<
 *         ((height == 0) and (depth != 0) and not (flags & cudaArrayLayered)) or
 *         ((flags & cudaArrayLayered) and (depth == 0)) or
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2289
 *         return cudaErrorInvalidValue
 *     else:
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, &ad.Format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
  /*else*/ {
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo(__pyx_v_desc, ((int *)(&__pyx_v_ad.NumChannels)), (&__pyx_v_ad.Format));

    /* "cuda/_lib/ccudart/utils.pyx":2290
 *     else:
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, &ad.Format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         ad.Height = <unsigned int>height
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2291
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, &ad.Format)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         ad.Height = <unsigned int>height
 *         ad.Width  = <unsigned int>width
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2290
 *     else:
 *         err = getDescInfo(desc, <int*>&ad.NumChannels, &ad.Format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         ad.Height = <unsigned int>height
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2292
 *         if err != cudaSuccess:
 *             return err
 *         ad.Height = <unsigned int>height             # <<<<<<<<<<<<<<
 *         ad.Width  = <unsigned int>width
 *         ad.Depth  = <unsigned int>depth
 */
    __pyx_v_ad.Height = ((unsigned int)__pyx_v_height);

    /* "cuda/_lib/ccudart/utils.pyx":2293
 *             return err
 *         ad.Height = <unsigned int>height
 *         ad.Width  = <unsigned int>width             # <<<<<<<<<<<<<<
 *         ad.Depth  = <unsigned int>depth
 *         ad.Flags  = flags
 */
    __pyx_v_ad.Width = ((unsigned int)__pyx_v_width);

    /* "cuda/_lib/ccudart/utils.pyx":2294
 *         ad.Height = <unsigned int>height
 *         ad.Width  = <unsigned int>width
 *         ad.Depth  = <unsigned int>depth             # <<<<<<<<<<<<<<
 *         ad.Flags  = flags
 *         err = <cudaError_t>ccuda._cuMipmappedArrayCreate(&mipmap, &ad, numLevels)
 */
    __pyx_v_ad.Depth = ((unsigned int)__pyx_v_depth);

    /* "cuda/_lib/ccudart/utils.pyx":2295
 *         ad.Width  = <unsigned int>width
 *         ad.Depth  = <unsigned int>depth
 *         ad.Flags  = flags             # <<<<<<<<<<<<<<
 *         err = <cudaError_t>ccuda._cuMipmappedArrayCreate(&mipmap, &ad, numLevels)
 *         if err != cudaSuccess:
 */
    __pyx_v_ad.Flags = __pyx_v_flags;

    /* "cuda/_lib/ccudart/utils.pyx":2296
 *         ad.Depth  = <unsigned int>depth
 *         ad.Flags  = flags
 *         err = <cudaError_t>ccuda._cuMipmappedArrayCreate(&mipmap, &ad, numLevels)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate((&__pyx_v_mipmap), (&__pyx_v_ad), __pyx_v_numLevels); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2296, __pyx_L1_error)
    __pyx_v_err = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);

    /* "cuda/_lib/ccudart/utils.pyx":2297
 *         ad.Flags  = flags
 *         err = <cudaError_t>ccuda._cuMipmappedArrayCreate(&mipmap, &ad, numLevels)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         mipmappedArray[0] = <cudaMipmappedArray_t>mipmap
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2298
 *         err = <cudaError_t>ccuda._cuMipmappedArrayCreate(&mipmap, &ad, numLevels)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         mipmappedArray[0] = <cudaMipmappedArray_t>mipmap
 *     return cudaSuccess
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2297
 *         ad.Flags  = flags
 *         err = <cudaError_t>ccuda._cuMipmappedArrayCreate(&mipmap, &ad, numLevels)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         mipmappedArray[0] = <cudaMipmappedArray_t>mipmap
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2299
 *         if err != cudaSuccess:
 *             return err
 *         mipmappedArray[0] = <cudaMipmappedArray_t>mipmap             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
    (__pyx_v_mipmappedArray[0]) = ((__pyx_t_4cuda_7ccudart_cudaMipmappedArray_t)__pyx_v_mipmap);
  }

  /* "cuda/_lib/ccudart/utils.pyx":2300
 *             return err
 *         mipmappedArray[0] = <cudaMipmappedArray_t>mipmap
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2272
 * 
 * 
 * cdef cudaError_t mallocMipmappedArray(cudaMipmappedArray_t *mipmappedArray, const cudaChannelFormatDesc *desc,             # <<<<<<<<<<<<<<
 *                                       size_t depth, size_t height, size_t width, unsigned int numLevels, unsigned int flags) nogil except+:
 *     if mipmappedArray == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.mallocMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2303
 * 
 * 
 * cdef cudaError_t memcpyAsyncDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind, cudaStream_t stream) nogil except+:             # <<<<<<<<<<<<<<
 *     if size == 0:
 *         return cudaSuccess
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyAsyncDispatch(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_size, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_stream) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_2;
  __pyx_t_4cuda_5ccuda_CUresult __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpyAsyncDispatch", __pyx_f[1], 2303, 1, __PYX_ERR(1, 2303, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2304
 * 
 * cdef cudaError_t memcpyAsyncDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind, cudaStream_t stream) nogil except+:
 *     if size == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 */
  __pyx_t_1 = ((__pyx_v_size == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2305
 * cdef cudaError_t memcpyAsyncDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind, cudaStream_t stream) nogil except+:
 *     if size == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, stream, True)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2304
 * 
 * cdef cudaError_t memcpyAsyncDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind, cudaStream_t stream) nogil except+:
 *     if size == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2306
 *     if size == 0:
 *         return cudaSuccess
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, stream, True)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 */
  __pyx_t_1 = ((__pyx_v_kind == __pyx_e_4cuda_7ccudart_cudaMemcpyHostToHost) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2307
 *         return cudaSuccess
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, stream, True)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return <cudaError_t>ccuda._cuMemcpyDtoHAsync_v2(dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DPtr(((char *)__pyx_v_dst), __pyx_v_size, ((char const *)__pyx_v_src), __pyx_v_size, __pyx_v_size, 1, __pyx_v_kind, __pyx_v_stream, 1);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2307, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2306
 *     if size == 0:
 *         return cudaSuccess
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, stream, True)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2308
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, stream, True)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemcpyDtoHAsync_v2(dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 */
  __pyx_t_1 = ((__pyx_v_kind == __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2309
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, stream, True)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return <cudaError_t>ccuda._cuMemcpyDtoHAsync_v2(dst, <ccuda.CUdeviceptr_v2>src, size, stream)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         return<cudaError_t>ccuda._cuMemcpyHtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, src, size, stream)
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2(__pyx_v_dst, ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src), __pyx_v_size, __pyx_v_stream); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2309, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2308
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return memcpy2DPtr(<char*>dst, size, <const char*>src, size, size, 1, kind, stream, True)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         return <cudaError_t>ccuda._cuMemcpyDtoHAsync_v2(dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2310
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return <cudaError_t>ccuda._cuMemcpyDtoHAsync_v2(dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *         return<cudaError_t>ccuda._cuMemcpyHtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
  __pyx_t_1 = ((__pyx_v_kind == __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2311
 *         return <cudaError_t>ccuda._cuMemcpyDtoHAsync_v2(dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         return<cudaError_t>ccuda._cuMemcpyHtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, src, size, stream)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return<cudaError_t>ccuda._cuMemcpyDtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst), __pyx_v_src, __pyx_v_size, __pyx_v_stream); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2311, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2310
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return <cudaError_t>ccuda._cuMemcpyDtoHAsync_v2(dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *         return<cudaError_t>ccuda._cuMemcpyHtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2312
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         return<cudaError_t>ccuda._cuMemcpyHtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         return<cudaError_t>ccuda._cuMemcpyDtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 */
  __pyx_t_1 = ((__pyx_v_kind == __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2313
 *         return<cudaError_t>ccuda._cuMemcpyHtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return<cudaError_t>ccuda._cuMemcpyDtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return<cudaError_t>ccuda._cuMemcpyAsync(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst), ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src), __pyx_v_size, __pyx_v_stream); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2313, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2312
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         return<cudaError_t>ccuda._cuMemcpyHtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         return<cudaError_t>ccuda._cuMemcpyDtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2314
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return<cudaError_t>ccuda._cuMemcpyDtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         return<cudaError_t>ccuda._cuMemcpyAsync(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     return cudaErrorInvalidMemcpyDirection
 */
  __pyx_t_1 = ((__pyx_v_kind == __pyx_e_4cuda_7ccudart_cudaMemcpyDefault) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2315
 *         return<cudaError_t>ccuda._cuMemcpyDtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return<cudaError_t>ccuda._cuMemcpyAsync(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)             # <<<<<<<<<<<<<<
 *     return cudaErrorInvalidMemcpyDirection
 * 
 */
    __pyx_t_3 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync(((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_dst), ((__pyx_t_4cuda_5ccuda_CUdeviceptr_v2)__pyx_v_src), __pyx_v_size, __pyx_v_stream); if (unlikely(__pyx_t_3 == ((__pyx_t_4cuda_5ccuda_CUresult)__pyx_e_4cuda_5ccuda_CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 2315, __pyx_L1_error)
    __pyx_r = ((__pyx_t_4cuda_7ccudart_cudaError_t)__pyx_t_3);
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2314
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return<cudaError_t>ccuda._cuMemcpyDtoDAsync_v2(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         return<cudaError_t>ccuda._cuMemcpyAsync(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     return cudaErrorInvalidMemcpyDirection
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2316
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return<cudaError_t>ccuda._cuMemcpyAsync(<ccuda.CUdeviceptr_v2>dst, <ccuda.CUdeviceptr_v2>src, size, stream)
 *     return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2303
 * 
 * 
 * cdef cudaError_t memcpyAsyncDispatch(void *dst, const void *src, size_t size, cudaMemcpyKind kind, cudaStream_t stream) nogil except+:             # <<<<<<<<<<<<<<
 *     if size == 0:
 *         return cudaSuccess
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpyAsyncDispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2319
 * 
 * 
 * cdef cudaError_t toCudartMemCopy3DParams(const ccuda.CUDA_MEMCPY3D_v2 *cd, cudaMemcpy3DParms *p) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef cudaExtent srcBlockExtent
 *     cdef cudaExtent dstBlockExtent
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_toCudartMemCopy3DParams(__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 const *__pyx_v_cd, struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms *__pyx_v_p) {
  struct __pyx_t_4cuda_7ccudart_cudaExtent __pyx_v_srcBlockExtent;
  struct __pyx_t_4cuda_7ccudart_cudaExtent __pyx_v_dstBlockExtent;
  struct __pyx_t_4cuda_7ccudart_cudaExtent __pyx_v_copyBlockExtent;
  __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_srcFmt;
  __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_dstFmt;
  int __pyx_v_numChannels;
  size_t __pyx_v_srcElementSize;
  size_t __pyx_v_dstElementSize;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  size_t __pyx_v_elementSize;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  size_t __pyx_t_3;
  void *__pyx_t_4;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("toCudartMemCopy3DParams", __pyx_f[1], 2319, 1, __PYX_ERR(1, 2319, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2325
 *     cdef ccuda.CUarray_format srcFmt
 *     cdef ccuda.CUarray_format dstFmt
 *     cdef int numChannels = 0             # <<<<<<<<<<<<<<
 *     srcBlockExtent.width = srcBlockExtent.height = srcBlockExtent.depth = 1
 *     dstBlockExtent.width = dstBlockExtent.height = dstBlockExtent.depth = 1
 */
  __pyx_v_numChannels = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2326
 *     cdef ccuda.CUarray_format dstFmt
 *     cdef int numChannels = 0
 *     srcBlockExtent.width = srcBlockExtent.height = srcBlockExtent.depth = 1             # <<<<<<<<<<<<<<
 *     dstBlockExtent.width = dstBlockExtent.height = dstBlockExtent.depth = 1
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1
 */
  __pyx_v_srcBlockExtent.width = 1;
  __pyx_v_srcBlockExtent.height = 1;
  __pyx_v_srcBlockExtent.depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":2327
 *     cdef int numChannels = 0
 *     srcBlockExtent.width = srcBlockExtent.height = srcBlockExtent.depth = 1
 *     dstBlockExtent.width = dstBlockExtent.height = dstBlockExtent.depth = 1             # <<<<<<<<<<<<<<
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1
 * 
 */
  __pyx_v_dstBlockExtent.width = 1;
  __pyx_v_dstBlockExtent.height = 1;
  __pyx_v_dstBlockExtent.depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":2328
 *     srcBlockExtent.width = srcBlockExtent.height = srcBlockExtent.depth = 1
 *     dstBlockExtent.width = dstBlockExtent.height = dstBlockExtent.depth = 1
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1             # <<<<<<<<<<<<<<
 * 
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))
 */
  __pyx_v_copyBlockExtent.width = 1;
  __pyx_v_copyBlockExtent.height = 1;
  __pyx_v_copyBlockExtent.depth = 1;

  /* "cuda/_lib/ccudart/utils.pyx":2330
 *     copyBlockExtent.width = copyBlockExtent.height = copyBlockExtent.depth = 1
 * 
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))             # <<<<<<<<<<<<<<
 *     p[0].srcPtr.xsize = 0
 *     p[0].dstPtr.xsize = 0
 */
  (void)(memset(__pyx_v_p, 0, (sizeof(struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms))));

  /* "cuda/_lib/ccudart/utils.pyx":2331
 * 
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))
 *     p[0].srcPtr.xsize = 0             # <<<<<<<<<<<<<<
 *     p[0].dstPtr.xsize = 0
 * 
 */
  (__pyx_v_p[0]).srcPtr.xsize = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2332
 *     memset(p, 0, sizeof(cudaMemcpy3DParms))
 *     p[0].srcPtr.xsize = 0
 *     p[0].dstPtr.xsize = 0             # <<<<<<<<<<<<<<
 * 
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):
 */
  (__pyx_v_p[0]).dstPtr.xsize = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2334
 *     p[0].dstPtr.xsize = 0
 * 
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyHostToHost
 * 
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2335
 * 
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):
 *         p[0].kind = cudaMemcpyHostToHost             # <<<<<<<<<<<<<<
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcHost
 */
    (__pyx_v_p[0]).kind = __pyx_e_4cuda_7ccudart_cudaMemcpyHostToHost;

    /* "cuda/_lib/ccudart/utils.pyx":2337
 *         p[0].kind = cudaMemcpyHostToHost
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcHost             # <<<<<<<<<<<<<<
 *         p[0].srcPtr.pitch = cd[0].srcPitch
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 */
    (__pyx_v_p[0]).srcPtr.ptr = ((void *)(__pyx_v_cd[0]).srcHost);

    /* "cuda/_lib/ccudart/utils.pyx":2338
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcHost
 *         p[0].srcPtr.pitch = cd[0].srcPitch             # <<<<<<<<<<<<<<
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 */
    __pyx_t_3 = (__pyx_v_cd[0]).srcPitch;
    (__pyx_v_p[0]).srcPtr.pitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2339
 *         p[0].srcPtr.ptr = <void*>cd[0].srcHost
 *         p[0].srcPtr.pitch = cd[0].srcPitch
 *         p[0].srcPtr.ysize = cd[0].srcHeight             # <<<<<<<<<<<<<<
 * 
 *         p[0].dstPtr.ptr = cd[0].dstHost
 */
    __pyx_t_3 = (__pyx_v_cd[0]).srcHeight;
    (__pyx_v_p[0]).srcPtr.ysize = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2341
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 *         p[0].dstPtr.ptr = cd[0].dstHost             # <<<<<<<<<<<<<<
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 */
    __pyx_t_4 = (__pyx_v_cd[0]).dstHost;
    (__pyx_v_p[0]).dstPtr.ptr = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2342
 * 
 *         p[0].dstPtr.ptr = cd[0].dstHost
 *         p[0].dstPtr.pitch = cd[0].dstPitch             # <<<<<<<<<<<<<<
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 */
    __pyx_t_3 = (__pyx_v_cd[0]).dstPitch;
    (__pyx_v_p[0]).dstPtr.pitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2343
 *         p[0].dstPtr.ptr = cd[0].dstHost
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight             # <<<<<<<<<<<<<<
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 */
    __pyx_t_3 = (__pyx_v_cd[0]).dstHeight;
    (__pyx_v_p[0]).dstPtr.ysize = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2334
 *     p[0].dstPtr.xsize = 0
 * 
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyHostToHost
 * 
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2344
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST             # <<<<<<<<<<<<<<
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *                 or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2345
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE             # <<<<<<<<<<<<<<
 *                 or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 *         p[0].kind = cudaMemcpyHostToDevice
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2346
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *                 or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyHostToDevice
 * 
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":2344
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST             # <<<<<<<<<<<<<<
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *                 or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 */
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2347
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *                 or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 *         p[0].kind = cudaMemcpyHostToDevice             # <<<<<<<<<<<<<<
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcHost
 */
    (__pyx_v_p[0]).kind = __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice;

    /* "cuda/_lib/ccudart/utils.pyx":2349
 *         p[0].kind = cudaMemcpyHostToDevice
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcHost             # <<<<<<<<<<<<<<
 *         p[0].srcPtr.pitch = cd[0].srcPitch
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 */
    (__pyx_v_p[0]).srcPtr.ptr = ((void *)(__pyx_v_cd[0]).srcHost);

    /* "cuda/_lib/ccudart/utils.pyx":2350
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcHost
 *         p[0].srcPtr.pitch = cd[0].srcPitch             # <<<<<<<<<<<<<<
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 */
    __pyx_t_3 = (__pyx_v_cd[0]).srcPitch;
    (__pyx_v_p[0]).srcPtr.pitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2351
 *         p[0].srcPtr.ptr = <void*>cd[0].srcHost
 *         p[0].srcPtr.pitch = cd[0].srcPitch
 *         p[0].srcPtr.ysize = cd[0].srcHeight             # <<<<<<<<<<<<<<
 * 
 *         if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 */
    __pyx_t_3 = (__pyx_v_cd[0]).srcHeight;
    (__pyx_v_p[0]).srcPtr.ysize = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2353
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 *         if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *             p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *         else:
 */
    __pyx_t_1 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2354
 * 
 *         if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *             p[0].dstArray = <cudaArray_t>cd[0].dstArray             # <<<<<<<<<<<<<<
 *         else:
 *             p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 */
      (__pyx_v_p[0]).dstArray = ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).dstArray);

      /* "cuda/_lib/ccudart/utils.pyx":2353
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 *         if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *             p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *         else:
 */
      goto __pyx_L9;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2356
 *             p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *         else:
 *             p[0].dstPtr.ptr = <void*>cd[0].dstDevice             # <<<<<<<<<<<<<<
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 */
    /*else*/ {
      (__pyx_v_p[0]).dstPtr.ptr = ((void *)(__pyx_v_cd[0]).dstDevice);

      /* "cuda/_lib/ccudart/utils.pyx":2357
 *         else:
 *             p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 *             p[0].dstPtr.pitch = cd[0].dstPitch             # <<<<<<<<<<<<<<
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
      __pyx_t_3 = (__pyx_v_cd[0]).dstPitch;
      (__pyx_v_p[0]).dstPtr.pitch = __pyx_t_3;

      /* "cuda/_lib/ccudart/utils.pyx":2358
 *             p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight             # <<<<<<<<<<<<<<
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 *             and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):
 */
      __pyx_t_3 = (__pyx_v_cd[0]).dstHeight;
      (__pyx_v_p[0]).dstPtr.ysize = __pyx_t_3;
    }
    __pyx_L9:;

    /* "cuda/_lib/ccudart/utils.pyx":2344
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST             # <<<<<<<<<<<<<<
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE
 *                 or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2359
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 *             and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):
 *         p[0].kind = cudaMemcpyDeviceToHost
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE) != 0);
  if (!__pyx_t_2) {
  } else {
    goto __pyx_L11_next_and;
  }
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_L11_next_and:;

  /* "cuda/_lib/ccudart/utils.pyx":2360
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 *             and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyDeviceToHost
 * 
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_HOST) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L10_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":2359
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 *             and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):
 *         p[0].kind = cudaMemcpyDeviceToHost
 */
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2361
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 *             and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):
 *         p[0].kind = cudaMemcpyDeviceToHost             # <<<<<<<<<<<<<<
 * 
 *         if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 */
    (__pyx_v_p[0]).kind = __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost;

    /* "cuda/_lib/ccudart/utils.pyx":2363
 *         p[0].kind = cudaMemcpyDeviceToHost
 * 
 *         if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *             p[0].srcArray = <cudaArray_t>cd[0].srcArray
 *         else:
 */
    __pyx_t_1 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2364
 * 
 *         if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *             p[0].srcArray = <cudaArray_t>cd[0].srcArray             # <<<<<<<<<<<<<<
 *         else:
 *             p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 */
      (__pyx_v_p[0]).srcArray = ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).srcArray);

      /* "cuda/_lib/ccudart/utils.pyx":2363
 *         p[0].kind = cudaMemcpyDeviceToHost
 * 
 *         if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *             p[0].srcArray = <cudaArray_t>cd[0].srcArray
 *         else:
 */
      goto __pyx_L13;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2366
 *             p[0].srcArray = <cudaArray_t>cd[0].srcArray
 *         else:
 *             p[0].srcPtr.ptr = <void*>cd[0].srcDevice             # <<<<<<<<<<<<<<
 *             p[0].srcPtr.pitch = cd[0].srcPitch
 *             p[0].srcPtr.ysize = cd[0].srcHeight
 */
    /*else*/ {
      (__pyx_v_p[0]).srcPtr.ptr = ((void *)(__pyx_v_cd[0]).srcDevice);

      /* "cuda/_lib/ccudart/utils.pyx":2367
 *         else:
 *             p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 *             p[0].srcPtr.pitch = cd[0].srcPitch             # <<<<<<<<<<<<<<
 *             p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 */
      __pyx_t_3 = (__pyx_v_cd[0]).srcPitch;
      (__pyx_v_p[0]).srcPtr.pitch = __pyx_t_3;

      /* "cuda/_lib/ccudart/utils.pyx":2368
 *             p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 *             p[0].srcPtr.pitch = cd[0].srcPitch
 *             p[0].srcPtr.ysize = cd[0].srcHeight             # <<<<<<<<<<<<<<
 * 
 *         p[0].dstPtr.ptr = cd[0].dstHost
 */
      __pyx_t_3 = (__pyx_v_cd[0]).srcHeight;
      (__pyx_v_p[0]).srcPtr.ysize = __pyx_t_3;
    }
    __pyx_L13:;

    /* "cuda/_lib/ccudart/utils.pyx":2370
 *             p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 *         p[0].dstPtr.ptr = cd[0].dstHost             # <<<<<<<<<<<<<<
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 */
    __pyx_t_4 = (__pyx_v_cd[0]).dstHost;
    (__pyx_v_p[0]).dstPtr.ptr = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2371
 * 
 *         p[0].dstPtr.ptr = cd[0].dstHost
 *         p[0].dstPtr.pitch = cd[0].dstPitch             # <<<<<<<<<<<<<<
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 */
    __pyx_t_3 = (__pyx_v_cd[0]).dstPitch;
    (__pyx_v_p[0]).dstPtr.pitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2372
 *         p[0].dstPtr.ptr = cd[0].dstHost
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight             # <<<<<<<<<<<<<<
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 */
    __pyx_t_3 = (__pyx_v_cd[0]).dstHeight;
    (__pyx_v_p[0]).dstPtr.ysize = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2359
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 *             and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST):
 *         p[0].kind = cudaMemcpyDeviceToHost
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2373
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 *         p[0].kind = cudaMemcpyDeviceToDevice
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE) != 0);
  if (!__pyx_t_2) {
  } else {
    goto __pyx_L15_next_and;
  }
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_L15_next_and:;

  /* "cuda/_lib/ccudart/utils.pyx":2374
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyDeviceToDevice
 * 
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L14_bool_binop_done:;

  /* "cuda/_lib/ccudart/utils.pyx":2373
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 *         p[0].kind = cudaMemcpyDeviceToDevice
 */
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2375
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 *         p[0].kind = cudaMemcpyDeviceToDevice             # <<<<<<<<<<<<<<
 * 
 *         if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 */
    (__pyx_v_p[0]).kind = __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice;

    /* "cuda/_lib/ccudart/utils.pyx":2377
 *         p[0].kind = cudaMemcpyDeviceToDevice
 * 
 *         if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *             p[0].srcArray = <cudaArray_t>cd[0].srcArray
 *         else:
 */
    __pyx_t_1 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2378
 * 
 *         if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *             p[0].srcArray = <cudaArray_t>cd[0].srcArray             # <<<<<<<<<<<<<<
 *         else:
 *             p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 */
      (__pyx_v_p[0]).srcArray = ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).srcArray);

      /* "cuda/_lib/ccudart/utils.pyx":2377
 *         p[0].kind = cudaMemcpyDeviceToDevice
 * 
 *         if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *             p[0].srcArray = <cudaArray_t>cd[0].srcArray
 *         else:
 */
      goto __pyx_L18;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2380
 *             p[0].srcArray = <cudaArray_t>cd[0].srcArray
 *         else:
 *             p[0].srcPtr.ptr = <void*>cd[0].srcDevice             # <<<<<<<<<<<<<<
 *             p[0].srcPtr.pitch = cd[0].srcPitch
 *             p[0].srcPtr.ysize = cd[0].srcHeight
 */
    /*else*/ {
      (__pyx_v_p[0]).srcPtr.ptr = ((void *)(__pyx_v_cd[0]).srcDevice);

      /* "cuda/_lib/ccudart/utils.pyx":2381
 *         else:
 *             p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 *             p[0].srcPtr.pitch = cd[0].srcPitch             # <<<<<<<<<<<<<<
 *             p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 */
      __pyx_t_3 = (__pyx_v_cd[0]).srcPitch;
      (__pyx_v_p[0]).srcPtr.pitch = __pyx_t_3;

      /* "cuda/_lib/ccudart/utils.pyx":2382
 *             p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 *             p[0].srcPtr.pitch = cd[0].srcPitch
 *             p[0].srcPtr.ysize = cd[0].srcHeight             # <<<<<<<<<<<<<<
 * 
 *         if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 */
      __pyx_t_3 = (__pyx_v_cd[0]).srcHeight;
      (__pyx_v_p[0]).srcPtr.ysize = __pyx_t_3;
    }
    __pyx_L18:;

    /* "cuda/_lib/ccudart/utils.pyx":2384
 *             p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 *         if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *             p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *         else:
 */
    __pyx_t_1 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2385
 * 
 *         if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *             p[0].dstArray = <cudaArray_t>cd[0].dstArray             # <<<<<<<<<<<<<<
 *         else:
 *             p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 */
      (__pyx_v_p[0]).dstArray = ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).dstArray);

      /* "cuda/_lib/ccudart/utils.pyx":2384
 *             p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 *         if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *             p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *         else:
 */
      goto __pyx_L19;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2387
 *             p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *         else:
 *             p[0].dstPtr.ptr = <void*>cd[0].dstDevice             # <<<<<<<<<<<<<<
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 */
    /*else*/ {
      (__pyx_v_p[0]).dstPtr.ptr = ((void *)(__pyx_v_cd[0]).dstDevice);

      /* "cuda/_lib/ccudart/utils.pyx":2388
 *         else:
 *             p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 *             p[0].dstPtr.pitch = cd[0].dstPitch             # <<<<<<<<<<<<<<
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):
 */
      __pyx_t_3 = (__pyx_v_cd[0]).dstPitch;
      (__pyx_v_p[0]).dstPtr.pitch = __pyx_t_3;

      /* "cuda/_lib/ccudart/utils.pyx":2389
 *             p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight             # <<<<<<<<<<<<<<
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):
 *         p[0].kind = cudaMemcpyDefault
 */
      __pyx_t_3 = (__pyx_v_cd[0]).dstHeight;
      (__pyx_v_p[0]).dstPtr.ysize = __pyx_t_3;
    }
    __pyx_L19:;

    /* "cuda/_lib/ccudart/utils.pyx":2373
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif ((cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)             # <<<<<<<<<<<<<<
 *             and (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE or cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY)):
 *         p[0].kind = cudaMemcpyDeviceToDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2390
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyDefault
 * 
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2391
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):
 *         p[0].kind = cudaMemcpyDefault             # <<<<<<<<<<<<<<
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 */
    (__pyx_v_p[0]).kind = __pyx_e_4cuda_7ccudart_cudaMemcpyDefault;

    /* "cuda/_lib/ccudart/utils.pyx":2393
 *         p[0].kind = cudaMemcpyDefault
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcDevice             # <<<<<<<<<<<<<<
 *         p[0].srcPtr.pitch = cd[0].srcPitch
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 */
    (__pyx_v_p[0]).srcPtr.ptr = ((void *)(__pyx_v_cd[0]).srcDevice);

    /* "cuda/_lib/ccudart/utils.pyx":2394
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 *         p[0].srcPtr.pitch = cd[0].srcPitch             # <<<<<<<<<<<<<<
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 */
    __pyx_t_3 = (__pyx_v_cd[0]).srcPitch;
    (__pyx_v_p[0]).srcPtr.pitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2395
 *         p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 *         p[0].srcPtr.pitch = cd[0].srcPitch
 *         p[0].srcPtr.ysize = cd[0].srcHeight             # <<<<<<<<<<<<<<
 * 
 *         p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 */
    __pyx_t_3 = (__pyx_v_cd[0]).srcHeight;
    (__pyx_v_p[0]).srcPtr.ysize = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2397
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 *         p[0].dstPtr.ptr = <void*>cd[0].dstDevice             # <<<<<<<<<<<<<<
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 */
    (__pyx_v_p[0]).dstPtr.ptr = ((void *)(__pyx_v_cd[0]).dstDevice);

    /* "cuda/_lib/ccudart/utils.pyx":2398
 * 
 *         p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 *         p[0].dstPtr.pitch = cd[0].dstPitch             # <<<<<<<<<<<<<<
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 */
    __pyx_t_3 = (__pyx_v_cd[0]).dstPitch;
    (__pyx_v_p[0]).dstPtr.pitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2399
 *         p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight             # <<<<<<<<<<<<<<
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *         p[0].kind = cudaMemcpyDefault
 */
    __pyx_t_3 = (__pyx_v_cd[0]).dstHeight;
    (__pyx_v_p[0]).dstPtr.ysize = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2390
 *             p[0].dstPtr.pitch = cd[0].dstPitch
 *             p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyDefault
 * 
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2400
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyDefault
 * 
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L22_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L22_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2401
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *         p[0].kind = cudaMemcpyDefault             # <<<<<<<<<<<<<<
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 */
    (__pyx_v_p[0]).kind = __pyx_e_4cuda_7ccudart_cudaMemcpyDefault;

    /* "cuda/_lib/ccudart/utils.pyx":2403
 *         p[0].kind = cudaMemcpyDefault
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcDevice             # <<<<<<<<<<<<<<
 *         p[0].srcPtr.pitch = cd[0].srcPitch
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 */
    (__pyx_v_p[0]).srcPtr.ptr = ((void *)(__pyx_v_cd[0]).srcDevice);

    /* "cuda/_lib/ccudart/utils.pyx":2404
 * 
 *         p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 *         p[0].srcPtr.pitch = cd[0].srcPitch             # <<<<<<<<<<<<<<
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 */
    __pyx_t_3 = (__pyx_v_cd[0]).srcPitch;
    (__pyx_v_p[0]).srcPtr.pitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2405
 *         p[0].srcPtr.ptr = <void*>cd[0].srcDevice
 *         p[0].srcPtr.pitch = cd[0].srcPitch
 *         p[0].srcPtr.ysize = cd[0].srcHeight             # <<<<<<<<<<<<<<
 * 
 *         p[0].dstArray = <cudaArray_t>cd[0].dstArray
 */
    __pyx_t_3 = (__pyx_v_cd[0]).srcHeight;
    (__pyx_v_p[0]).srcPtr.ysize = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2407
 *         p[0].srcPtr.ysize = cd[0].srcHeight
 * 
 *         p[0].dstArray = <cudaArray_t>cd[0].dstArray             # <<<<<<<<<<<<<<
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):
 *         p[0].kind = cudaMemcpyDefault
 */
    (__pyx_v_p[0]).dstArray = ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).dstArray);

    /* "cuda/_lib/ccudart/utils.pyx":2400
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyDefault
 * 
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2408
 * 
 *         p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyDefault
 * 
 */
  __pyx_t_2 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L24_bool_binop_done;
  }
  __pyx_t_2 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L24_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2409
 *         p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):
 *         p[0].kind = cudaMemcpyDefault             # <<<<<<<<<<<<<<
 * 
 *         p[0].srcArray = <cudaArray_t>cd[0].srcArray
 */
    (__pyx_v_p[0]).kind = __pyx_e_4cuda_7ccudart_cudaMemcpyDefault;

    /* "cuda/_lib/ccudart/utils.pyx":2411
 *         p[0].kind = cudaMemcpyDefault
 * 
 *         p[0].srcArray = <cudaArray_t>cd[0].srcArray             # <<<<<<<<<<<<<<
 * 
 *         p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 */
    (__pyx_v_p[0]).srcArray = ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).srcArray);

    /* "cuda/_lib/ccudart/utils.pyx":2413
 *         p[0].srcArray = <cudaArray_t>cd[0].srcArray
 * 
 *         p[0].dstPtr.ptr = <void*>cd[0].dstDevice             # <<<<<<<<<<<<<<
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 */
    (__pyx_v_p[0]).dstPtr.ptr = ((void *)(__pyx_v_cd[0]).dstDevice);

    /* "cuda/_lib/ccudart/utils.pyx":2414
 * 
 *         p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 *         p[0].dstPtr.pitch = cd[0].dstPitch             # <<<<<<<<<<<<<<
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     else:
 */
    __pyx_t_3 = (__pyx_v_cd[0]).dstPitch;
    (__pyx_v_p[0]).dstPtr.pitch = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2415
 *         p[0].dstPtr.ptr = <void*>cd[0].dstDevice
 *         p[0].dstPtr.pitch = cd[0].dstPitch
 *         p[0].dstPtr.ysize = cd[0].dstHeight             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorUnknown
 */
    __pyx_t_3 = (__pyx_v_cd[0]).dstHeight;
    (__pyx_v_p[0]).dstPtr.ysize = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2408
 * 
 *         p[0].dstArray = <cudaArray_t>cd[0].dstArray
 *     elif (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY and cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED):             # <<<<<<<<<<<<<<
 *         p[0].kind = cudaMemcpyDefault
 * 
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2417
 *         p[0].dstPtr.ysize = cd[0].dstHeight
 *     else:
 *         return cudaErrorUnknown             # <<<<<<<<<<<<<<
 * 
 *     cdef size_t srcElementSize = 0
 */
  /*else*/ {
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorUnknown;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "cuda/_lib/ccudart/utils.pyx":2419
 *         return cudaErrorUnknown
 * 
 *     cdef size_t srcElementSize = 0             # <<<<<<<<<<<<<<
 *     cdef size_t dstElementSize = 0
 *     cdef cudaError_t err
 */
  __pyx_v_srcElementSize = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2420
 * 
 *     cdef size_t srcElementSize = 0
 *     cdef size_t dstElementSize = 0             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err
 * 
 */
  __pyx_v_dstElementSize = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2423
 *     cdef cudaError_t err
 * 
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *         err = getFormat(<cudaArray_t>cd[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:
 */
  __pyx_t_1 = (((__pyx_v_cd[0]).srcMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2424
 * 
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *         err = getFormat(<cudaArray_t>cd[0].srcArray, numChannels, &srcFmt)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_5 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat(((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).srcArray), __pyx_v_numChannels, (&__pyx_v_srcFmt));
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2424, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":2425
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *         err = getFormat(<cudaArray_t>cd[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2426
 *         err = getFormat(<cudaArray_t>cd[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2425
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *         err = getFormat(<cudaArray_t>cd[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2427
 *         if err != cudaSuccess:
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getArrayBlockExtent((&__pyx_v_srcBlockExtent), __pyx_v_srcFmt);

    /* "cuda/_lib/ccudart/utils.pyx":2428
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getElementSize(&srcElementSize, <cudaArray_t>cd[0].srcArray)
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2429
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = getElementSize(&srcElementSize, <cudaArray_t>cd[0].srcArray)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2428
 *             return err
 *         err = getArrayBlockExtent(&srcBlockExtent, srcFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getElementSize(&srcElementSize, <cudaArray_t>cd[0].srcArray)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2430
 *         if err != cudaSuccess:
 *             return err
 *         err = getElementSize(&srcElementSize, <cudaArray_t>cd[0].srcArray)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getElementSize((&__pyx_v_srcElementSize), ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).srcArray));

    /* "cuda/_lib/ccudart/utils.pyx":2431
 *             return err
 *         err = getElementSize(&srcElementSize, <cudaArray_t>cd[0].srcArray)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         copyBlockExtent = srcBlockExtent
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2432
 *         err = getElementSize(&srcElementSize, <cudaArray_t>cd[0].srcArray)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         copyBlockExtent = srcBlockExtent
 * 
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2431
 *             return err
 *         err = getElementSize(&srcElementSize, <cudaArray_t>cd[0].srcArray)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         copyBlockExtent = srcBlockExtent
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2433
 *         if err != cudaSuccess:
 *             return err
 *         copyBlockExtent = srcBlockExtent             # <<<<<<<<<<<<<<
 * 
 *     if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 */
    __pyx_v_copyBlockExtent = __pyx_v_srcBlockExtent;

    /* "cuda/_lib/ccudart/utils.pyx":2423
 *     cdef cudaError_t err
 * 
 *     if (cd[0].srcMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *         err = getFormat(<cudaArray_t>cd[0].srcArray, numChannels, &srcFmt)
 *         if err != cudaSuccess:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2435
 *         copyBlockExtent = srcBlockExtent
 * 
 *     if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *         err = getFormat(<cudaArray_t>cd[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:
 */
  __pyx_t_1 = (((__pyx_v_cd[0]).dstMemoryType == __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2436
 * 
 *     if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *         err = getFormat(<cudaArray_t>cd[0].dstArray, numChannels, &dstFmt)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_5 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getFormat(((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).dstArray), __pyx_v_numChannels, (&__pyx_v_dstFmt));
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2436, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":2437
 *     if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *         err = getFormat(<cudaArray_t>cd[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2438
 *         err = getFormat(<cudaArray_t>cd[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2437
 *     if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):
 *         err = getFormat(<cudaArray_t>cd[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2439
 *         if err != cudaSuccess:
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getArrayBlockExtent((&__pyx_v_dstBlockExtent), __pyx_v_dstFmt);

    /* "cuda/_lib/ccudart/utils.pyx":2440
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getElementSize(&dstElementSize, <cudaArray_t>cd[0].dstArray)
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2441
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         err = getElementSize(&dstElementSize, <cudaArray_t>cd[0].dstArray)
 *         if err != cudaSuccess:
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2440
 *             return err
 *         err = getArrayBlockExtent(&dstBlockExtent, dstFmt)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         err = getElementSize(&dstElementSize, <cudaArray_t>cd[0].dstArray)
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2442
 *         if err != cudaSuccess:
 *             return err
 *         err = getElementSize(&dstElementSize, <cudaArray_t>cd[0].dstArray)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getElementSize((&__pyx_v_dstElementSize), ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cd[0]).dstArray));

    /* "cuda/_lib/ccudart/utils.pyx":2443
 *             return err
 *         err = getElementSize(&dstElementSize, <cudaArray_t>cd[0].dstArray)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         if cd[0].srcMemoryType != ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY:
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2444
 *         err = getElementSize(&dstElementSize, <cudaArray_t>cd[0].dstArray)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 *         if cd[0].srcMemoryType != ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY:
 *             copyBlockExtent = dstBlockExtent
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2443
 *             return err
 *         err = getElementSize(&dstElementSize, <cudaArray_t>cd[0].dstArray)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 *         if cd[0].srcMemoryType != ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY:
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2445
 *         if err != cudaSuccess:
 *             return err
 *         if cd[0].srcMemoryType != ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY:             # <<<<<<<<<<<<<<
 *             copyBlockExtent = dstBlockExtent
 * 
 */
    __pyx_t_1 = (((__pyx_v_cd[0]).srcMemoryType != __pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_ARRAY) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2446
 *             return err
 *         if cd[0].srcMemoryType != ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY:
 *             copyBlockExtent = dstBlockExtent             # <<<<<<<<<<<<<<
 * 
 *     if (srcElementSize and dstElementSize and srcElementSize != dstElementSize):
 */
      __pyx_v_copyBlockExtent = __pyx_v_dstBlockExtent;

      /* "cuda/_lib/ccudart/utils.pyx":2445
 *         if err != cudaSuccess:
 *             return err
 *         if cd[0].srcMemoryType != ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY:             # <<<<<<<<<<<<<<
 *             copyBlockExtent = dstBlockExtent
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2435
 *         copyBlockExtent = srcBlockExtent
 * 
 *     if (cd[0].dstMemoryType == ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY):             # <<<<<<<<<<<<<<
 *         err = getFormat(<cudaArray_t>cd[0].dstArray, numChannels, &dstFmt)
 *         if err != cudaSuccess:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2448
 *             copyBlockExtent = dstBlockExtent
 * 
 *     if (srcElementSize and dstElementSize and srcElementSize != dstElementSize):             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  __pyx_t_2 = (__pyx_v_srcElementSize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L36_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dstElementSize != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L36_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_srcElementSize != __pyx_v_dstElementSize) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L36_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2449
 * 
 *     if (srcElementSize and dstElementSize and srcElementSize != dstElementSize):
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     cdef size_t elementSize = sizeof(char)
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2448
 *             copyBlockExtent = dstBlockExtent
 * 
 *     if (srcElementSize and dstElementSize and srcElementSize != dstElementSize):             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2451
 *         return cudaErrorInvalidValue
 * 
 *     cdef size_t elementSize = sizeof(char)             # <<<<<<<<<<<<<<
 *     if (srcElementSize):
 *         elementSize = srcElementSize
 */
  __pyx_v_elementSize = (sizeof(char));

  /* "cuda/_lib/ccudart/utils.pyx":2452
 * 
 *     cdef size_t elementSize = sizeof(char)
 *     if (srcElementSize):             # <<<<<<<<<<<<<<
 *         elementSize = srcElementSize
 *     if (dstElementSize):
 */
  __pyx_t_1 = (__pyx_v_srcElementSize != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2453
 *     cdef size_t elementSize = sizeof(char)
 *     if (srcElementSize):
 *         elementSize = srcElementSize             # <<<<<<<<<<<<<<
 *     if (dstElementSize):
 *         elementSize = dstElementSize
 */
    __pyx_v_elementSize = __pyx_v_srcElementSize;

    /* "cuda/_lib/ccudart/utils.pyx":2452
 * 
 *     cdef size_t elementSize = sizeof(char)
 *     if (srcElementSize):             # <<<<<<<<<<<<<<
 *         elementSize = srcElementSize
 *     if (dstElementSize):
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2454
 *     if (srcElementSize):
 *         elementSize = srcElementSize
 *     if (dstElementSize):             # <<<<<<<<<<<<<<
 *         elementSize = dstElementSize
 *     srcElementSize = elementSize
 */
  __pyx_t_1 = (__pyx_v_dstElementSize != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2455
 *         elementSize = srcElementSize
 *     if (dstElementSize):
 *         elementSize = dstElementSize             # <<<<<<<<<<<<<<
 *     srcElementSize = elementSize
 *     dstElementSize = elementSize
 */
    __pyx_v_elementSize = __pyx_v_dstElementSize;

    /* "cuda/_lib/ccudart/utils.pyx":2454
 *     if (srcElementSize):
 *         elementSize = srcElementSize
 *     if (dstElementSize):             # <<<<<<<<<<<<<<
 *         elementSize = dstElementSize
 *     srcElementSize = elementSize
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2456
 *     if (dstElementSize):
 *         elementSize = dstElementSize
 *     srcElementSize = elementSize             # <<<<<<<<<<<<<<
 *     dstElementSize = elementSize
 * 
 */
  __pyx_v_srcElementSize = __pyx_v_elementSize;

  /* "cuda/_lib/ccudart/utils.pyx":2457
 *         elementSize = dstElementSize
 *     srcElementSize = elementSize
 *     dstElementSize = elementSize             # <<<<<<<<<<<<<<
 * 
 *     p[0].extent.width = <size_t>(cd[0].WidthInBytes / elementSize) * copyBlockExtent.width
 */
  __pyx_v_dstElementSize = __pyx_v_elementSize;

  /* "cuda/_lib/ccudart/utils.pyx":2459
 *     dstElementSize = elementSize
 * 
 *     p[0].extent.width = <size_t>(cd[0].WidthInBytes / elementSize) * copyBlockExtent.width             # <<<<<<<<<<<<<<
 *     p[0].extent.height = cd[0].Height * copyBlockExtent.height
 *     p[0].extent.depth = cd[0].Depth
 */
  if (unlikely(__pyx_v_elementSize == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2459, __pyx_L1_error)
  }
  (__pyx_v_p[0]).extent.width = (((size_t)(((double)(__pyx_v_cd[0]).WidthInBytes) / ((double)__pyx_v_elementSize))) * __pyx_v_copyBlockExtent.width);

  /* "cuda/_lib/ccudart/utils.pyx":2460
 * 
 *     p[0].extent.width = <size_t>(cd[0].WidthInBytes / elementSize) * copyBlockExtent.width
 *     p[0].extent.height = cd[0].Height * copyBlockExtent.height             # <<<<<<<<<<<<<<
 *     p[0].extent.depth = cd[0].Depth
 * 
 */
  (__pyx_v_p[0]).extent.height = ((__pyx_v_cd[0]).Height * __pyx_v_copyBlockExtent.height);

  /* "cuda/_lib/ccudart/utils.pyx":2461
 *     p[0].extent.width = <size_t>(cd[0].WidthInBytes / elementSize) * copyBlockExtent.width
 *     p[0].extent.height = cd[0].Height * copyBlockExtent.height
 *     p[0].extent.depth = cd[0].Depth             # <<<<<<<<<<<<<<
 * 
 *     p[0].srcPos.x = <size_t>(cd[0].srcXInBytes / elementSize) * srcBlockExtent.width
 */
  __pyx_t_3 = (__pyx_v_cd[0]).Depth;
  (__pyx_v_p[0]).extent.depth = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":2463
 *     p[0].extent.depth = cd[0].Depth
 * 
 *     p[0].srcPos.x = <size_t>(cd[0].srcXInBytes / elementSize) * srcBlockExtent.width             # <<<<<<<<<<<<<<
 *     p[0].srcPos.y = cd[0].srcY * srcBlockExtent.height
 *     p[0].srcPos.z = cd[0].srcZ
 */
  if (unlikely(__pyx_v_elementSize == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2463, __pyx_L1_error)
  }
  (__pyx_v_p[0]).srcPos.x = (((size_t)(((double)(__pyx_v_cd[0]).srcXInBytes) / ((double)__pyx_v_elementSize))) * __pyx_v_srcBlockExtent.width);

  /* "cuda/_lib/ccudart/utils.pyx":2464
 * 
 *     p[0].srcPos.x = <size_t>(cd[0].srcXInBytes / elementSize) * srcBlockExtent.width
 *     p[0].srcPos.y = cd[0].srcY * srcBlockExtent.height             # <<<<<<<<<<<<<<
 *     p[0].srcPos.z = cd[0].srcZ
 * 
 */
  (__pyx_v_p[0]).srcPos.y = ((__pyx_v_cd[0]).srcY * __pyx_v_srcBlockExtent.height);

  /* "cuda/_lib/ccudart/utils.pyx":2465
 *     p[0].srcPos.x = <size_t>(cd[0].srcXInBytes / elementSize) * srcBlockExtent.width
 *     p[0].srcPos.y = cd[0].srcY * srcBlockExtent.height
 *     p[0].srcPos.z = cd[0].srcZ             # <<<<<<<<<<<<<<
 * 
 *     p[0].dstPos.x = <size_t>(cd[0].dstXInBytes / elementSize) * dstBlockExtent.width
 */
  __pyx_t_3 = (__pyx_v_cd[0]).srcZ;
  (__pyx_v_p[0]).srcPos.z = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":2467
 *     p[0].srcPos.z = cd[0].srcZ
 * 
 *     p[0].dstPos.x = <size_t>(cd[0].dstXInBytes / elementSize) * dstBlockExtent.width             # <<<<<<<<<<<<<<
 *     p[0].dstPos.y = cd[0].dstY * dstBlockExtent.height
 *     p[0].dstPos.z = cd[0].dstZ
 */
  if (unlikely(__pyx_v_elementSize == 0)) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2467, __pyx_L1_error)
  }
  (__pyx_v_p[0]).dstPos.x = (((size_t)(((double)(__pyx_v_cd[0]).dstXInBytes) / ((double)__pyx_v_elementSize))) * __pyx_v_dstBlockExtent.width);

  /* "cuda/_lib/ccudart/utils.pyx":2468
 * 
 *     p[0].dstPos.x = <size_t>(cd[0].dstXInBytes / elementSize) * dstBlockExtent.width
 *     p[0].dstPos.y = cd[0].dstY * dstBlockExtent.height             # <<<<<<<<<<<<<<
 *     p[0].dstPos.z = cd[0].dstZ
 *     return cudaSuccess
 */
  (__pyx_v_p[0]).dstPos.y = ((__pyx_v_cd[0]).dstY * __pyx_v_dstBlockExtent.height);

  /* "cuda/_lib/ccudart/utils.pyx":2469
 *     p[0].dstPos.x = <size_t>(cd[0].dstXInBytes / elementSize) * dstBlockExtent.width
 *     p[0].dstPos.y = cd[0].dstY * dstBlockExtent.height
 *     p[0].dstPos.z = cd[0].dstZ             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
  __pyx_t_3 = (__pyx_v_cd[0]).dstZ;
  (__pyx_v_p[0]).dstPos.z = __pyx_t_3;

  /* "cuda/_lib/ccudart/utils.pyx":2470
 *     p[0].dstPos.y = cd[0].dstY * dstBlockExtent.height
 *     p[0].dstPos.z = cd[0].dstZ
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2319
 * 
 * 
 * cdef cudaError_t toCudartMemCopy3DParams(const ccuda.CUDA_MEMCPY3D_v2 *cd, cudaMemcpy3DParms *p) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef cudaExtent srcBlockExtent
 *     cdef cudaExtent dstBlockExtent
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.toCudartMemCopy3DParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2473
 * 
 * 
 * cdef cudaError_t memcpy2DFromArray(char *dst, size_t dpitch, cudaArray_const_t src, size_t hOffset,             # <<<<<<<<<<<<<<
 *         size_t wOffset, size_t width, size_t height, cudaMemcpyKind kind,
 *         cudaStream_t sid, bool async) nogil except+:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DFromArray(char *__pyx_v_dst, size_t __pyx_v_dpitch, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_src, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, size_t __pyx_v_width, size_t __pyx_v_height, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpy2DFromArray", __pyx_f[1], 2473, 1, __PYX_ERR(1, 2473, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2477
 *         cudaStream_t sid, bool async) nogil except+:
 *     cdef cudaError_t err
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:
 */
  __pyx_t_2 = ((__pyx_v_width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_height == 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2478
 *     cdef cudaError_t err
 *     if width == 0 or height == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     if height > 1 and width > dpitch:
 *         return cudaErrorInvalidPitchValue
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2477
 *         cudaStream_t sid, bool async) nogil except+:
 *     cdef cudaError_t err
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2479
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidPitchValue
 * 
 */
  __pyx_t_2 = ((__pyx_v_height > 1) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_width > __pyx_v_dpitch) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2480
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:
 *         return cudaErrorInvalidPitchValue             # <<<<<<<<<<<<<<
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidPitchValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2479
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 *     if height > 1 and width > dpitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidPitchValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2482
 *         return cudaErrorInvalidPitchValue
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         err = copyToHost2D(src, hOffset, wOffset, dst, dpitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
  switch (__pyx_v_kind) {
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2483
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         err = copyToHost2D(src, hOffset, wOffset, dst, dpitch, width, height, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToHost2D(__pyx_v_src, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_dst, __pyx_v_dpitch, __pyx_v_width, __pyx_v_height, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2483, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2482
 *         return cudaErrorInvalidPitchValue
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         err = copyToHost2D(src, hOffset, wOffset, dst, dpitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2485
 *         err = copyToHost2D(src, hOffset, wOffset, dst, dpitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice2D(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE, __pyx_v_src, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_dst, 0, __pyx_v_dpitch, __pyx_v_width, __pyx_v_height, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2485, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2484
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         err = copyToHost2D(src, hOffset, wOffset, dst, dpitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDefault:

    /* "cuda/_lib/ccudart/utils.pyx":2487
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidMemcpyDirection
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice2D(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED, __pyx_v_src, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_dst, 0, __pyx_v_dpitch, __pyx_v_width, __pyx_v_height, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2487, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2486
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)
 *     else:
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":2489
 *         err = copyToDevice2D(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, dpitch, width, height, sid, async)
 *     else:
 *         return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2490
 *     else:
 *         return cudaErrorInvalidMemcpyDirection
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_err;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2473
 * 
 * 
 * cdef cudaError_t memcpy2DFromArray(char *dst, size_t dpitch, cudaArray_const_t src, size_t hOffset,             # <<<<<<<<<<<<<<
 *         size_t wOffset, size_t width, size_t height, cudaMemcpyKind kind,
 *         cudaStream_t sid, bool async) nogil except+:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpy2DFromArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2493
 * 
 * 
 * cdef cudaError_t memcpy2DArrayToArray(cudaArray_t dst, size_t hOffsetDst, size_t wOffsetDst,             # <<<<<<<<<<<<<<
 *                                       cudaArray_const_t src, size_t hOffsetSrc, size_t wOffsetSrc,
 *                                       size_t width, size_t height, cudaMemcpyKind kind) nogil except+:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DArrayToArray(__pyx_t_4cuda_7ccudart_cudaArray_t __pyx_v_dst, size_t __pyx_v_hOffsetDst, size_t __pyx_v_wOffsetDst, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_src, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_wOffsetSrc, size_t __pyx_v_width, size_t __pyx_v_height, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpy2DArrayToArray", __pyx_f[1], 2493, 1, __PYX_ERR(1, 2493, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2496
 *                                       cudaArray_const_t src, size_t hOffsetSrc, size_t wOffsetSrc,
 *                                       size_t width, size_t height, cudaMemcpyKind kind) nogil except+:
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if kind != cudaMemcpyKind.cudaMemcpyDeviceToDevice and kind != cudaMemcpyKind.cudaMemcpyDefault:
 */
  __pyx_t_2 = ((__pyx_v_width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_height == 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2497
 *                                       size_t width, size_t height, cudaMemcpyKind kind) nogil except+:
 *     if width == 0 or height == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 *     if kind != cudaMemcpyKind.cudaMemcpyDeviceToDevice and kind != cudaMemcpyKind.cudaMemcpyDefault:
 *         return cudaErrorInvalidMemcpyDirection
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2496
 *                                       cudaArray_const_t src, size_t hOffsetSrc, size_t wOffsetSrc,
 *                                       size_t width, size_t height, cudaMemcpyKind kind) nogil except+:
 *     if width == 0 or height == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 *     if kind != cudaMemcpyKind.cudaMemcpyDeviceToDevice and kind != cudaMemcpyKind.cudaMemcpyDefault:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2498
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 *     if kind != cudaMemcpyKind.cudaMemcpyDeviceToDevice and kind != cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidMemcpyDirection
 *     return copyToArray2D(src, hOffsetSrc, wOffsetSrc, dst, hOffsetDst, wOffsetDst, width, height)
 */
  switch (__pyx_v_kind) {
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice:
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDefault:
    __pyx_t_1 = 0;
    break;
    default:
    __pyx_t_1 = 1;
    break;
  }
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2499
 *         return cudaSuccess
 *     if kind != cudaMemcpyKind.cudaMemcpyDeviceToDevice and kind != cudaMemcpyKind.cudaMemcpyDefault:
 *         return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 *     return copyToArray2D(src, hOffsetSrc, wOffsetSrc, dst, hOffsetDst, wOffsetDst, width, height)
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2498
 *     if width == 0 or height == 0:
 *         return cudaSuccess
 *     if kind != cudaMemcpyKind.cudaMemcpyDeviceToDevice and kind != cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidMemcpyDirection
 *     return copyToArray2D(src, hOffsetSrc, wOffsetSrc, dst, hOffsetDst, wOffsetDst, width, height)
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2500
 *     if kind != cudaMemcpyKind.cudaMemcpyDeviceToDevice and kind != cudaMemcpyKind.cudaMemcpyDefault:
 *         return cudaErrorInvalidMemcpyDirection
 *     return copyToArray2D(src, hOffsetSrc, wOffsetSrc, dst, hOffsetDst, wOffsetDst, width, height)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  try {
    __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToArray2D(__pyx_v_src, __pyx_v_hOffsetSrc, __pyx_v_wOffsetSrc, __pyx_v_dst, __pyx_v_hOffsetDst, __pyx_v_wOffsetDst, __pyx_v_width, __pyx_v_height);
  } catch(...) {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_CppExn2PyErr();
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
    __PYX_ERR(1, 2500, __pyx_L1_error)
  }
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2493
 * 
 * 
 * cdef cudaError_t memcpy2DArrayToArray(cudaArray_t dst, size_t hOffsetDst, size_t wOffsetDst,             # <<<<<<<<<<<<<<
 *                                       cudaArray_const_t src, size_t hOffsetSrc, size_t wOffsetSrc,
 *                                       size_t width, size_t height, cudaMemcpyKind kind) nogil except+:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpy2DArrayToArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2503
 * 
 * 
 * cdef cudaError_t memset3DPtr(cudaPitchedPtr p, int val, cudaExtent e, cudaStream_t sid, bool async) nogil except+:             # <<<<<<<<<<<<<<
 *     if e.width == 0 or e.height == 0 or e.depth == 0:
 *         return cudaSuccess
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memset3DPtr(struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr __pyx_v_p, int __pyx_v_val, struct __pyx_t_4cuda_7ccudart_cudaExtent __pyx_v_e, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  char *__pyx_v_ptr;
  size_t __pyx_v_d;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memset3DPtr", __pyx_f[1], 2503, 1, __PYX_ERR(1, 2503, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2504
 * 
 * cdef cudaError_t memset3DPtr(cudaPitchedPtr p, int val, cudaExtent e, cudaStream_t sid, bool async) nogil except+:
 *     if e.width == 0 or e.height == 0 or e.depth == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  __pyx_t_2 = ((__pyx_v_e.width == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_e.height == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_e.depth == 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2505
 * cdef cudaError_t memset3DPtr(cudaPitchedPtr p, int val, cudaExtent e, cudaStream_t sid, bool async) nogil except+:
 *     if e.width == 0 or e.height == 0 or e.depth == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 *     if (e.height > 1 or e.depth > 1) and e.width > p.pitch:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2504
 * 
 * cdef cudaError_t memset3DPtr(cudaPitchedPtr p, int val, cudaExtent e, cudaStream_t sid, bool async) nogil except+:
 *     if e.width == 0 or e.height == 0 or e.depth == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2507
 *         return cudaSuccess
 * 
 *     if (e.height > 1 or e.depth > 1) and e.width > p.pitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  __pyx_t_2 = ((__pyx_v_e.height > 1) != 0);
  if (!__pyx_t_2) {
  } else {
    goto __pyx_L9_next_and;
  }
  __pyx_t_2 = ((__pyx_v_e.depth > 1) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_L9_next_and:;
  __pyx_t_2 = ((__pyx_v_e.width > __pyx_v_p.pitch) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2508
 * 
 *     if (e.height > 1 or e.depth > 1) and e.width > p.pitch:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     if e.depth > 0 and e.height > p.ysize:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2507
 *         return cudaSuccess
 * 
 *     if (e.height > 1 or e.depth > 1) and e.width > p.pitch:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2510
 *         return cudaErrorInvalidValue
 * 
 *     if e.depth > 0 and e.height > p.ysize:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  __pyx_t_2 = ((__pyx_v_e.depth > 0) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_e.height > __pyx_v_p.ysize) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2511
 * 
 *     if e.depth > 0 and e.height > p.ysize:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 *     cdef char *ptr = <char*>p.ptr
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2510
 *         return cudaErrorInvalidValue
 * 
 *     if e.depth > 0 and e.height > p.ysize:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2513
 *         return cudaErrorInvalidValue
 * 
 *     cdef char *ptr = <char*>p.ptr             # <<<<<<<<<<<<<<
 *     cdef size_t d
 *     cdef cudaError_t err
 */
  __pyx_v_ptr = ((char *)__pyx_v_p.ptr);

  /* "cuda/_lib/ccudart/utils.pyx":2517
 *     cdef cudaError_t err
 * 
 *     if e.width >= p.xsize and e.height == p.ysize and e.width == p.pitch:             # <<<<<<<<<<<<<<
 *         return memsetPtr(ptr, val, e.width * e.height * e.depth, sid, async)
 *     elif e.height == p.ysize:
 */
  __pyx_t_2 = ((__pyx_v_e.width >= __pyx_v_p.xsize) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_e.height == __pyx_v_p.ysize) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_e.width == __pyx_v_p.pitch) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2518
 * 
 *     if e.width >= p.xsize and e.height == p.ysize and e.width == p.pitch:
 *         return memsetPtr(ptr, val, e.width * e.height * e.depth, sid, async)             # <<<<<<<<<<<<<<
 *     elif e.height == p.ysize:
 *         return memset2DPtr(ptr, p.pitch, val, e.width, e.height * e.depth, sid, async)
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memsetPtr(__pyx_v_ptr, __pyx_v_val, ((__pyx_v_e.width * __pyx_v_e.height) * __pyx_v_e.depth), __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2518, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2517
 *     cdef cudaError_t err
 * 
 *     if e.width >= p.xsize and e.height == p.ysize and e.width == p.pitch:             # <<<<<<<<<<<<<<
 *         return memsetPtr(ptr, val, e.width * e.height * e.depth, sid, async)
 *     elif e.height == p.ysize:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2519
 *     if e.width >= p.xsize and e.height == p.ysize and e.width == p.pitch:
 *         return memsetPtr(ptr, val, e.width * e.height * e.depth, sid, async)
 *     elif e.height == p.ysize:             # <<<<<<<<<<<<<<
 *         return memset2DPtr(ptr, p.pitch, val, e.width, e.height * e.depth, sid, async)
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_e.height == __pyx_v_p.ysize) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2520
 *         return memsetPtr(ptr, val, e.width * e.height * e.depth, sid, async)
 *     elif e.height == p.ysize:
 *         return memset2DPtr(ptr, p.pitch, val, e.width, e.height * e.depth, sid, async)             # <<<<<<<<<<<<<<
 *     else:
 *         d = 0
 */
    try {
      __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memset2DPtr(__pyx_v_ptr, __pyx_v_p.pitch, __pyx_v_val, __pyx_v_e.width, (__pyx_v_e.height * __pyx_v_e.depth), __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2520, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2519
 *     if e.width >= p.xsize and e.height == p.ysize and e.width == p.pitch:
 *         return memsetPtr(ptr, val, e.width * e.height * e.depth, sid, async)
 *     elif e.height == p.ysize:             # <<<<<<<<<<<<<<
 *         return memset2DPtr(ptr, p.pitch, val, e.width, e.height * e.depth, sid, async)
 *     else:
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2522
 *         return memset2DPtr(ptr, p.pitch, val, e.width, e.height * e.depth, sid, async)
 *     else:
 *         d = 0             # <<<<<<<<<<<<<<
 *         while (d != e.depth):
 *             err = memset2DPtr(ptr, p.pitch, val, e.width, e.height, sid, async)
 */
  /*else*/ {
    __pyx_v_d = 0;

    /* "cuda/_lib/ccudart/utils.pyx":2523
 *     else:
 *         d = 0
 *         while (d != e.depth):             # <<<<<<<<<<<<<<
 *             err = memset2DPtr(ptr, p.pitch, val, e.width, e.height, sid, async)
 *             if err != cudaSuccess:
 */
    while (1) {
      __pyx_t_1 = ((__pyx_v_d != __pyx_v_e.depth) != 0);
      if (!__pyx_t_1) break;

      /* "cuda/_lib/ccudart/utils.pyx":2524
 *         d = 0
 *         while (d != e.depth):
 *             err = memset2DPtr(ptr, p.pitch, val, e.width, e.height, sid, async)             # <<<<<<<<<<<<<<
 *             if err != cudaSuccess:
 *                 return err
 */
      try {
        __pyx_t_3 = __pyx_f_4cuda_4_lib_7ccudart_5utils_memset2DPtr(__pyx_v_ptr, __pyx_v_p.pitch, __pyx_v_val, __pyx_v_e.width, __pyx_v_e.height, __pyx_v_sid, __pyx_v_async);
      } catch(...) {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        __Pyx_CppExn2PyErr();
        #ifdef WITH_THREAD
        __Pyx_PyGILState_Release(__pyx_gilstate_save);
        #endif
        __PYX_ERR(1, 2524, __pyx_L1_error)
      }
      __pyx_v_err = __pyx_t_3;

      /* "cuda/_lib/ccudart/utils.pyx":2525
 *         while (d != e.depth):
 *             err = memset2DPtr(ptr, p.pitch, val, e.width, e.height, sid, async)
 *             if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *                 return err
 *             ptr += p.pitch * p.ysize
 */
      __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
      if (__pyx_t_1) {

        /* "cuda/_lib/ccudart/utils.pyx":2526
 *             err = memset2DPtr(ptr, p.pitch, val, e.width, e.height, sid, async)
 *             if err != cudaSuccess:
 *                 return err             # <<<<<<<<<<<<<<
 *             ptr += p.pitch * p.ysize
 *             d += 1
 */
        __pyx_r = __pyx_v_err;
        goto __pyx_L0;

        /* "cuda/_lib/ccudart/utils.pyx":2525
 *         while (d != e.depth):
 *             err = memset2DPtr(ptr, p.pitch, val, e.width, e.height, sid, async)
 *             if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *                 return err
 *             ptr += p.pitch * p.ysize
 */
      }

      /* "cuda/_lib/ccudart/utils.pyx":2527
 *             if err != cudaSuccess:
 *                 return err
 *             ptr += p.pitch * p.ysize             # <<<<<<<<<<<<<<
 *             d += 1
 *     return cudaSuccess
 */
      __pyx_v_ptr = (__pyx_v_ptr + (__pyx_v_p.pitch * __pyx_v_p.ysize));

      /* "cuda/_lib/ccudart/utils.pyx":2528
 *                 return err
 *             ptr += p.pitch * p.ysize
 *             d += 1             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
      __pyx_v_d = (__pyx_v_d + 1);
    }
  }

  /* "cuda/_lib/ccudart/utils.pyx":2529
 *             ptr += p.pitch * p.ysize
 *             d += 1
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2503
 * 
 * 
 * cdef cudaError_t memset3DPtr(cudaPitchedPtr p, int val, cudaExtent e, cudaStream_t sid, bool async) nogil except+:             # <<<<<<<<<<<<<<
 *     if e.width == 0 or e.height == 0 or e.depth == 0:
 *         return cudaSuccess
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memset3DPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2532
 * 
 * 
 * cdef cudaError_t memcpyToArray(cudaArray_t dst, size_t hOffset, size_t wOffset, const char *src,             # <<<<<<<<<<<<<<
 *                                size_t count, cudaMemcpyKind kind,
 *                                cudaStream_t sid, bool async) nogil except+:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyToArray(__pyx_t_4cuda_7ccudart_cudaArray_t __pyx_v_dst, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, char const *__pyx_v_src, size_t __pyx_v_count, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpyToArray", __pyx_f[1], 2532, 1, __PYX_ERR(1, 2532, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2535
 *                                size_t count, cudaMemcpyKind kind,
 *                                cudaStream_t sid, bool async) nogil except+:
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  __pyx_t_1 = ((__pyx_v_count == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2536
 *                                cudaStream_t sid, bool async) nogil except+:
 *     if count == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2535
 *                                size_t count, cudaMemcpyKind kind,
 *                                cudaStream_t sid, bool async) nogil except+:
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2538
 *         return cudaSuccess
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *         return copyFromHost(dst, hOffset, wOffset, src, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
  switch (__pyx_v_kind) {
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2539
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         return copyFromHost(dst, hOffset, wOffset, src, count, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, count, sid, async)
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromHost(__pyx_v_dst, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_src, __pyx_v_count, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2539, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2538
 *         return cudaSuccess
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:             # <<<<<<<<<<<<<<
 *         return copyFromHost(dst, hOffset, wOffset, src, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2541
 *         return copyFromHost(dst, hOffset, wOffset, src, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, count, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, count, sid, async)
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE, __pyx_v_dst, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_src, 0, __pyx_v_count, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2541, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2540
 *     if kind == cudaMemcpyKind.cudaMemcpyHostToDevice:
 *         return copyFromHost(dst, hOffset, wOffset, src, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDefault:

    /* "cuda/_lib/ccudart/utils.pyx":2543
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, count, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost or kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return cudaErrorInvalidMemcpyDirection
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED, __pyx_v_dst, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_src, 0, __pyx_v_count, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2543, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2542
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, dst, hOffset, wOffset, src, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost or kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2544
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost or kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidMemcpyDirection
 *     return cudaSuccess
 */
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2545
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost or kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2544
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return copyFromDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, dst, hOffset, wOffset, src, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost or kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidMemcpyDirection
 *     return cudaSuccess
 */
    break;
    default: break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2546
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToHost or kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return cudaErrorInvalidMemcpyDirection
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2532
 * 
 * 
 * cdef cudaError_t memcpyToArray(cudaArray_t dst, size_t hOffset, size_t wOffset, const char *src,             # <<<<<<<<<<<<<<
 *                                size_t count, cudaMemcpyKind kind,
 *                                cudaStream_t sid, bool async) nogil except+:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpyToArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2549
 * 
 * 
 * cdef cudaError_t memcpyFromArray(char *dst, cudaArray_const_t src, size_t hOffset, size_t wOffset,             # <<<<<<<<<<<<<<
 *                                  size_t count, cudaMemcpyKind kind,
 *                                  cudaStream_t sid, bool async) nogil except+:
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyFromArray(char *__pyx_v_dst, __pyx_t_4cuda_7ccudart_cudaArray_const_t __pyx_v_src, size_t __pyx_v_hOffset, size_t __pyx_v_wOffset, size_t __pyx_v_count, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind __pyx_v_kind, __pyx_t_4cuda_7ccudart_cudaStream_t __pyx_v_sid, bool __pyx_v_async) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("memcpyFromArray", __pyx_f[1], 2549, 1, __PYX_ERR(1, 2549, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2552
 *                                  size_t count, cudaMemcpyKind kind,
 *                                  cudaStream_t sid, bool async) nogil except+:
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  __pyx_t_1 = ((__pyx_v_count == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2553
 *                                  cudaStream_t sid, bool async) nogil except+:
 *     if count == 0:
 *         return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2552
 *                                  size_t count, cudaMemcpyKind kind,
 *                                  cudaStream_t sid, bool async) nogil except+:
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         return cudaSuccess
 * 
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2555
 *         return cudaSuccess
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         return copyToHost(src, hOffset, wOffset, dst, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
  switch (__pyx_v_kind) {
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2556
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return copyToHost(src, hOffset, wOffset, dst, count, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, count, sid, async)
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToHost(__pyx_v_src, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_dst, __pyx_v_count, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2556, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2555
 *         return cudaSuccess
 * 
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:             # <<<<<<<<<<<<<<
 *         return copyToHost(src, hOffset, wOffset, dst, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDeviceToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2558
 *         return copyToHost(src, hOffset, wOffset, dst, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, count, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, count, sid, async)
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_DEVICE, __pyx_v_src, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_dst, 0, __pyx_v_count, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2558, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2557
 *     if kind == cudaMemcpyKind.cudaMemcpyDeviceToHost:
 *         return copyToHost(src, hOffset, wOffset, dst, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:             # <<<<<<<<<<<<<<
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyDefault:

    /* "cuda/_lib/ccudart/utils.pyx":2560
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, count, sid, async)             # <<<<<<<<<<<<<<
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice or kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return cudaErrorInvalidMemcpyDirection
 */
    try {
      __pyx_t_2 = __pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice(__pyx_e_4cuda_5ccuda_CU_MEMORYTYPE_UNIFIED, __pyx_v_src, __pyx_v_hOffset, __pyx_v_wOffset, __pyx_v_dst, 0, __pyx_v_count, __pyx_v_sid, __pyx_v_async);
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2560, __pyx_L1_error)
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2559
 *     elif kind == cudaMemcpyKind.cudaMemcpyDeviceToDevice:
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, src, hOffset, wOffset, dst, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:             # <<<<<<<<<<<<<<
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice or kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToDevice:

    /* "cuda/_lib/ccudart/utils.pyx":2561
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice or kind == cudaMemcpyKind.cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidMemcpyDirection
 *     return cudaSuccess
 */
    case __pyx_e_4cuda_7ccudart_cudaMemcpyHostToHost:

    /* "cuda/_lib/ccudart/utils.pyx":2562
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice or kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return cudaErrorInvalidMemcpyDirection             # <<<<<<<<<<<<<<
 *     return cudaSuccess
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidMemcpyDirection;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2561
 *     elif kind == cudaMemcpyKind.cudaMemcpyDefault:
 *         return copyToDevice(ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, src, hOffset, wOffset, dst, 0, count, sid, async)
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice or kind == cudaMemcpyKind.cudaMemcpyHostToHost:             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidMemcpyDirection
 *     return cudaSuccess
 */
    break;
    default: break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2563
 *     elif kind == cudaMemcpyKind.cudaMemcpyHostToDevice or kind == cudaMemcpyKind.cudaMemcpyHostToHost:
 *         return cudaErrorInvalidMemcpyDirection
 *     return cudaSuccess             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t toDriverCudaResourceDesc(ccuda.CUDA_RESOURCE_DESC *_driver_pResDesc, const cudaResourceDesc *pResDesc) nogil except+:
 */
  __pyx_r = __pyx_e_4cuda_7ccudart_cudaSuccess;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2549
 * 
 * 
 * cdef cudaError_t memcpyFromArray(char *dst, cudaArray_const_t src, size_t hOffset, size_t wOffset,             # <<<<<<<<<<<<<<
 *                                  size_t count, cudaMemcpyKind kind,
 *                                  cudaStream_t sid, bool async) nogil except+:
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.memcpyFromArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2565
 *     return cudaSuccess
 * 
 * cdef cudaError_t toDriverCudaResourceDesc(ccuda.CUDA_RESOURCE_DESC *_driver_pResDesc, const cudaResourceDesc *pResDesc) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err = cudaSuccess
 *     cdef int numChannels
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_toDriverCudaResourceDesc(__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *__pyx_v__driver_pResDesc, struct __pyx_t_4cuda_7ccudart_cudaResourceDesc const *__pyx_v_pResDesc) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  int __pyx_v_numChannels;
  __pyx_t_4cuda_5ccuda_CUarray_format __pyx_v_format;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("toDriverCudaResourceDesc", __pyx_f[1], 2565, 1, __PYX_ERR(1, 2565, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2566
 * 
 * cdef cudaError_t toDriverCudaResourceDesc(ccuda.CUDA_RESOURCE_DESC *_driver_pResDesc, const cudaResourceDesc *pResDesc) nogil except+:
 *     cdef cudaError_t err = cudaSuccess             # <<<<<<<<<<<<<<
 *     cdef int numChannels
 *     cdef ccuda.CUarray_format format
 */
  __pyx_v_err = __pyx_e_4cuda_7ccudart_cudaSuccess;

  /* "cuda/_lib/ccudart/utils.pyx":2570
 *     cdef ccuda.CUarray_format format
 * 
 *     if pResDesc[0].resType == cudaResourceType.cudaResourceTypeArray:             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         _driver_pResDesc[0].res.array.hArray = <ccuda.CUarray>pResDesc[0].res.array.array
 */
  __pyx_t_1 = (((__pyx_v_pResDesc[0]).resType == __pyx_e_4cuda_7ccudart_cudaResourceTypeArray) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2571
 * 
 *     if pResDesc[0].resType == cudaResourceType.cudaResourceTypeArray:
 *         _driver_pResDesc[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.array.hArray = <ccuda.CUarray>pResDesc[0].res.array.array
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 */
    (__pyx_v__driver_pResDesc[0]).resType = __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_ARRAY;

    /* "cuda/_lib/ccudart/utils.pyx":2572
 *     if pResDesc[0].resType == cudaResourceType.cudaResourceTypeArray:
 *         _driver_pResDesc[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         _driver_pResDesc[0].res.array.hArray = <ccuda.CUarray>pResDesc[0].res.array.array             # <<<<<<<<<<<<<<
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 *         _driver_pResDesc[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 */
    (__pyx_v__driver_pResDesc[0]).res.array.hArray = ((__pyx_t_4cuda_5ccuda_CUarray)(__pyx_v_pResDesc[0]).res.array.array);

    /* "cuda/_lib/ccudart/utils.pyx":2570
 *     cdef ccuda.CUarray_format format
 * 
 *     if pResDesc[0].resType == cudaResourceType.cudaResourceTypeArray:             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         _driver_pResDesc[0].res.array.hArray = <ccuda.CUarray>pResDesc[0].res.array.array
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2573
 *         _driver_pResDesc[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         _driver_pResDesc[0].res.array.hArray = <ccuda.CUarray>pResDesc[0].res.array.array
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         _driver_pResDesc[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>pResDesc[0].res.mipmap.mipmap
 */
  __pyx_t_1 = (((__pyx_v_pResDesc[0]).resType == __pyx_e_4cuda_7ccudart_cudaResourceTypeMipmappedArray) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2574
 *         _driver_pResDesc[0].res.array.hArray = <ccuda.CUarray>pResDesc[0].res.array.array
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 *         _driver_pResDesc[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>pResDesc[0].res.mipmap.mipmap
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 */
    (__pyx_v__driver_pResDesc[0]).resType = __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY;

    /* "cuda/_lib/ccudart/utils.pyx":2575
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:
 *         _driver_pResDesc[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         _driver_pResDesc[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>pResDesc[0].res.mipmap.mipmap             # <<<<<<<<<<<<<<
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 *         _driver_pResDesc[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 */
    (__pyx_v__driver_pResDesc[0]).res.mipmap.hMipmappedArray = ((__pyx_t_4cuda_5ccuda_CUmipmappedArray)(__pyx_v_pResDesc[0]).res.mipmap.mipmap);

    /* "cuda/_lib/ccudart/utils.pyx":2573
 *         _driver_pResDesc[0].resType          = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY
 *         _driver_pResDesc[0].res.array.hArray = <ccuda.CUarray>pResDesc[0].res.array.array
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeMipmappedArray:             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         _driver_pResDesc[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>pResDesc[0].res.mipmap.mipmap
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2576
 *         _driver_pResDesc[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         _driver_pResDesc[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>pResDesc[0].res.mipmap.mipmap
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeLinear:             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 *         _driver_pResDesc[0].res.linear.devPtr      = <ccuda.CUdeviceptr>pResDesc[0].res.linear.devPtr
 */
  __pyx_t_1 = (((__pyx_v_pResDesc[0]).resType == __pyx_e_4cuda_7ccudart_cudaResourceTypeLinear) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2577
 *         _driver_pResDesc[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>pResDesc[0].res.mipmap.mipmap
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 *         _driver_pResDesc[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.linear.devPtr      = <ccuda.CUdeviceptr>pResDesc[0].res.linear.devPtr
 *         _driver_pResDesc[0].res.linear.sizeInBytes = pResDesc[0].res.linear.sizeInBytes
 */
    (__pyx_v__driver_pResDesc[0]).resType = __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_LINEAR;

    /* "cuda/_lib/ccudart/utils.pyx":2578
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeLinear:
 *         _driver_pResDesc[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 *         _driver_pResDesc[0].res.linear.devPtr      = <ccuda.CUdeviceptr>pResDesc[0].res.linear.devPtr             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.linear.sizeInBytes = pResDesc[0].res.linear.sizeInBytes
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 */
    (__pyx_v__driver_pResDesc[0]).res.linear.devPtr = ((__pyx_t_4cuda_5ccuda_CUdeviceptr)(__pyx_v_pResDesc[0]).res.linear.devPtr);

    /* "cuda/_lib/ccudart/utils.pyx":2579
 *         _driver_pResDesc[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 *         _driver_pResDesc[0].res.linear.devPtr      = <ccuda.CUdeviceptr>pResDesc[0].res.linear.devPtr
 *         _driver_pResDesc[0].res.linear.sizeInBytes = pResDesc[0].res.linear.sizeInBytes             # <<<<<<<<<<<<<<
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 *         if err != cudaSuccess:
 */
    __pyx_t_2 = (__pyx_v_pResDesc[0]).res.linear.sizeInBytes;
    (__pyx_v__driver_pResDesc[0]).res.linear.sizeInBytes = __pyx_t_2;

    /* "cuda/_lib/ccudart/utils.pyx":2580
 *         _driver_pResDesc[0].res.linear.devPtr      = <ccuda.CUdeviceptr>pResDesc[0].res.linear.devPtr
 *         _driver_pResDesc[0].res.linear.sizeInBytes = pResDesc[0].res.linear.sizeInBytes
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             _setLastError(err)
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo((&(__pyx_v_pResDesc[0]).res.linear.desc), (&__pyx_v_numChannels), (&__pyx_v_format));

    /* "cuda/_lib/ccudart/utils.pyx":2581
 *         _driver_pResDesc[0].res.linear.sizeInBytes = pResDesc[0].res.linear.sizeInBytes
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             _setLastError(err)
 *             return err
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2582
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 *         if err != cudaSuccess:
 *             _setLastError(err)             # <<<<<<<<<<<<<<
 *             return err
 *         _driver_pResDesc[0].res.linear.format      = format
 */
      (void)(__pyx_f_4cuda_4_lib_7ccudart_5utils__setLastError(__pyx_v_err));

      /* "cuda/_lib/ccudart/utils.pyx":2583
 *         if err != cudaSuccess:
 *             _setLastError(err)
 *             return err             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.linear.format      = format
 *         _driver_pResDesc[0].res.linear.numChannels = numChannels
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2581
 *         _driver_pResDesc[0].res.linear.sizeInBytes = pResDesc[0].res.linear.sizeInBytes
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             _setLastError(err)
 *             return err
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2584
 *             _setLastError(err)
 *             return err
 *         _driver_pResDesc[0].res.linear.format      = format             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.linear.numChannels = numChannels
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypePitch2D:
 */
    (__pyx_v__driver_pResDesc[0]).res.linear.format = __pyx_v_format;

    /* "cuda/_lib/ccudart/utils.pyx":2585
 *             return err
 *         _driver_pResDesc[0].res.linear.format      = format
 *         _driver_pResDesc[0].res.linear.numChannels = numChannels             # <<<<<<<<<<<<<<
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypePitch2D:
 *         _driver_pResDesc[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 */
    (__pyx_v__driver_pResDesc[0]).res.linear.numChannels = __pyx_v_numChannels;

    /* "cuda/_lib/ccudart/utils.pyx":2576
 *         _driver_pResDesc[0].resType                    = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY
 *         _driver_pResDesc[0].res.mipmap.hMipmappedArray = <ccuda.CUmipmappedArray>pResDesc[0].res.mipmap.mipmap
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypeLinear:             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].resType                = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR
 *         _driver_pResDesc[0].res.linear.devPtr      = <ccuda.CUdeviceptr>pResDesc[0].res.linear.devPtr
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2586
 *         _driver_pResDesc[0].res.linear.format      = format
 *         _driver_pResDesc[0].res.linear.numChannels = numChannels
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypePitch2D:             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 *         _driver_pResDesc[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr>pResDesc[0].res.pitch2D.devPtr
 */
  __pyx_t_1 = (((__pyx_v_pResDesc[0]).resType == __pyx_e_4cuda_7ccudart_cudaResourceTypePitch2D) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2587
 *         _driver_pResDesc[0].res.linear.numChannels = numChannels
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypePitch2D:
 *         _driver_pResDesc[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr>pResDesc[0].res.pitch2D.devPtr
 *         _driver_pResDesc[0].res.pitch2D.pitchInBytes = pResDesc[0].res.pitch2D.pitchInBytes
 */
    (__pyx_v__driver_pResDesc[0]).resType = __pyx_e_4cuda_5ccuda_CU_RESOURCE_TYPE_PITCH2D;

    /* "cuda/_lib/ccudart/utils.pyx":2588
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypePitch2D:
 *         _driver_pResDesc[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 *         _driver_pResDesc[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr>pResDesc[0].res.pitch2D.devPtr             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.pitch2D.pitchInBytes = pResDesc[0].res.pitch2D.pitchInBytes
 *         _driver_pResDesc[0].res.pitch2D.width        = pResDesc[0].res.pitch2D.width
 */
    (__pyx_v__driver_pResDesc[0]).res.pitch2D.devPtr = ((__pyx_t_4cuda_5ccuda_CUdeviceptr)(__pyx_v_pResDesc[0]).res.pitch2D.devPtr);

    /* "cuda/_lib/ccudart/utils.pyx":2589
 *         _driver_pResDesc[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 *         _driver_pResDesc[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr>pResDesc[0].res.pitch2D.devPtr
 *         _driver_pResDesc[0].res.pitch2D.pitchInBytes = pResDesc[0].res.pitch2D.pitchInBytes             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.pitch2D.width        = pResDesc[0].res.pitch2D.width
 *         _driver_pResDesc[0].res.pitch2D.height       = pResDesc[0].res.pitch2D.height
 */
    __pyx_t_2 = (__pyx_v_pResDesc[0]).res.pitch2D.pitchInBytes;
    (__pyx_v__driver_pResDesc[0]).res.pitch2D.pitchInBytes = __pyx_t_2;

    /* "cuda/_lib/ccudart/utils.pyx":2590
 *         _driver_pResDesc[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr>pResDesc[0].res.pitch2D.devPtr
 *         _driver_pResDesc[0].res.pitch2D.pitchInBytes = pResDesc[0].res.pitch2D.pitchInBytes
 *         _driver_pResDesc[0].res.pitch2D.width        = pResDesc[0].res.pitch2D.width             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.pitch2D.height       = pResDesc[0].res.pitch2D.height
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 */
    __pyx_t_2 = (__pyx_v_pResDesc[0]).res.pitch2D.width;
    (__pyx_v__driver_pResDesc[0]).res.pitch2D.width = __pyx_t_2;

    /* "cuda/_lib/ccudart/utils.pyx":2591
 *         _driver_pResDesc[0].res.pitch2D.pitchInBytes = pResDesc[0].res.pitch2D.pitchInBytes
 *         _driver_pResDesc[0].res.pitch2D.width        = pResDesc[0].res.pitch2D.width
 *         _driver_pResDesc[0].res.pitch2D.height       = pResDesc[0].res.pitch2D.height             # <<<<<<<<<<<<<<
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 *         if err != cudaSuccess:
 */
    __pyx_t_2 = (__pyx_v_pResDesc[0]).res.pitch2D.height;
    (__pyx_v__driver_pResDesc[0]).res.pitch2D.height = __pyx_t_2;

    /* "cuda/_lib/ccudart/utils.pyx":2592
 *         _driver_pResDesc[0].res.pitch2D.width        = pResDesc[0].res.pitch2D.width
 *         _driver_pResDesc[0].res.pitch2D.height       = pResDesc[0].res.pitch2D.height
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             _setLastError(err)
 */
    __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo((&(__pyx_v_pResDesc[0]).res.linear.desc), (&__pyx_v_numChannels), (&__pyx_v_format));

    /* "cuda/_lib/ccudart/utils.pyx":2593
 *         _driver_pResDesc[0].res.pitch2D.height       = pResDesc[0].res.pitch2D.height
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             _setLastError(err)
 *             return err
 */
    __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2594
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 *         if err != cudaSuccess:
 *             _setLastError(err)             # <<<<<<<<<<<<<<
 *             return err
 *         _driver_pResDesc[0].res.pitch2D.format       = format
 */
      (void)(__pyx_f_4cuda_4_lib_7ccudart_5utils__setLastError(__pyx_v_err));

      /* "cuda/_lib/ccudart/utils.pyx":2595
 *         if err != cudaSuccess:
 *             _setLastError(err)
 *             return err             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.pitch2D.format       = format
 *         _driver_pResDesc[0].res.pitch2D.numChannels  = numChannels
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2593
 *         _driver_pResDesc[0].res.pitch2D.height       = pResDesc[0].res.pitch2D.height
 *         err = getDescInfo(&pResDesc[0].res.linear.desc, &numChannels, &format)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             _setLastError(err)
 *             return err
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2596
 *             _setLastError(err)
 *             return err
 *         _driver_pResDesc[0].res.pitch2D.format       = format             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].res.pitch2D.numChannels  = numChannels
 *     else:
 */
    (__pyx_v__driver_pResDesc[0]).res.pitch2D.format = __pyx_v_format;

    /* "cuda/_lib/ccudart/utils.pyx":2597
 *             return err
 *         _driver_pResDesc[0].res.pitch2D.format       = format
 *         _driver_pResDesc[0].res.pitch2D.numChannels  = numChannels             # <<<<<<<<<<<<<<
 *     else:
 *         _setLastError(cudaErrorInvalidValue)
 */
    (__pyx_v__driver_pResDesc[0]).res.pitch2D.numChannels = __pyx_v_numChannels;

    /* "cuda/_lib/ccudart/utils.pyx":2586
 *         _driver_pResDesc[0].res.linear.format      = format
 *         _driver_pResDesc[0].res.linear.numChannels = numChannels
 *     elif pResDesc[0].resType == cudaResourceType.cudaResourceTypePitch2D:             # <<<<<<<<<<<<<<
 *         _driver_pResDesc[0].resType                  = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 *         _driver_pResDesc[0].res.pitch2D.devPtr       = <ccuda.CUdeviceptr>pResDesc[0].res.pitch2D.devPtr
 */
    goto __pyx_L3;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2599
 *         _driver_pResDesc[0].res.pitch2D.numChannels  = numChannels
 *     else:
 *         _setLastError(cudaErrorInvalidValue)             # <<<<<<<<<<<<<<
 *         return cudaErrorInvalidValue
 *     _driver_pResDesc[0].flags = 0
 */
  /*else*/ {
    (void)(__pyx_f_4cuda_4_lib_7ccudart_5utils__setLastError(__pyx_e_4cuda_7ccudart_cudaErrorInvalidValue));

    /* "cuda/_lib/ccudart/utils.pyx":2600
 *     else:
 *         _setLastError(cudaErrorInvalidValue)
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *     _driver_pResDesc[0].flags = 0
 * 
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "cuda/_lib/ccudart/utils.pyx":2601
 *         _setLastError(cudaErrorInvalidValue)
 *         return cudaErrorInvalidValue
 *     _driver_pResDesc[0].flags = 0             # <<<<<<<<<<<<<<
 * 
 *     return err
 */
  (__pyx_v__driver_pResDesc[0]).flags = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2603
 *     _driver_pResDesc[0].flags = 0
 * 
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t getDriverEglFrame(ccuda.CUeglFrame *cuEglFrame, cudaEglFrame eglFrame) nogil except+:
 */
  __pyx_r = __pyx_v_err;
  goto __pyx_L0;

  /* "cuda/_lib/ccudart/utils.pyx":2565
 *     return cudaSuccess
 * 
 * cdef cudaError_t toDriverCudaResourceDesc(ccuda.CUDA_RESOURCE_DESC *_driver_pResDesc, const cudaResourceDesc *pResDesc) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err = cudaSuccess
 *     cdef int numChannels
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.toDriverCudaResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2605
 *     return err
 * 
 * cdef cudaError_t getDriverEglFrame(ccuda.CUeglFrame *cuEglFrame, cudaEglFrame eglFrame) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err = cudaSuccess
 *     cdef unsigned int i = 0
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getDriverEglFrame(__pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_cuEglFrame, __pyx_t_4cuda_7ccudart_cudaEglFrame __pyx_v_eglFrame) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  unsigned int __pyx_v_i;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  int __pyx_t_1;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  void *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getDriverEglFrame", __pyx_f[1], 2605, 1, __PYX_ERR(1, 2605, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2606
 * 
 * cdef cudaError_t getDriverEglFrame(ccuda.CUeglFrame *cuEglFrame, cudaEglFrame eglFrame) nogil except+:
 *     cdef cudaError_t err = cudaSuccess             # <<<<<<<<<<<<<<
 *     cdef unsigned int i = 0
 * 
 */
  __pyx_v_err = __pyx_e_4cuda_7ccudart_cudaSuccess;

  /* "cuda/_lib/ccudart/utils.pyx":2607
 * cdef cudaError_t getDriverEglFrame(ccuda.CUeglFrame *cuEglFrame, cudaEglFrame eglFrame) nogil except+:
 *     cdef cudaError_t err = cudaSuccess
 *     cdef unsigned int i = 0             # <<<<<<<<<<<<<<
 * 
 *     err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, <int*>&cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat)
 */
  __pyx_v_i = 0;

  /* "cuda/_lib/ccudart/utils.pyx":2609
 *     cdef unsigned int i = 0
 * 
 *     err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, <int*>&cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat)             # <<<<<<<<<<<<<<
 *     if err != cudaSuccess:
 *         return err
 */
  __pyx_v_err = __pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo((&(__pyx_v_eglFrame.planeDesc[0]).channelDesc), ((int *)(&(__pyx_v_cuEglFrame[0]).numChannels)), (&(__pyx_v_cuEglFrame[0]).cuFormat));

  /* "cuda/_lib/ccudart/utils.pyx":2610
 * 
 *     err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, <int*>&cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     for i in range(eglFrame.planeCount):
 */
  __pyx_t_1 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
  if (__pyx_t_1) {

    /* "cuda/_lib/ccudart/utils.pyx":2611
 *     err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, <int*>&cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat)
 *     if err != cudaSuccess:
 *         return err             # <<<<<<<<<<<<<<
 *     for i in range(eglFrame.planeCount):
 *         if eglFrame.frameType == cudaEglFrameTypeArray:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L0;

    /* "cuda/_lib/ccudart/utils.pyx":2610
 * 
 *     err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, <int*>&cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat)
 *     if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *         return err
 *     for i in range(eglFrame.planeCount):
 */
  }

  /* "cuda/_lib/ccudart/utils.pyx":2612
 *     if err != cudaSuccess:
 *         return err
 *     for i in range(eglFrame.planeCount):             # <<<<<<<<<<<<<<
 *         if eglFrame.frameType == cudaEglFrameTypeArray:
 *             cuEglFrame[0].frame.pArray[i] = <ccuda.CUarray>eglFrame.frame.pArray[i]
 */
  __pyx_t_2 = __pyx_v_eglFrame.planeCount;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2613
 *         return err
 *     for i in range(eglFrame.planeCount):
 *         if eglFrame.frameType == cudaEglFrameTypeArray:             # <<<<<<<<<<<<<<
 *             cuEglFrame[0].frame.pArray[i] = <ccuda.CUarray>eglFrame.frame.pArray[i]
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_eglFrame.frameType == __pyx_e_4cuda_7ccudart_cudaEglFrameTypeArray) != 0);
    if (__pyx_t_1) {

      /* "cuda/_lib/ccudart/utils.pyx":2614
 *     for i in range(eglFrame.planeCount):
 *         if eglFrame.frameType == cudaEglFrameTypeArray:
 *             cuEglFrame[0].frame.pArray[i] = <ccuda.CUarray>eglFrame.frame.pArray[i]             # <<<<<<<<<<<<<<
 *         else:
 *             cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr
 */
      ((__pyx_v_cuEglFrame[0]).frame.pArray[__pyx_v_i]) = ((__pyx_t_4cuda_5ccuda_CUarray)(__pyx_v_eglFrame.frame.pArray[__pyx_v_i]));

      /* "cuda/_lib/ccudart/utils.pyx":2613
 *         return err
 *     for i in range(eglFrame.planeCount):
 *         if eglFrame.frameType == cudaEglFrameTypeArray:             # <<<<<<<<<<<<<<
 *             cuEglFrame[0].frame.pArray[i] = <ccuda.CUarray>eglFrame.frame.pArray[i]
 *         else:
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2616
 *             cuEglFrame[0].frame.pArray[i] = <ccuda.CUarray>eglFrame.frame.pArray[i]
 *         else:
 *             cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr             # <<<<<<<<<<<<<<
 *     cuEglFrame[0].width = eglFrame.planeDesc[0].width
 *     cuEglFrame[0].height = eglFrame.planeDesc[0].height
 */
    /*else*/ {
      __pyx_t_5 = (__pyx_v_eglFrame.frame.pPitch[__pyx_v_i]).ptr;
      ((__pyx_v_cuEglFrame[0]).frame.pPitch[__pyx_v_i]) = __pyx_t_5;
    }
    __pyx_L6:;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2617
 *         else:
 *             cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr
 *     cuEglFrame[0].width = eglFrame.planeDesc[0].width             # <<<<<<<<<<<<<<
 *     cuEglFrame[0].height = eglFrame.planeDesc[0].height
 *     cuEglFrame[0].depth = eglFrame.planeDesc[0].depth
 */
  __pyx_t_2 = (__pyx_v_eglFrame.planeDesc[0]).width;
  (__pyx_v_cuEglFrame[0]).width = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":2618
 *             cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr
 *     cuEglFrame[0].width = eglFrame.planeDesc[0].width
 *     cuEglFrame[0].height = eglFrame.planeDesc[0].height             # <<<<<<<<<<<<<<
 *     cuEglFrame[0].depth = eglFrame.planeDesc[0].depth
 *     cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch
 */
  __pyx_t_2 = (__pyx_v_eglFrame.planeDesc[0]).height;
  (__pyx_v_cuEglFrame[0]).height = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":2619
 *     cuEglFrame[0].width = eglFrame.planeDesc[0].width
 *     cuEglFrame[0].height = eglFrame.planeDesc[0].height
 *     cuEglFrame[0].depth = eglFrame.planeDesc[0].depth             # <<<<<<<<<<<<<<
 *     cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch
 *     cuEglFrame[0].planeCount = eglFrame.planeCount
 */
  __pyx_t_2 = (__pyx_v_eglFrame.planeDesc[0]).depth;
  (__pyx_v_cuEglFrame[0]).depth = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":2620
 *     cuEglFrame[0].height = eglFrame.planeDesc[0].height
 *     cuEglFrame[0].depth = eglFrame.planeDesc[0].depth
 *     cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch             # <<<<<<<<<<<<<<
 *     cuEglFrame[0].planeCount = eglFrame.planeCount
 *     if eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar:
 */
  __pyx_t_2 = (__pyx_v_eglFrame.planeDesc[0]).pitch;
  (__pyx_v_cuEglFrame[0]).pitch = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":2621
 *     cuEglFrame[0].depth = eglFrame.planeDesc[0].depth
 *     cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch
 *     cuEglFrame[0].planeCount = eglFrame.planeCount             # <<<<<<<<<<<<<<
 *     if eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR
 */
  __pyx_t_2 = __pyx_v_eglFrame.planeCount;
  (__pyx_v_cuEglFrame[0]).planeCount = __pyx_t_2;

  /* "cuda/_lib/ccudart/utils.pyx":2622
 *     cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch
 *     cuEglFrame[0].planeCount = eglFrame.planeCount
 *     if eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar:
 */
  switch (__pyx_v_eglFrame.eglColorFormat) {
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar:

    /* "cuda/_lib/ccudart/utils.pyx":2623
 *     cuEglFrame[0].planeCount = eglFrame.planeCount
 *     if eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2622
 *     cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch
 *     cuEglFrame[0].planeCount = eglFrame.planeCount
 *     if eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2625
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2624
 *     if eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422Planar:

    /* "cuda/_lib/ccudart/utils.pyx":2627
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2626
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2629
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2628
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444Planar:

    /* "cuda/_lib/ccudart/utils.pyx":2631
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2630
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2633
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV422:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2632
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV422:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUYV422:

    /* "cuda/_lib/ccudart/utils.pyx":2635
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV422:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY422:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_422;

    /* "cuda/_lib/ccudart/utils.pyx":2634
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV422:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY422:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatUYVY422:

    /* "cuda/_lib/ccudart/utils.pyx":2637
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY422:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatARGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_422;

    /* "cuda/_lib/ccudart/utils.pyx":2636
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV422:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY422:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatARGB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatARGB:

    /* "cuda/_lib/ccudart/utils.pyx":2639
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatARGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRGBA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ARGB;

    /* "cuda/_lib/ccudart/utils.pyx":2638
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY422:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatARGB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRGBA:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatRGBA:

    /* "cuda/_lib/ccudart/utils.pyx":2641
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRGBA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatABGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RGBA;

    /* "cuda/_lib/ccudart/utils.pyx":2640
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatARGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRGBA:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatABGR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatABGR:

    /* "cuda/_lib/ccudart/utils.pyx":2643
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatABGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBGRA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ABGR;

    /* "cuda/_lib/ccudart/utils.pyx":2642
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRGBA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatABGR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBGRA:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBGRA:

    /* "cuda/_lib/ccudart/utils.pyx":2645
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBGRA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatL:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BGRA;

    /* "cuda/_lib/ccudart/utils.pyx":2644
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatABGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBGRA:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatL:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatL:

    /* "cuda/_lib/ccudart/utils.pyx":2647
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatL:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_L;

    /* "cuda/_lib/ccudart/utils.pyx":2646
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBGRA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatL:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatR:

    /* "cuda/_lib/ccudart/utils.pyx":2649
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_R;

    /* "cuda/_lib/ccudart/utils.pyx":2648
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatL:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatA:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatA:

    /* "cuda/_lib/ccudart/utils.pyx":2651
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_A;

    /* "cuda/_lib/ccudart/utils.pyx":2650
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatA:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatRG:

    /* "cuda/_lib/ccudart/utils.pyx":2653
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RG;

    /* "cuda/_lib/ccudart/utils.pyx":2652
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatAYUV:

    /* "cuda/_lib/ccudart/utils.pyx":2655
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV;

    /* "cuda/_lib/ccudart/utils.pyx":2654
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2657
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2656
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2659
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2658
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2661
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2660
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2663
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2662
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2665
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2664
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2667
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2666
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2669
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2668
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatVYUY_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2671
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2670
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatUYVY_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2673
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2672
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUYV_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2675
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2674
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVYU_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2677
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2676
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUYV_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUVA_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2679
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2678
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatAYUV_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2681
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2680
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444Planar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2683
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2682
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatAYUV_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422Planar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2685
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2684
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2687
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2686
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2689
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2688
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2691
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2690
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2693
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2692
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV422SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444Planar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2695
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2694
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422Planar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2697
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2696
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2699
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2698
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2701
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2700
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2703
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2702
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2705
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2704
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRGGB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerRGGB:

    /* "cuda/_lib/ccudart/utils.pyx":2707
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":2706
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRGGB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBGGR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerBGGR:

    /* "cuda/_lib/ccudart/utils.pyx":2709
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":2708
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBGGR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGRBG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerGRBG:

    /* "cuda/_lib/ccudart/utils.pyx":2711
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":2710
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGRBG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGBRG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerGBRG:

    /* "cuda/_lib/ccudart/utils.pyx":2713
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":2712
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGBRG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10RGGB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":2715
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":2714
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerGBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10RGGB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10BGGR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":2717
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":2716
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10BGGR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GRBG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":2719
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":2718
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GRBG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GBRG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":2721
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":2720
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GBRG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RGGB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":2723
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":2722
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RGGB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BGGR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":2725
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":2724
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BGGR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GRBG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":2727
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":2726
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GRBG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GBRG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":2729
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":2728
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GBRG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14RGGB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":2731
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":2730
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14RGGB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14BGGR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":2733
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":2732
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14BGGR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GRBG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":2735
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":2734
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GRBG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GBRG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":2737
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":2736
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GBRG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20RGGB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":2739
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":2738
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer14GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20RGGB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20BGGR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":2741
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":2740
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20RGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20BGGR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GRBG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":2743
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":2742
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20BGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GRBG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GBRG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":2745
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspRGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":2744
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GBRG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspRGGB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspRGGB:

    /* "cuda/_lib/ccudart/utils.pyx":2747
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspRGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspBGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":2746
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer20GBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspRGGB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspBGGR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspBGGR:

    /* "cuda/_lib/ccudart/utils.pyx":2749
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspBGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":2748
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspRGGB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspBGGR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGRBG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspGRBG:

    /* "cuda/_lib/ccudart/utils.pyx":2751
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":2750
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspBGGR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGRBG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGBRG:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspGBRG:

    /* "cuda/_lib/ccudart/utils.pyx":2753
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":2752
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGRBG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGBRG:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444Planar:

    /* "cuda/_lib/ccudart/utils.pyx":2755
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2754
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerIspGBRG:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422Planar:

    /* "cuda/_lib/ccudart/utils.pyx":2757
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2756
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU444Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar:

    /* "cuda/_lib/ccudart/utils.pyx":2759
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBCCR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2758
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU422Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBCCR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerBCCR:

    /* "cuda/_lib/ccudart/utils.pyx":2761
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBCCR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRCCB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BCCR;

    /* "cuda/_lib/ccudart/utils.pyx":2760
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBCCR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRCCB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerRCCB:

    /* "cuda/_lib/ccudart/utils.pyx":2763
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRCCB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCRBC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RCCB;

    /* "cuda/_lib/ccudart/utils.pyx":2762
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerBCCR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRCCB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCRBC:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerCRBC:

    /* "cuda/_lib/ccudart/utils.pyx":2765
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCRBC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCBRC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CRBC;

    /* "cuda/_lib/ccudart/utils.pyx":2764
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerRCCB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCRBC:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCBRC:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerCBRC:

    /* "cuda/_lib/ccudart/utils.pyx":2767
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCBRC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10CCCC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CBRC;

    /* "cuda/_lib/ccudart/utils.pyx":2766
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCRBC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCBRC:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10CCCC:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10CCCC:

    /* "cuda/_lib/ccudart/utils.pyx":2769
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10CCCC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BCCR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_CCCC;

    /* "cuda/_lib/ccudart/utils.pyx":2768
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayerCBRC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10CCCC:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BCCR:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12BCCR:

    /* "cuda/_lib/ccudart/utils.pyx":2771
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BCCR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RCCB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BCCR;

    /* "cuda/_lib/ccudart/utils.pyx":2770
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer10CCCC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BCCR:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RCCB:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12RCCB:

    /* "cuda/_lib/ccudart/utils.pyx":2773
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RCCB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CRBC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RCCB;

    /* "cuda/_lib/ccudart/utils.pyx":2772
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12BCCR:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RCCB:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CRBC:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CRBC:

    /* "cuda/_lib/ccudart/utils.pyx":2775
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CRBC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CBRC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CRBC;

    /* "cuda/_lib/ccudart/utils.pyx":2774
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12RCCB:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CRBC:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CBRC:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CBRC:

    /* "cuda/_lib/ccudart/utils.pyx":2777
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CBRC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CCCC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CBRC;

    /* "cuda/_lib/ccudart/utils.pyx":2776
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CRBC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CBRC:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CCCC:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CCCC:

    /* "cuda/_lib/ccudart/utils.pyx":2779
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CCCC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CCCC;

    /* "cuda/_lib/ccudart/utils.pyx":2778
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CBRC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CCCC:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY:

    /* "cuda/_lib/ccudart/utils.pyx":2781
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y;

    /* "cuda/_lib/ccudart/utils.pyx":2780
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatBayer12CCCC:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_2020:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_2020:

    /* "cuda/_lib/ccudart/utils.pyx":2783
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020;

    /* "cuda/_lib/ccudart/utils.pyx":2782
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_2020:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_2020:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_2020:

    /* "cuda/_lib/ccudart/utils.pyx":2785
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020;

    /* "cuda/_lib/ccudart/utils.pyx":2784
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_2020:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_2020:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_2020:

    /* "cuda/_lib/ccudart/utils.pyx":2787
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020;

    /* "cuda/_lib/ccudart/utils.pyx":2786
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_2020:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_2020:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_2020:

    /* "cuda/_lib/ccudart/utils.pyx":2789
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020;

    /* "cuda/_lib/ccudart/utils.pyx":2788
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_2020:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_709:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_709:

    /* "cuda/_lib/ccudart/utils.pyx":2791
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709;

    /* "cuda/_lib/ccudart/utils.pyx":2790
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_709:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_709:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_709:

    /* "cuda/_lib/ccudart/utils.pyx":2793
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709;

    /* "cuda/_lib/ccudart/utils.pyx":2792
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_709:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_709:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_709:

    /* "cuda/_lib/ccudart/utils.pyx":2795
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709;

    /* "cuda/_lib/ccudart/utils.pyx":2794
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_709:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_709:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_709:

    /* "cuda/_lib/ccudart/utils.pyx":2797
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709;

    /* "cuda/_lib/ccudart/utils.pyx":2796
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUV420Planar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_709:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_709:

    /* "cuda/_lib/ccudart/utils.pyx":2799
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709;

    /* "cuda/_lib/ccudart/utils.pyx":2798
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVU420Planar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_2020:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_2020:

    /* "cuda/_lib/ccudart/utils.pyx":2801
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020;

    /* "cuda/_lib/ccudart/utils.pyx":2800
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_2020:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_2020:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar_2020:

    /* "cuda/_lib/ccudart/utils.pyx":2803
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020;

    /* "cuda/_lib/ccudart/utils.pyx":2802
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_2020:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar:

    /* "cuda/_lib/ccudart/utils.pyx":2805
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR;

    /* "cuda/_lib/ccudart/utils.pyx":2804
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_2020:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_709:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar_709:

    /* "cuda/_lib/ccudart/utils.pyx":2807
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709;

    /* "cuda/_lib/ccudart/utils.pyx":2806
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_709:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2809
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2808
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_422SemiPlanar_709:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_709_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2811
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2810
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_709_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2813
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2812
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_709_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2815
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2814
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_709_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2817
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2816
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_709_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2819
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2818
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_709_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUVA:

    /* "cuda/_lib/ccudart/utils.pyx":2821
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA;

    /* "cuda/_lib/ccudart/utils.pyx":2820
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVYU:

    /* "cuda/_lib/ccudart/utils.pyx":2823
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU;

    /* "cuda/_lib/ccudart/utils.pyx":2822
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYUVA:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatVYUY:

    /* "cuda/_lib/ccudart/utils.pyx":2825
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY;

    /* "cuda/_lib/ccudart/utils.pyx":2824
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatYVYU:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2827
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2826
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatVYUY:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2829
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat =  ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2828
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2831
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat =  ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2830
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat =  ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2833
 *         cuEglFrame[0].eglColorFormat =  ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2832
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat =  ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2835
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2834
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2837
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2836
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2839
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2838
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":2841
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidValue
 */
    (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":2840
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_ER:
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER
 *     elif eglFrame.eglColorFormat == cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER
 *     else:
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":2843
 *         cuEglFrame[0].eglColorFormat = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER
 *     else:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *     if eglFrame.frameType == cudaEglFrameTypeArray:
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2844
 *     else:
 *         return cudaErrorInvalidValue
 *     if eglFrame.frameType == cudaEglFrameTypeArray:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY
 *     elif eglFrame.frameType == cudaEglFrameTypePitch:
 */
  switch (__pyx_v_eglFrame.frameType) {
    case __pyx_e_4cuda_7ccudart_cudaEglFrameTypeArray:

    /* "cuda/_lib/ccudart/utils.pyx":2845
 *         return cudaErrorInvalidValue
 *     if eglFrame.frameType == cudaEglFrameTypeArray:
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY             # <<<<<<<<<<<<<<
 *     elif eglFrame.frameType == cudaEglFrameTypePitch:
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH
 */
    (__pyx_v_cuEglFrame[0]).frameType = __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_ARRAY;

    /* "cuda/_lib/ccudart/utils.pyx":2844
 *     else:
 *         return cudaErrorInvalidValue
 *     if eglFrame.frameType == cudaEglFrameTypeArray:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY
 *     elif eglFrame.frameType == cudaEglFrameTypePitch:
 */
    break;
    case __pyx_e_4cuda_7ccudart_cudaEglFrameTypePitch:

    /* "cuda/_lib/ccudart/utils.pyx":2847
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY
 *     elif eglFrame.frameType == cudaEglFrameTypePitch:
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidValue
 */
    (__pyx_v_cuEglFrame[0]).frameType = __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_PITCH;

    /* "cuda/_lib/ccudart/utils.pyx":2846
 *     if eglFrame.frameType == cudaEglFrameTypeArray:
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY
 *     elif eglFrame.frameType == cudaEglFrameTypePitch:             # <<<<<<<<<<<<<<
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH
 *     else:
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":2849
 *         cuEglFrame[0].frameType = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH
 *     else:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 * 
 * cdef cudaError_t getRuntimeEglFrame(cudaEglFrame *eglFrame, ccuda.CUeglFrame cueglFrame) nogil except+:
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2605
 *     return err
 * 
 * cdef cudaError_t getDriverEglFrame(ccuda.CUeglFrame *cuEglFrame, cudaEglFrame eglFrame) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err = cudaSuccess
 *     cdef unsigned int i = 0
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.getDriverEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/_lib/ccudart/utils.pyx":2851
 *         return cudaErrorInvalidValue
 * 
 * cdef cudaError_t getRuntimeEglFrame(cudaEglFrame *eglFrame, ccuda.CUeglFrame cueglFrame) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err = cudaSuccess
 *     cdef unsigned int i
 */

static __pyx_t_4cuda_7ccudart_cudaError_t __pyx_f_4cuda_4_lib_7ccudart_5utils_getRuntimeEglFrame(__pyx_t_4cuda_7ccudart_cudaEglFrame *__pyx_v_eglFrame, __pyx_t_4cuda_5ccuda_CUeglFrame __pyx_v_cueglFrame) {
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_v_err;
  unsigned int __pyx_v_i;
  __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_v_ad;
  struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr __pyx_v_pPtr;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_r;
  __Pyx_TraceDeclarations
  unsigned int __pyx_t_1;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  __pyx_t_4cuda_5ccuda_CUarray_format __pyx_t_5;
  __pyx_t_4cuda_7ccudart_cudaError_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("getRuntimeEglFrame", __pyx_f[1], 2851, 1, __PYX_ERR(1, 2851, __pyx_L1_error));

  /* "cuda/_lib/ccudart/utils.pyx":2852
 * 
 * cdef cudaError_t getRuntimeEglFrame(cudaEglFrame *eglFrame, ccuda.CUeglFrame cueglFrame) nogil except+:
 *     cdef cudaError_t err = cudaSuccess             # <<<<<<<<<<<<<<
 *     cdef unsigned int i
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 */
  __pyx_v_err = __pyx_e_4cuda_7ccudart_cudaSuccess;

  /* "cuda/_lib/ccudart/utils.pyx":2856
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2 ad
 *     cdef cudaPitchedPtr pPtr
 *     memset(eglFrame, 0, sizeof(eglFrame[0]))             # <<<<<<<<<<<<<<
 *     for i in range(cueglFrame.planeCount):
 *         ad.Depth = cueglFrame.depth
 */
  (void)(memset(__pyx_v_eglFrame, 0, (sizeof((__pyx_v_eglFrame[0])))));

  /* "cuda/_lib/ccudart/utils.pyx":2857
 *     cdef cudaPitchedPtr pPtr
 *     memset(eglFrame, 0, sizeof(eglFrame[0]))
 *     for i in range(cueglFrame.planeCount):             # <<<<<<<<<<<<<<
 *         ad.Depth = cueglFrame.depth
 *         ad.Flags = 0
 */
  __pyx_t_1 = __pyx_v_cueglFrame.planeCount;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "cuda/_lib/ccudart/utils.pyx":2858
 *     memset(eglFrame, 0, sizeof(eglFrame[0]))
 *     for i in range(cueglFrame.planeCount):
 *         ad.Depth = cueglFrame.depth             # <<<<<<<<<<<<<<
 *         ad.Flags = 0
 *         ad.Format = cueglFrame.cuFormat
 */
    __pyx_t_4 = __pyx_v_cueglFrame.depth;
    __pyx_v_ad.Depth = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2859
 *     for i in range(cueglFrame.planeCount):
 *         ad.Depth = cueglFrame.depth
 *         ad.Flags = 0             # <<<<<<<<<<<<<<
 *         ad.Format = cueglFrame.cuFormat
 *         ad.Height = cueglFrame.height
 */
    __pyx_v_ad.Flags = 0;

    /* "cuda/_lib/ccudart/utils.pyx":2860
 *         ad.Depth = cueglFrame.depth
 *         ad.Flags = 0
 *         ad.Format = cueglFrame.cuFormat             # <<<<<<<<<<<<<<
 *         ad.Height = cueglFrame.height
 *         ad.NumChannels = cueglFrame.numChannels
 */
    __pyx_t_5 = __pyx_v_cueglFrame.cuFormat;
    __pyx_v_ad.Format = __pyx_t_5;

    /* "cuda/_lib/ccudart/utils.pyx":2861
 *         ad.Flags = 0
 *         ad.Format = cueglFrame.cuFormat
 *         ad.Height = cueglFrame.height             # <<<<<<<<<<<<<<
 *         ad.NumChannels = cueglFrame.numChannels
 *         ad.Width = cueglFrame.width
 */
    __pyx_t_4 = __pyx_v_cueglFrame.height;
    __pyx_v_ad.Height = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2862
 *         ad.Format = cueglFrame.cuFormat
 *         ad.Height = cueglFrame.height
 *         ad.NumChannels = cueglFrame.numChannels             # <<<<<<<<<<<<<<
 *         ad.Width = cueglFrame.width
 * 
 */
    __pyx_t_4 = __pyx_v_cueglFrame.numChannels;
    __pyx_v_ad.NumChannels = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2863
 *         ad.Height = cueglFrame.height
 *         ad.NumChannels = cueglFrame.numChannels
 *         ad.Width = cueglFrame.width             # <<<<<<<<<<<<<<
 * 
 *         err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad)
 */
    __pyx_t_4 = __pyx_v_cueglFrame.width;
    __pyx_v_ad.Width = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2865
 *         ad.Width = cueglFrame.width
 * 
 *         err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad)             # <<<<<<<<<<<<<<
 *         if err != cudaSuccess:
 *             return err
 */
    try {
      __pyx_t_6 = __pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelFormatDescFromDriverDesc((&((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).channelDesc), NULL, NULL, NULL, (&__pyx_v_ad));
    } catch(...) {
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      __Pyx_CppExn2PyErr();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
      __PYX_ERR(1, 2865, __pyx_L1_error)
    }
    __pyx_v_err = __pyx_t_6;

    /* "cuda/_lib/ccudart/utils.pyx":2866
 * 
 *         err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    __pyx_t_7 = ((__pyx_v_err != __pyx_e_4cuda_7ccudart_cudaSuccess) != 0);
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2867
 *         err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad)
 *         if err != cudaSuccess:
 *             return err             # <<<<<<<<<<<<<<
 * 
 *         eglFrame[0].planeDesc[i].depth = cueglFrame.depth
 */
      __pyx_r = __pyx_v_err;
      goto __pyx_L0;

      /* "cuda/_lib/ccudart/utils.pyx":2866
 * 
 *         err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad)
 *         if err != cudaSuccess:             # <<<<<<<<<<<<<<
 *             return err
 * 
 */
    }

    /* "cuda/_lib/ccudart/utils.pyx":2869
 *             return err
 * 
 *         eglFrame[0].planeDesc[i].depth = cueglFrame.depth             # <<<<<<<<<<<<<<
 *         eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels
 *         if i == 0:
 */
    __pyx_t_4 = __pyx_v_cueglFrame.depth;
    ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).depth = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2870
 * 
 *         eglFrame[0].planeDesc[i].depth = cueglFrame.depth
 *         eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels             # <<<<<<<<<<<<<<
 *         if i == 0:
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 */
    __pyx_t_4 = __pyx_v_cueglFrame.numChannels;
    ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).numChannels = __pyx_t_4;

    /* "cuda/_lib/ccudart/utils.pyx":2871
 *         eglFrame[0].planeDesc[i].depth = cueglFrame.depth
 *         eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels
 *         if i == 0:             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 */
    __pyx_t_7 = ((__pyx_v_i == 0) != 0);
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2872
 *         eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels
 *         if i == 0:
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 */
      __pyx_t_4 = __pyx_v_cueglFrame.width;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2873
 *         if i == 0:
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or
 */
      __pyx_t_4 = __pyx_v_cueglFrame.height;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2874
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch             # <<<<<<<<<<<<<<
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or
 */
      __pyx_t_4 = __pyx_v_cueglFrame.pitch;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2871
 *         eglFrame[0].planeDesc[i].depth = cueglFrame.depth
 *         eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels
 *         if i == 0:             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2875
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or
 */
    switch (__pyx_v_cueglFrame.eglColorFormat) {
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR:
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2876
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2877
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2878
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020:

      /* "cuda/_lib/ccudart/utils.pyx":2879
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020:

      /* "cuda/_lib/ccudart/utils.pyx":2880
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709):
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709:

      /* "cuda/_lib/ccudart/utils.pyx":2881
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709:

      /* "cuda/_lib/ccudart/utils.pyx":2875
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or
 */
      __pyx_t_7 = 1;
      break;
      default:
      __pyx_t_7 = 0;
      break;
    }
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2883
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = ((unsigned int)(((double)__pyx_v_cueglFrame.width) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2884
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = ((unsigned int)(((double)__pyx_v_cueglFrame.height) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2885
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)             # <<<<<<<<<<<<<<
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = ((unsigned int)(((double)__pyx_v_cueglFrame.pitch) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2875
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2886
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or
 */
    switch (__pyx_v_cueglFrame.eglColorFormat) {
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR:
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2887
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2888
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2889
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2890
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2891
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020:

      /* "cuda/_lib/ccudart/utils.pyx":2892
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020:

      /* "cuda/_lib/ccudart/utils.pyx":2893
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709:

      /* "cuda/_lib/ccudart/utils.pyx":2894
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709:

      /* "cuda/_lib/ccudart/utils.pyx":2895
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709:

      /* "cuda/_lib/ccudart/utils.pyx":2896
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020:

      /* "cuda/_lib/ccudart/utils.pyx":2897
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2898
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2899
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2900
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2886
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or
 */
      __pyx_t_7 = 1;
      break;
      default:
      __pyx_t_7 = 0;
      break;
    }
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2902
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = ((unsigned int)(((double)__pyx_v_cueglFrame.width) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2903
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = ((unsigned int)(((double)__pyx_v_cueglFrame.height) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2904
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = ((unsigned int)(((double)__pyx_v_cueglFrame.pitch) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2905
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8             # <<<<<<<<<<<<<<
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 8;

      /* "cuda/_lib/ccudart/utils.pyx":2906
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 */
      switch (__pyx_v_cueglFrame.eglColorFormat) {
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR:
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR:

        /* "cuda/_lib/ccudart/utils.pyx":2907
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709:

        /* "cuda/_lib/ccudart/utils.pyx":2908
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020:

        /* "cuda/_lib/ccudart/utils.pyx":2909
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER:

        /* "cuda/_lib/ccudart/utils.pyx":2910
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER:

        /* "cuda/_lib/ccudart/utils.pyx":2911
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER:

        /* "cuda/_lib/ccudart/utils.pyx":2912
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER:

        /* "cuda/_lib/ccudart/utils.pyx":2914
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16             # <<<<<<<<<<<<<<
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or
 */
        ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 16;

        /* "cuda/_lib/ccudart/utils.pyx":2906
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or
 */
        break;
        default: break;
      }

      /* "cuda/_lib/ccudart/utils.pyx":2886
 *             eglFrame[0].planeDesc[i].height = <unsigned int>(cueglFrame.height / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2915
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or
 */
    switch (__pyx_v_cueglFrame.eglColorFormat) {
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR:
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2916
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER):
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2917
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2915
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or
 */
      __pyx_t_7 = 1;
      break;
      default:
      __pyx_t_7 = 0;
      break;
    }
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2919
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 */
      __pyx_t_4 = __pyx_v_cueglFrame.height;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2920
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = ((unsigned int)(((double)__pyx_v_cueglFrame.width) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2921
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)             # <<<<<<<<<<<<<<
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = ((unsigned int)(((double)__pyx_v_cueglFrame.pitch) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2915
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2922
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or
 */
    switch (__pyx_v_cueglFrame.eglColorFormat) {
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR:
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2923
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2924
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2925
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020:

      /* "cuda/_lib/ccudart/utils.pyx":2926
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2927
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709:

      /* "cuda/_lib/ccudart/utils.pyx":2922
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or
 */
      __pyx_t_7 = 1;
      break;
      default:
      __pyx_t_7 = 0;
      break;
    }
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2929
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = ((unsigned int)(((double)__pyx_v_cueglFrame.width) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2930
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 */
      __pyx_t_4 = __pyx_v_cueglFrame.height;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2931
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = ((unsigned int)(((double)__pyx_v_cueglFrame.pitch) / 2.0));

      /* "cuda/_lib/ccudart/utils.pyx":2932
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8             # <<<<<<<<<<<<<<
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 8;

      /* "cuda/_lib/ccudart/utils.pyx":2933
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 */
      switch (__pyx_v_cueglFrame.eglColorFormat) {
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020:
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR:

        /* "cuda/_lib/ccudart/utils.pyx":2934
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709:

        /* "cuda/_lib/ccudart/utils.pyx":2936
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16             # <<<<<<<<<<<<<<
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or
 */
        ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 16;

        /* "cuda/_lib/ccudart/utils.pyx":2933
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 */
        break;
        default: break;
      }

      /* "cuda/_lib/ccudart/utils.pyx":2922
 *             eglFrame[0].planeDesc[i].width = <unsigned int>(cueglFrame.width / 2)
 *             eglFrame[0].planeDesc[i].pitch = <unsigned int>(cueglFrame.pitch / 2)
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2937
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or
 */
    switch (__pyx_v_cueglFrame.eglColorFormat) {
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR:
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2938
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER):
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2939
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2937
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or
 */
      __pyx_t_7 = 1;
      break;
      default:
      __pyx_t_7 = 0;
      break;
    }
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2941
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 */
      __pyx_t_4 = __pyx_v_cueglFrame.height;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2942
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or
 */
      __pyx_t_4 = __pyx_v_cueglFrame.width;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2943
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch             # <<<<<<<<<<<<<<
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or
 */
      __pyx_t_4 = __pyx_v_cueglFrame.pitch;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2937
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or
 */
      goto __pyx_L6;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2944
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or
 */
    switch (__pyx_v_cueglFrame.eglColorFormat) {
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR:
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2945
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2946
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2947
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2948
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR:

      /* "cuda/_lib/ccudart/utils.pyx":2949
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2950
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2951
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2952
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 */
      case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER:

      /* "cuda/_lib/ccudart/utils.pyx":2944
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or
 */
      __pyx_t_7 = 1;
      break;
      default:
      __pyx_t_7 = 0;
      break;
    }
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2954
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 */
      __pyx_t_4 = __pyx_v_cueglFrame.height;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2955
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 */
      __pyx_t_4 = __pyx_v_cueglFrame.width;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2956
 *             eglFrame[0].planeDesc[i].height = cueglFrame.height
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch             # <<<<<<<<<<<<<<
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or
 */
      __pyx_t_4 = __pyx_v_cueglFrame.pitch;
      ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = __pyx_t_4;

      /* "cuda/_lib/ccudart/utils.pyx":2957
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8             # <<<<<<<<<<<<<<
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 */
      ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 8;

      /* "cuda/_lib/ccudart/utils.pyx":2958
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 */
      switch (__pyx_v_cueglFrame.eglColorFormat) {
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR:
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR:

        /* "cuda/_lib/ccudart/utils.pyx":2959
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER:

        /* "cuda/_lib/ccudart/utils.pyx":2960
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER:

        /* "cuda/_lib/ccudart/utils.pyx":2961
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER:

        /* "cuda/_lib/ccudart/utils.pyx":2962
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 */
        case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER:

        /* "cuda/_lib/ccudart/utils.pyx":2964
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16             # <<<<<<<<<<<<<<
 *         if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:
 *             eglFrame[0].frame.pArray[i] = <cudaArray_t>cueglFrame.frame.pArray[i]
 */
        ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 16;

        /* "cuda/_lib/ccudart/utils.pyx":2958
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *             eglFrame[0].planeDesc[1].channelDesc.y = 8
 *             if (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or
 */
        break;
        default: break;
      }

      /* "cuda/_lib/ccudart/utils.pyx":2944
 *             eglFrame[0].planeDesc[i].width = cueglFrame.width
 *             eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch
 *         elif (cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or             # <<<<<<<<<<<<<<
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or
 *               cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or
 */
    }
    __pyx_L6:;

    /* "cuda/_lib/ccudart/utils.pyx":2965
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:             # <<<<<<<<<<<<<<
 *             eglFrame[0].frame.pArray[i] = <cudaArray_t>cueglFrame.frame.pArray[i]
 *         else:
 */
    __pyx_t_7 = ((__pyx_v_cueglFrame.frameType == __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_ARRAY) != 0);
    if (__pyx_t_7) {

      /* "cuda/_lib/ccudart/utils.pyx":2966
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:
 *             eglFrame[0].frame.pArray[i] = <cudaArray_t>cueglFrame.frame.pArray[i]             # <<<<<<<<<<<<<<
 *         else:
 *             pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch,
 */
      ((__pyx_v_eglFrame[0]).frame.pArray[__pyx_v_i]) = ((__pyx_t_4cuda_7ccudart_cudaArray_t)(__pyx_v_cueglFrame.frame.pArray[__pyx_v_i]));

      /* "cuda/_lib/ccudart/utils.pyx":2965
 *                 cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER):
 *                 eglFrame[0].planeDesc[1].channelDesc.y = 16
 *         if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:             # <<<<<<<<<<<<<<
 *             eglFrame[0].frame.pArray[i] = <cudaArray_t>cueglFrame.frame.pArray[i]
 *         else:
 */
      goto __pyx_L7;
    }

    /* "cuda/_lib/ccudart/utils.pyx":2968
 *             eglFrame[0].frame.pArray[i] = <cudaArray_t>cueglFrame.frame.pArray[i]
 *         else:
 *             pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch,             # <<<<<<<<<<<<<<
 *                     eglFrame[0].planeDesc[i].width, eglFrame[0].planeDesc[i].height)
 *             eglFrame[0].frame.pPitch[i] = pPtr
 */
    /*else*/ {

      /* "cuda/_lib/ccudart/utils.pyx":2969
 *         else:
 *             pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch,
 *                     eglFrame[0].planeDesc[i].width, eglFrame[0].planeDesc[i].height)             # <<<<<<<<<<<<<<
 *             eglFrame[0].frame.pPitch[i] = pPtr
 * 
 */
      __pyx_v_pPtr = __pyx_f_4cuda_7ccudart_make_cudaPitchedPtr((__pyx_v_cueglFrame.frame.pPitch[__pyx_v_i]), ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch, ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width, ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height);

      /* "cuda/_lib/ccudart/utils.pyx":2970
 *             pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch,
 *                     eglFrame[0].planeDesc[i].width, eglFrame[0].planeDesc[i].height)
 *             eglFrame[0].frame.pPitch[i] = pPtr             # <<<<<<<<<<<<<<
 * 
 *     eglFrame[0].planeCount = cueglFrame.planeCount
 */
      ((__pyx_v_eglFrame[0]).frame.pPitch[__pyx_v_i]) = __pyx_v_pPtr;
    }
    __pyx_L7:;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2972
 *             eglFrame[0].frame.pPitch[i] = pPtr
 * 
 *     eglFrame[0].planeCount = cueglFrame.planeCount             # <<<<<<<<<<<<<<
 *     if cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar
 */
  __pyx_t_1 = __pyx_v_cueglFrame.planeCount;
  (__pyx_v_eglFrame[0]).planeCount = __pyx_t_1;

  /* "cuda/_lib/ccudart/utils.pyx":2973
 * 
 *     eglFrame[0].planeCount = cueglFrame.planeCount
 *     if cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR:
 */
  switch (__pyx_v_cueglFrame.eglColorFormat) {
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":2974
 *     eglFrame[0].planeCount = cueglFrame.planeCount
 *     if cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar;

    /* "cuda/_lib/ccudart/utils.pyx":2973
 * 
 *     eglFrame[0].planeCount = cueglFrame.planeCount
 *     if cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":2976
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":2975
 *     if cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":2978
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422Planar;

    /* "cuda/_lib/ccudart/utils.pyx":2977
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":2980
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":2979
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":2982
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444Planar;

    /* "cuda/_lib/ccudart/utils.pyx":2981
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":2984
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV422
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":2983
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_422:

    /* "cuda/_lib/ccudart/utils.pyx":2986
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV422             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY422
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUYV422;

    /* "cuda/_lib/ccudart/utils.pyx":2985
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV422
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_422:

    /* "cuda/_lib/ccudart/utils.pyx":2988
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV422
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY422             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatARGB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatUYVY422;

    /* "cuda/_lib/ccudart/utils.pyx":2987
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV422
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY422
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ARGB:

    /* "cuda/_lib/ccudart/utils.pyx":2990
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY422
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatARGB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRGBA
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatARGB;

    /* "cuda/_lib/ccudart/utils.pyx":2989
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY422
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatARGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RGBA:

    /* "cuda/_lib/ccudart/utils.pyx":2992
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatARGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRGBA             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatABGR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatRGBA;

    /* "cuda/_lib/ccudart/utils.pyx":2991
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatARGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRGBA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ABGR:

    /* "cuda/_lib/ccudart/utils.pyx":2994
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRGBA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatABGR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBGRA
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatABGR;

    /* "cuda/_lib/ccudart/utils.pyx":2993
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRGBA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatABGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BGRA:

    /* "cuda/_lib/ccudart/utils.pyx":2996
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatABGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBGRA             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatL
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBGRA;

    /* "cuda/_lib/ccudart/utils.pyx":2995
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatABGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBGRA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_L:

    /* "cuda/_lib/ccudart/utils.pyx":2998
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBGRA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatL             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatL;

    /* "cuda/_lib/ccudart/utils.pyx":2997
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBGRA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatL
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_R:

    /* "cuda/_lib/ccudart/utils.pyx":3000
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatL
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatA
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatR;

    /* "cuda/_lib/ccudart/utils.pyx":2999
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatL
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_A:

    /* "cuda/_lib/ccudart/utils.pyx":3002
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatA             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatA;

    /* "cuda/_lib/ccudart/utils.pyx":3001
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RG:

    /* "cuda/_lib/ccudart/utils.pyx":3004
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatRG;

    /* "cuda/_lib/ccudart/utils.pyx":3003
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV:

    /* "cuda/_lib/ccudart/utils.pyx":3006
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatAYUV;

    /* "cuda/_lib/ccudart/utils.pyx":3005
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3008
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":3007
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3010
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":3009
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3012
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":3011
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3014
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":3013
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3016
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":3015
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3018
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":3017
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3020
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":3019
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3022
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatVYUY_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3021
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3024
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatUYVY_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3023
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3026
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUYV_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3025
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3028
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVYU_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3027
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3030
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUVA_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3029
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3032
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatAYUV_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3031
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3034
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444Planar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3033
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatAYUV_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3036
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422Planar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3035
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3038
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3037
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3040
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV444SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3039
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3042
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV422SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3041
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3044
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3043
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV422SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3046
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444Planar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3045
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3048
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422Planar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3047
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3050
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3049
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3052
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3051
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3054
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3053
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3056
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRGGB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3055
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":3058
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRGGB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBGGR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerRGGB;

    /* "cuda/_lib/ccudart/utils.pyx":3057
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":3060
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBGGR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGRBG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerBGGR;

    /* "cuda/_lib/ccudart/utils.pyx":3059
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":3062
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGRBG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGBRG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerGRBG;

    /* "cuda/_lib/ccudart/utils.pyx":3061
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":3064
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGBRG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10RGGB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerGBRG;

    /* "cuda/_lib/ccudart/utils.pyx":3063
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":3066
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10RGGB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10BGGR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":3065
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerGBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":3068
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10BGGR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GRBG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":3067
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":3070
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GRBG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GBRG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":3069
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":3072
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GBRG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RGGB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":3071
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":3074
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RGGB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BGGR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":3073
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":3076
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BGGR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GRBG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":3075
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":3078
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GRBG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GBRG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":3077
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":3080
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GBRG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14RGGB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":3079
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":3082
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14RGGB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14BGGR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":3081
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":3084
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14BGGR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GRBG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":3083
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":3086
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GRBG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GBRG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":3085
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":3088
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GBRG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20RGGB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer14GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":3087
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":3090
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20RGGB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20BGGR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20RGGB;

    /* "cuda/_lib/ccudart/utils.pyx":3089
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer14GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":3092
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20BGGR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GRBG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20BGGR;

    /* "cuda/_lib/ccudart/utils.pyx":3091
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20RGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":3094
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GRBG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GBRG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20GRBG;

    /* "cuda/_lib/ccudart/utils.pyx":3093
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20BGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":3096
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GBRG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspRGGB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer20GBRG;

    /* "cuda/_lib/ccudart/utils.pyx":3095
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB:

    /* "cuda/_lib/ccudart/utils.pyx":3098
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspRGGB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspBGGR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspRGGB;

    /* "cuda/_lib/ccudart/utils.pyx":3097
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer20GBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspRGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR:

    /* "cuda/_lib/ccudart/utils.pyx":3100
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspRGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspBGGR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGRBG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspBGGR;

    /* "cuda/_lib/ccudart/utils.pyx":3099
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspRGGB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspBGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG:

    /* "cuda/_lib/ccudart/utils.pyx":3102
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspBGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGRBG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGBRG
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspGRBG;

    /* "cuda/_lib/ccudart/utils.pyx":3101
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspBGGR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG:

    /* "cuda/_lib/ccudart/utils.pyx":3104
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGBRG             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerIspGBRG;

    /* "cuda/_lib/ccudart/utils.pyx":3103
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGRBG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3106
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU444Planar;

    /* "cuda/_lib/ccudart/utils.pyx":3105
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerIspGBRG
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3108
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU422Planar;

    /* "cuda/_lib/ccudart/utils.pyx":3107
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU444Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3110
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBCCR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar;

    /* "cuda/_lib/ccudart/utils.pyx":3109
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU422Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BCCR:

    /* "cuda/_lib/ccudart/utils.pyx":3112
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBCCR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRCCB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerBCCR;

    /* "cuda/_lib/ccudart/utils.pyx":3111
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBCCR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RCCB:

    /* "cuda/_lib/ccudart/utils.pyx":3114
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBCCR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRCCB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCRBC
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerRCCB;

    /* "cuda/_lib/ccudart/utils.pyx":3113
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerBCCR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRCCB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CRBC:

    /* "cuda/_lib/ccudart/utils.pyx":3116
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRCCB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCRBC             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCBRC
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerCRBC;

    /* "cuda/_lib/ccudart/utils.pyx":3115
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerRCCB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCRBC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CBRC:

    /* "cuda/_lib/ccudart/utils.pyx":3118
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCRBC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCBRC             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10CCCC
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayerCBRC;

    /* "cuda/_lib/ccudart/utils.pyx":3117
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCRBC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCBRC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_CCCC:

    /* "cuda/_lib/ccudart/utils.pyx":3120
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCBRC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10CCCC             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BCCR
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer10CCCC;

    /* "cuda/_lib/ccudart/utils.pyx":3119
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayerCBRC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10CCCC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BCCR:

    /* "cuda/_lib/ccudart/utils.pyx":3122
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10CCCC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BCCR             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RCCB
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12BCCR;

    /* "cuda/_lib/ccudart/utils.pyx":3121
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer10CCCC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BCCR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RCCB:

    /* "cuda/_lib/ccudart/utils.pyx":3124
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BCCR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RCCB             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CRBC
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12RCCB;

    /* "cuda/_lib/ccudart/utils.pyx":3123
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12BCCR
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RCCB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CRBC:

    /* "cuda/_lib/ccudart/utils.pyx":3126
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RCCB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CRBC             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CBRC
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CRBC;

    /* "cuda/_lib/ccudart/utils.pyx":3125
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12RCCB
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CRBC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CBRC:

    /* "cuda/_lib/ccudart/utils.pyx":3128
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CRBC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CBRC             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CCCC
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CBRC;

    /* "cuda/_lib/ccudart/utils.pyx":3127
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CRBC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CBRC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CCCC:

    /* "cuda/_lib/ccudart/utils.pyx":3130
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CBRC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CCCC             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatBayer12CCCC;

    /* "cuda/_lib/ccudart/utils.pyx":3129
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CBRC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CCCC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y:

    /* "cuda/_lib/ccudart/utils.pyx":3132
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CCCC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_2020
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY;

    /* "cuda/_lib/ccudart/utils.pyx":3131
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatBayer12CCCC
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020:

    /* "cuda/_lib/ccudart/utils.pyx":3134
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_2020             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_2020
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_2020;

    /* "cuda/_lib/ccudart/utils.pyx":3133
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020:

    /* "cuda/_lib/ccudart/utils.pyx":3136
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_2020             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_2020
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_2020;

    /* "cuda/_lib/ccudart/utils.pyx":3135
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020:

    /* "cuda/_lib/ccudart/utils.pyx":3138
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_2020             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_2020
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_2020;

    /* "cuda/_lib/ccudart/utils.pyx":3137
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020:

    /* "cuda/_lib/ccudart/utils.pyx":3140
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_2020             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_709
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_2020;

    /* "cuda/_lib/ccudart/utils.pyx":3139
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709:

    /* "cuda/_lib/ccudart/utils.pyx":3142
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_709             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_709
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420SemiPlanar_709;

    /* "cuda/_lib/ccudart/utils.pyx":3141
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709:

    /* "cuda/_lib/ccudart/utils.pyx":3144
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_709             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_709
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420SemiPlanar_709;

    /* "cuda/_lib/ccudart/utils.pyx":3143
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709:

    /* "cuda/_lib/ccudart/utils.pyx":3146
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_709             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_709
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUV420Planar_709;

    /* "cuda/_lib/ccudart/utils.pyx":3145
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709:

    /* "cuda/_lib/ccudart/utils.pyx":3148
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_709             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVU420Planar_709;

    /* "cuda/_lib/ccudart/utils.pyx":3147
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUV420Planar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709:

    /* "cuda/_lib/ccudart/utils.pyx":3150
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_2020
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_709;

    /* "cuda/_lib/ccudart/utils.pyx":3149
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVU420Planar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020:

    /* "cuda/_lib/ccudart/utils.pyx":3152
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_2020             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_2020
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_2020;

    /* "cuda/_lib/ccudart/utils.pyx":3151
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020:

    /* "cuda/_lib/ccudart/utils.pyx":3154
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_2020             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar_2020;

    /* "cuda/_lib/ccudart/utils.pyx":3153
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR:

    /* "cuda/_lib/ccudart/utils.pyx":3156
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_709
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar;

    /* "cuda/_lib/ccudart/utils.pyx":3155
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_2020
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709:

    /* "cuda/_lib/ccudart/utils.pyx":3158
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_709             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_422SemiPlanar_709;

    /* "cuda/_lib/ccudart/utils.pyx":3157
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3160
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_709_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3159
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_422SemiPlanar_709
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3162
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_709_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3161
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3164
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_709_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3163
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3166
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_709_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3165
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3168
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_709_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3167
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3170
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_709_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3169
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA:

    /* "cuda/_lib/ccudart/utils.pyx":3172
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYUVA;

    /* "cuda/_lib/ccudart/utils.pyx":3171
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU:

    /* "cuda/_lib/ccudart/utils.pyx":3174
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatYVYU;

    /* "cuda/_lib/ccudart/utils.pyx":3173
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYUVA
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY:

    /* "cuda/_lib/ccudart/utils.pyx":3176
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatVYUY;

    /* "cuda/_lib/ccudart/utils.pyx":3175
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatYVYU
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3178
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3177
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatVYUY
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3180
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3179
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3182
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3181
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3184
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3183
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3186
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3185
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3188
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3187
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3190
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_ER             # <<<<<<<<<<<<<<
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3189
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER:

    /* "cuda/_lib/ccudart/utils.pyx":3192
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidValue
 */
    (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_7ccudart_cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER;

    /* "cuda/_lib/ccudart/utils.pyx":3191
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER:
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_ER
 *     elif cueglFrame.eglColorFormat == ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER:             # <<<<<<<<<<<<<<
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER
 *     else:
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":3194
 *         eglFrame[0].eglColorFormat = cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER
 *     else:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 *     if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:
 *         eglFrame[0].frameType = cudaEglFrameTypeArray
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":3195
 *     else:
 *         return cudaErrorInvalidValue
 *     if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:             # <<<<<<<<<<<<<<
 *         eglFrame[0].frameType = cudaEglFrameTypeArray
 *     elif cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH:
 */
  switch (__pyx_v_cueglFrame.frameType) {
    case __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_ARRAY:

    /* "cuda/_lib/ccudart/utils.pyx":3196
 *         return cudaErrorInvalidValue
 *     if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:
 *         eglFrame[0].frameType = cudaEglFrameTypeArray             # <<<<<<<<<<<<<<
 *     elif cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH:
 *         eglFrame[0].frameType = cudaEglFrameTypePitch
 */
    (__pyx_v_eglFrame[0]).frameType = __pyx_e_4cuda_7ccudart_cudaEglFrameTypeArray;

    /* "cuda/_lib/ccudart/utils.pyx":3195
 *     else:
 *         return cudaErrorInvalidValue
 *     if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:             # <<<<<<<<<<<<<<
 *         eglFrame[0].frameType = cudaEglFrameTypeArray
 *     elif cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH:
 */
    break;
    case __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_PITCH:

    /* "cuda/_lib/ccudart/utils.pyx":3198
 *         eglFrame[0].frameType = cudaEglFrameTypeArray
 *     elif cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH:
 *         eglFrame[0].frameType = cudaEglFrameTypePitch             # <<<<<<<<<<<<<<
 *     else:
 *         return cudaErrorInvalidValue
 */
    (__pyx_v_eglFrame[0]).frameType = __pyx_e_4cuda_7ccudart_cudaEglFrameTypePitch;

    /* "cuda/_lib/ccudart/utils.pyx":3197
 *     if cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY:
 *         eglFrame[0].frameType = cudaEglFrameTypeArray
 *     elif cueglFrame.frameType == ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH:             # <<<<<<<<<<<<<<
 *         eglFrame[0].frameType = cudaEglFrameTypePitch
 *     else:
 */
    break;
    default:

    /* "cuda/_lib/ccudart/utils.pyx":3200
 *         eglFrame[0].frameType = cudaEglFrameTypePitch
 *     else:
 *         return cudaErrorInvalidValue             # <<<<<<<<<<<<<<
 */
    __pyx_r = __pyx_e_4cuda_7ccudart_cudaErrorInvalidValue;
    goto __pyx_L0;
    break;
  }

  /* "cuda/_lib/ccudart/utils.pyx":2851
 *         return cudaErrorInvalidValue
 * 
 * cdef cudaError_t getRuntimeEglFrame(cudaEglFrame *eglFrame, ccuda.CUeglFrame cueglFrame) nogil except+:             # <<<<<<<<<<<<<<
 *     cdef cudaError_t err = cudaSuccess
 *     cdef unsigned int i
 */

  /* function exit code */
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda._lib.ccudart.utils.getRuntimeEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = (enum __pyx_t_4cuda_7ccudart_cudaError) 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
static struct __pyx_vtabstruct_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal __pyx_vtable_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal;

static PyObject *__pyx_tp_new_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)o);
  p->__pyx_vtab = __pyx_vtabptr_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal;
  if (unlikely(__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_5__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_7__setstate_cython__, METH_O, __pyx_doc_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda._lib.ccudart.utils.cudaPythonGlobal", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

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

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

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "utils",
    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_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_cudaPythonGlobal, __pyx_k_cudaPythonGlobal, sizeof(__pyx_k_cudaPythonGlobal), 0, 0, 1, 1},
  {&__pyx_n_s_cudaPythonGlobal___reduce_cython, __pyx_k_cudaPythonGlobal___reduce_cython, sizeof(__pyx_k_cudaPythonGlobal___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_cudaPythonGlobal___setstate_cyth, __pyx_k_cudaPythonGlobal___setstate_cyth, sizeof(__pyx_k_cudaPythonGlobal___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_cuda__lib_ccudart_utils, __pyx_k_cuda__lib_ccudart_utils, sizeof(__pyx_k_cuda__lib_ccudart_utils), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 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_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 2612, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

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

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 3, __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(1, 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_v_4cuda_4_lib_7ccudart_5utils_m_global = ((struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)Py_None); Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

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

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("globalGetInstance", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_globalGetInstance, "struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *(void)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_setLastError", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils__setLastError, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaError_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("getDescInfo", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_getDescInfo, "__pyx_t_4cuda_7ccudart_cudaError_t (struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *, int *, __pyx_t_4cuda_5ccuda_CUarray_format *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("streamAddCallbackCommon", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_streamAddCallbackCommon, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaStream_t, __pyx_t_4cuda_7ccudart_cudaStreamCallback_t, void *, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("streamGetCaptureInfoCommon", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_streamGetCaptureInfoCommon, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaStream_t, enum __pyx_t_4cuda_7ccudart_cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, __pyx_t_4cuda_7ccudart_cudaGraph_t *, __pyx_t_4cuda_7ccudart_cudaGraphNode_t const **, size_t *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("getChannelFormatDescFromDriverDesc", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelFormatDescFromDriverDesc, "__pyx_t_4cuda_7ccudart_cudaError_t (struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc *, size_t *, size_t *, size_t *, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR_v2 const *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyFromHost2D", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromHost2D, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyFromDevice2D", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice2D, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_5ccuda_CUmemorytype, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyToHost2D", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyToHost2D, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char *, size_t, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyToDevice2D", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice2D, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_5ccuda_CUmemorytype, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyToArray2D", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyToArray2D, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, __pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, size_t, size_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("getChannelDesc", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_getChannelDesc, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_const_t, struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("getDriverResDescFromResDesc", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_getDriverResDescFromResDesc, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *, struct __pyx_t_4cuda_7ccudart_cudaResourceDesc const *, __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC *, struct __pyx_t_4cuda_7ccudart_cudaTextureDesc const *, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC *, struct __pyx_t_4cuda_7ccudart_cudaResourceViewDesc const *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("getResDescFromDriverResDesc", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_getResDescFromDriverResDesc, "__pyx_t_4cuda_7ccudart_cudaError_t (struct __pyx_t_4cuda_7ccudart_cudaResourceDesc *, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC const *, struct __pyx_t_4cuda_7ccudart_cudaTextureDesc *, __pyx_t_4cuda_5ccuda_CUDA_TEXTURE_DESC const *, struct __pyx_t_4cuda_7ccudart_cudaResourceViewDesc *, __pyx_t_4cuda_5ccuda_CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memsetPtr", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memsetPtr, "__pyx_t_4cuda_7ccudart_cudaError_t (char *, int, size_t, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memset2DPtr", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memset2DPtr, "__pyx_t_4cuda_7ccudart_cudaError_t (char *, size_t, int, size_t, size_t, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyFromHost", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromHost, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyFromDevice", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyFromDevice, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_5ccuda_CUmemorytype, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyToHost", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyToHost, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char *, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copyToDevice", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copyToDevice, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_5ccuda_CUmemorytype, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, char const *, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("copy1DConvertTo3DParams", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_copy1DConvertTo3DParams, "__pyx_t_4cuda_7ccudart_cudaError_t (void *, void const *, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind, struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("toDriverMemsetNodeParams", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_toDriverMemsetNodeParams, "void (struct __pyx_t_4cuda_7ccudart_cudaMemsetParams const *, __pyx_t_4cuda_5ccuda_CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("toDriverMemCopy3DParams", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_toDriverMemCopy3DParams, "__pyx_t_4cuda_7ccudart_cudaError_t (struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms const *, __pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mallocArray", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_mallocArray, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_t *, struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *, size_t, size_t, size_t, int, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpy2DToArray", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DToArray, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, char const *, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpyDispatch", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyDispatch, "__pyx_t_4cuda_7ccudart_cudaError_t (void *, void const *, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mallocHost", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_mallocHost, "__pyx_t_4cuda_7ccudart_cudaError_t (size_t, void **, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mallocPitch", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_mallocPitch, "__pyx_t_4cuda_7ccudart_cudaError_t (size_t, size_t, size_t, void **, size_t *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mallocMipmappedArray", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_mallocMipmappedArray, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaMipmappedArray_t *, struct __pyx_t_4cuda_7ccudart_cudaChannelFormatDesc const *, size_t, size_t, size_t, unsigned int, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpy2DPtr", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DPtr, "__pyx_t_4cuda_7ccudart_cudaError_t (char *, size_t, char const *, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpy3D", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy3D, "__pyx_t_4cuda_7ccudart_cudaError_t (struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms const *, bool, int, int, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpyAsyncDispatch", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyAsyncDispatch, "__pyx_t_4cuda_7ccudart_cudaError_t (void *, void const *, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind, __pyx_t_4cuda_7ccudart_cudaStream_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("toCudartMemCopy3DParams", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_toCudartMemCopy3DParams, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_v2 const *, struct __pyx_t_4cuda_7ccudart_cudaMemcpy3DParms *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpy2DFromArray", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DFromArray, "__pyx_t_4cuda_7ccudart_cudaError_t (char *, size_t, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpy2DArrayToArray", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpy2DArrayToArray, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memset3DPtr", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memset3DPtr, "__pyx_t_4cuda_7ccudart_cudaError_t (struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr, int, struct __pyx_t_4cuda_7ccudart_cudaExtent, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpyToArray", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyToArray, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, char const *, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpyFromArray", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyFromArray, "__pyx_t_4cuda_7ccudart_cudaError_t (char *, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind, __pyx_t_4cuda_7ccudart_cudaStream_t, bool)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("memcpyArrayToArray", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_memcpyArrayToArray, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("toDriverCudaResourceDesc", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_toDriverCudaResourceDesc, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_5ccuda_CUDA_RESOURCE_DESC *, struct __pyx_t_4cuda_7ccudart_cudaResourceDesc const *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("getDriverEglFrame", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_getDriverEglFrame, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_5ccuda_CUeglFrame *, __pyx_t_4cuda_7ccudart_cudaEglFrame)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("getRuntimeEglFrame", (void (*)(void))__pyx_f_4cuda_4_lib_7ccudart_5utils_getRuntimeEglFrame, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaEglFrame *, __pyx_t_4cuda_5ccuda_CUeglFrame)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal = &__pyx_vtable_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal;
  __pyx_vtable_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal.lazyInit = (__pyx_t_4cuda_7ccudart_cudaError_t (*)(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *))__pyx_f_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_lazyInit;
  __pyx_vtable_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal.lazyInitDevice = (__pyx_t_4cuda_7ccudart_cudaError_t (*)(struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *, int))__pyx_f_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_lazyInitDevice;
  if (PyType_Ready(&__pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal) < 0) __PYX_ERR(1, 29, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal.tp_dictoffset && __pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal.tp_dict, __pyx_vtabptr_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal) < 0) __PYX_ERR(1, 29, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_cudaPythonGlobal, (PyObject *)&__pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal) < 0) __PYX_ERR(1, 29, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal) < 0) __PYX_ERR(1, 29, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal = &__pyx_type_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

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(1, 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(1, 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(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cudaMemcpyToArray", (void (**)(void))&__pyx_f_4cuda_7ccudart_cudaMemcpyToArray, "__pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaArray_t, size_t, size_t, void const *, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cudaMemcpyFromArray", (void (**)(void))&__pyx_f_4cuda_7ccudart_cudaMemcpyFromArray, "__pyx_t_4cuda_7ccudart_cudaError_t (void *, __pyx_t_4cuda_7ccudart_cudaArray_const_t, size_t, size_t, size_t, enum __pyx_t_4cuda_7ccudart_cudaMemcpyKind)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "make_cudaPitchedPtr", (void (**)(void))&__pyx_f_4cuda_7ccudart_make_cudaPitchedPtr, "struct __pyx_t_4cuda_7ccudart_cudaPitchedPtr (void *, size_t, size_t, size_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("cuda._cuda.ccuda"); if (!__pyx_t_1) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuInit", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuInit, "__pyx_t_4cuda_5ccuda_CUresult (unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGet", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdevice *, int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetCount", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount, "__pyx_t_4cuda_5ccuda_CUresult (int *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetName", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName, "__pyx_t_4cuda_5ccuda_CUresult (char *, int, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetUuid", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUuuid *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceTotalMem_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2, "__pyx_t_4cuda_5ccuda_CUresult (size_t *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute, "__pyx_t_4cuda_5ccuda_CUresult (int *, __pyx_t_4cuda_5ccuda_CUdevice_attribute, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDevicePrimaryCtxRetain", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *, __pyx_t_4cuda_5ccuda_CUdevice)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxSetCurrent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetCurrent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUcontext *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAllocPitch_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemHostAlloc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc, "__pyx_t_4cuda_5ccuda_CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyHtoD_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoH_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoD_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy2DUnaligned_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy3D_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy3DPeer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyHtoDAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, void const *, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoHAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (void *, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoDAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, __pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy2DAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY2D const *, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy3DAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D const *, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy3DPeerAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_MEMCPY3D_PEER const *, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD8_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD2D8_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD8Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, unsigned char, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD2D8Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUdeviceptr, size_t, unsigned char, size_t, size_t, __pyx_t_4cuda_5ccuda_CUstream)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArray3DCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArray3DGetDescriptor_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR *, __pyx_t_4cuda_5ccuda_CUarray)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMipmappedArrayCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUmipmappedArray *, __pyx_t_4cuda_5ccuda_CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMipmappedArrayGetLevel", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUarray *, __pyx_t_4cuda_5ccuda_CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamAddCallback", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamGetCaptureInfo", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *, __pyx_t_4cuda_5ccuda_cuuint64_t *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamGetCaptureInfo_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2, "__pyx_t_4cuda_5ccuda_CUresult (__pyx_t_4cuda_5ccuda_CUstream, __pyx_t_4cuda_5ccuda_CUstreamCaptureStatus *, __pyx_t_4cuda_5ccuda_cuuint64_t *, __pyx_t_4cuda_5ccuda_CUgraph *, __pyx_t_4cuda_5ccuda_CUgraphNode const **, size_t *)") < 0) __PYX_ERR(1, 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 initutils(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initutils(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_utils(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_utils(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_utils(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 'utils' 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_utils(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 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(1, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 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("utils", __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(1, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 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(1, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_cuda___lib__ccudart__utils) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "cuda._lib.ccudart.utils")) {
      if (unlikely(PyDict_SetItemString(modules, "cuda._lib.ccudart.utils", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_utils(void)", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_cudaPythonGlobal___reduce_cython, NULL, __pyx_n_s_cuda__lib_ccudart_utils, __pyx_d, ((PyObject *)__pyx_codeobj_)); 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_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4_lib_7ccudart_5utils_16cudaPythonGlobal_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_cudaPythonGlobal___setstate_cyth, NULL, __pyx_n_s_cuda__lib_ccudart_utils, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/_lib/ccudart/utils.pyx":508
 *         return cudaSuccess
 * 
 * cdef cudaPythonGlobal m_global = cudaPythonGlobal()             # <<<<<<<<<<<<<<
 * 
 * cdef cudaPythonGlobal globalGetInstance():
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global));
  __Pyx_DECREF_SET(__pyx_v_4cuda_4_lib_7ccudart_5utils_m_global, ((struct __pyx_obj_4cuda_4_lib_7ccudart_5utils_cudaPythonGlobal *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/_lib/ccudart/utils.pyx":1
 * # Copyright 2021-2022 NVIDIA Corporation.  All rights reserved.             # <<<<<<<<<<<<<<
 * #
 * # Please refer to the NVIDIA end user license agreement (EULA) associated
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 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._lib.ccudart.utils", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cuda._lib.ccudart.utils");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

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

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

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

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

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

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

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

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

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

/* None */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) {
  int err;
  #ifdef WITH_THREAD
  PyGILState_STATE _save = PyGILState_Ensure();
  #endif
  err = !!PyErr_Occurred();
  #ifdef WITH_THREAD
  PyGILState_Release(_save);
  #endif
  return err;
}

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

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

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

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

/* CIntFromPy */
static CYTHON_INLINE 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;
}

/* FunctionExport */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

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

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

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


#endif /* Py_PYTHON_H */
