/* Generated by Cython 0.29.4 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "language": "c++",
        "name": "psychxr.libovr._libovr",
        "sources": [
            "psychxr/libovr/_libovr.pyx"
        ]
    },
    "module_name": "psychxr.libovr._libovr"
}
END: Cython Metadata */

#define 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_4"
#define CYTHON_HEX_VERSION 0x001D04F0
#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
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #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_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 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_USE_DICT_VERSIONS
#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);\
        }\
    }
#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
#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
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #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)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#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
  #define PyObject_Unicode             PyObject_Str
#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 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   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), 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_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; 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__psychxr__libovr___libovr
#define __PYX_HAVE_API__psychxr__libovr___libovr
/* Early includes */
#include <stdint.h>
#include "OVR_Version.h"
#include "OVR_CAPI_Keys.h"
#include "OVR_ErrorCode.h"
#include "OVR_CAPI.h"
#include "OVR_CAPI_Util.h"
#include "OVR_CAPI_GL.h"
#include "OVR_CAPI_Audio.h"
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include "OVR_Math.h"
#include <math.h>
#include <string.h>
#include <stdio.h>
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "pythread.h"
#include <stdlib.h>
#include "pystate.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#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);
#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;

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "psychxr\\libovr\\_libovr.pyx",
  "stringsource",
  "__init__.pxd",
  "type.pxd",
};
/* 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()

/* BufferFormatStructs.proto */
#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name;
  struct __Pyx_StructField_* fields;
  size_t size;
  size_t arraysize[8];
  int ndim;
  char typegroup;
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;

/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
  struct __pyx_memoryview_obj *memview;
  char *data;
  Py_ssize_t shape[8];
  Py_ssize_t strides[8];
  Py_ssize_t suboffsets[8];
} __Pyx_memviewslice;
#define __Pyx_MemoryView_Len(m)  (m.shape[0])

/* Atomics.proto */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __pyx_atomic_int_type int
#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
                    !defined(__i386__)
    #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
    #include <Windows.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type LONG
    #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
    #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
    #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
    #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using Intel atomics"
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif
typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
#if CYTHON_ATOMICS
    #define __pyx_add_acquisition_count(memview)\
             __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
#else
    #define __pyx_add_acquisition_count(memview)\
            __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif


/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);


/*--- Type declarations ---*/
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo;
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer;
struct __pyx_array_obj;
struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr;
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr;
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr;
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr;
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr;
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr;
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr;

/* "psychxr/libovr/_libovr.pyx":880
 * 
 *     @staticmethod
 *     cdef LibOVRPose fromPtr(capi.ovrPosef* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRPose wrapper = LibOVRPose.__new__(LibOVRPose)
 *         wrapper.c_data = ptr
 */
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr {
  int __pyx_n;
  int owner;
};

/* "psychxr/libovr/_libovr.pyx":2468
 * 
 *     @staticmethod
 *     cdef LibOVRPoseState fromPtr(capi.ovrPoseStatef* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRPoseState wrapper = LibOVRPoseState.__new__(LibOVRPoseState)
 */
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr {
  int __pyx_n;
  int owner;
};

/* "psychxr/libovr/_libovr.pyx":2764
 * 
 *     @staticmethod
 *     cdef LibOVRTrackingState fromPtr(capi.ovrTrackingState* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRTrackingState wrapper = \
 *             LibOVRTrackingState.__new__(LibOVRTrackingState)
 */
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr {
  int __pyx_n;
  int owner;
};

/* "psychxr/libovr/_libovr.pyx":2967
 * 
 *     @staticmethod
 *     cdef LibOVRBounds fromPtr(libovr_math.Bounds3f* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRBounds wrapper = LibOVRBounds.__new__(LibOVRBounds)
 *         wrapper.c_data = ptr
 */
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr {
  int __pyx_n;
  int owner;
};

/* "psychxr/libovr/_libovr.pyx":3258
 * 
 *     @staticmethod
 *     cdef LibOVRHmdInfo fromPtr(capi.ovrHmdDesc* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRHmdInfo wrapper = LibOVRHmdInfo.__new__(LibOVRHmdInfo)
 */
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr {
  int __pyx_n;
  int owner;
};

/* "psychxr/libovr/_libovr.pyx":3746
 * 
 *     @staticmethod
 *     cdef LibOVRPerfStatsPerCompositorFrame fromPtr(             # <<<<<<<<<<<<<<
 *             capi.ovrPerfStatsPerCompositorFrame* ptr, bint owner=False):
 *         cdef LibOVRPerfStatsPerCompositorFrame wrapper = \
 */
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr {
  int __pyx_n;
  int owner;
};

/* "psychxr/libovr/_libovr.pyx":3943
 * 
 *     @staticmethod
 *     cdef LibOVRPerfStats fromPtr(capi.ovrPerfStats* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRPerfStats wrapper = LibOVRPerfStats.__new__(LibOVRPerfStats)
 * 
 */
struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr {
  int __pyx_n;
  int owner;
};

/* "psychxr/libovr/_libovr.pyx":817
 * #
 * 
 * cdef class LibOVRPose(object):             # <<<<<<<<<<<<<<
 *     """Class for representing rigid body poses.
 * 
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose {
  PyObject_HEAD
  struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_vtab;
  ovrPosef *c_data;
  int ptr_owner;
  PyArrayObject *_pos;
  PyArrayObject *_ori;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *_bbox;
};


/* "psychxr/libovr/_libovr.pyx":2394
 * 
 * 
 * cdef class LibOVRPoseState(object):             # <<<<<<<<<<<<<<
 *     """Class for representing rigid body poses with additional state
 *     information.
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState {
  PyObject_HEAD
  struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_vtab;
  ovrPoseStatef *c_data;
  int ptr_owner;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *_thePose;
  PyArrayObject *_linearVelocity;
  PyArrayObject *_angularVelocity;
  PyArrayObject *_linearAcceleration;
  PyArrayObject *_angularAcceleration;
};


/* "psychxr/libovr/_libovr.pyx":2711
 * 
 * 
 * cdef class LibOVRTrackingState(object):             # <<<<<<<<<<<<<<
 *     """Class for tracking state information.
 * 
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState {
  PyObject_HEAD
  struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_vtab;
  ovrTrackingState *c_data;
  int ptr_owner;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *_headPoseState;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *_leftHandPoseState;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *_rightHandPoseState;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *_calibratedOrigin;
};


/* "psychxr/libovr/_libovr.pyx":2911
 * 
 * 
 * cdef class LibOVRBounds(object):             # <<<<<<<<<<<<<<
 *     """Class for constructing and representing 3D axis-aligned bounding boxes.
 * 
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds {
  PyObject_HEAD
  struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_vtab;
  OVR::Bounds3f *c_data;
  int ptr_owner;
  PyArrayObject *_mins;
  PyArrayObject *_maxs;
};


/* "psychxr/libovr/_libovr.pyx":3128
 * 
 * 
 * cdef class LibOVRTrackerInfo(object):             # <<<<<<<<<<<<<<
 *     """Class for storing tracker (sensor) information such as pose, status, and
 *     camera frustum information. This object is returned by calling
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo {
  PyObject_HEAD
  ovrTrackerPose c_ovrTrackerPose;
  ovrTrackerDesc c_ovrTrackerDesc;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *_pose;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *_leveledPose;
  unsigned int _trackerIndex;
};


/* "psychxr/libovr/_libovr.pyx":3223
 * 
 * 
 * cdef class LibOVRHmdInfo(object):             # <<<<<<<<<<<<<<
 *     """Class for general HMD information and capabilities. An instance of this
 *     class is returned by calling :func:`~psychxr.libovr.getHmdInfo`.
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo {
  PyObject_HEAD
  struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_vtab;
  ovrHmdDesc *c_data;
  int ptr_owner;
};


/* "psychxr/libovr/_libovr.pyx":3508
 * 
 * 
 * cdef class LibOVRSessionStatus(object):             # <<<<<<<<<<<<<<
 *     """Class for storing session status information. An instance of this class
 *     is returned when :func:`getSessionStatus` is called.
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus {
  PyObject_HEAD
  ovrSessionStatus c_data;
};


/* "psychxr/libovr/_libovr.pyx":3643
 * 
 * 
 * cdef class LibOVRBoundaryTestResult(object):             # <<<<<<<<<<<<<<
 *     """Class for boundary collision test data. An instance of this class is
 *     returned when :func:`testBoundary` is called.
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult {
  PyObject_HEAD
  ovrBoundaryTestResult c_data;
};


/* "psychxr/libovr/_libovr.pyx":3700
 * 
 * 
 * cdef class LibOVRPerfStatsPerCompositorFrame(object):             # <<<<<<<<<<<<<<
 *     """Class for frame performance statistics per compositor frame.
 * 
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame {
  PyObject_HEAD
  struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_vtab;
  ovrPerfStatsPerCompositorFrame *c_data;
  int ptr_owner;
};


/* "psychxr/libovr/_libovr.pyx":3910
 * 
 * 
 * cdef class LibOVRPerfStats(object):             # <<<<<<<<<<<<<<
 *     """Class for frame performance statistics.
 * 
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats {
  PyObject_HEAD
  struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_vtab;
  ovrPerfStats *c_data;
  int ptr_owner;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *compFrame0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *compFrame1;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *compFrame2;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *compFrame3;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *compFrame4;
};


/* "psychxr/libovr/_libovr.pyx":4064
 * 
 * 
 * cdef class LibOVRHapticsInfo(object):             # <<<<<<<<<<<<<<
 *     """Class for touch haptics engine information.
 * 
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo {
  PyObject_HEAD
  ovrTouchHapticsDesc c_data;
};


/* "psychxr/libovr/_libovr.pyx":4121
 * 
 * 
 * cdef class LibOVRHapticsBuffer(object):             # <<<<<<<<<<<<<<
 *     """Class for haptics buffer data for controller vibration.
 * 
 */
struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer {
  PyObject_HEAD
  ovrHapticsBuffer c_data;
  PyArrayObject *_samples;
};


/* "View.MemoryView":105
 * 
 * @cname("__pyx_array")
 * cdef class array:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_array_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_array *__pyx_vtab;
  char *data;
  Py_ssize_t len;
  char *format;
  int ndim;
  Py_ssize_t *_shape;
  Py_ssize_t *_strides;
  Py_ssize_t itemsize;
  PyObject *mode;
  PyObject *_format;
  void (*callback_free_data)(void *);
  int free_data;
  int dtype_is_object;
};


/* "View.MemoryView":279
 * 
 * @cname('__pyx_MemviewEnum')
 * cdef class Enum(object):             # <<<<<<<<<<<<<<
 *     cdef object name
 *     def __init__(self, name):
 */
struct __pyx_MemviewEnum_obj {
  PyObject_HEAD
  PyObject *name;
};


/* "View.MemoryView":330
 * 
 * @cname('__pyx_memoryview')
 * cdef class memoryview(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef object obj
 */
struct __pyx_memoryview_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
  PyObject *obj;
  PyObject *_size;
  PyObject *_array_interface;
  PyThread_type_lock lock;
  __pyx_atomic_int acquisition_count[2];
  __pyx_atomic_int *acquisition_count_aligned_p;
  Py_buffer view;
  int flags;
  int dtype_is_object;
  __Pyx_TypeInfo *typeinfo;
};


/* "View.MemoryView":961
 * 
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
 *     "Internal class for passing memoryview slices to Python"
 * 
 */
struct __pyx_memoryviewslice_obj {
  struct __pyx_memoryview_obj __pyx_base;
  __Pyx_memviewslice from_slice;
  PyObject *from_object;
  PyObject *(*to_object_func)(char *);
  int (*to_dtype_func)(char *, PyObject *);
};



/* "psychxr/libovr/_libovr.pyx":817
 * #
 * 
 * cdef class LibOVRPose(object):             # <<<<<<<<<<<<<<
 *     """Class for representing rigid body poses.
 * 
 */

struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPose {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *(*fromPtr)(ovrPosef *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr *__pyx_optional_args);
  void (*_new_struct)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *, PyObject *, PyObject *);
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose;


/* "psychxr/libovr/_libovr.pyx":2394
 * 
 * 
 * cdef class LibOVRPoseState(object):             # <<<<<<<<<<<<<<
 *     """Class for representing rigid body poses with additional state
 *     information.
 */

struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPoseState {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *(*fromPtr)(ovrPoseStatef *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr *__pyx_optional_args);
  void (*_new_struct)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, double);
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState;


/* "psychxr/libovr/_libovr.pyx":2711
 * 
 * 
 * cdef class LibOVRTrackingState(object):             # <<<<<<<<<<<<<<
 *     """Class for tracking state information.
 * 
 */

struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRTrackingState {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *(*fromPtr)(ovrTrackingState *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr *__pyx_optional_args);
  void (*_new_struct)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *);
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRTrackingState;


/* "psychxr/libovr/_libovr.pyx":2911
 * 
 * 
 * cdef class LibOVRBounds(object):             # <<<<<<<<<<<<<<
 *     """Class for constructing and representing 3D axis-aligned bounding boxes.
 * 
 */

struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRBounds {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *(*fromPtr)(OVR::Bounds3f *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr *__pyx_optional_args);
  void (*_new_struct)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *, PyObject *);
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRBounds;


/* "psychxr/libovr/_libovr.pyx":3223
 * 
 * 
 * cdef class LibOVRHmdInfo(object):             # <<<<<<<<<<<<<<
 *     """Class for general HMD information and capabilities. An instance of this
 *     class is returned by calling :func:`~psychxr.libovr.getHmdInfo`.
 */

struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRHmdInfo {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *(*fromPtr)(ovrHmdDesc *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr *__pyx_optional_args);
  void (*newStruct)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *);
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRHmdInfo;


/* "psychxr/libovr/_libovr.pyx":3700
 * 
 * 
 * cdef class LibOVRPerfStatsPerCompositorFrame(object):             # <<<<<<<<<<<<<<
 *     """Class for frame performance statistics per compositor frame.
 * 
 */

struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *(*fromPtr)(ovrPerfStatsPerCompositorFrame *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr *__pyx_optional_args);
  void (*_new_struct)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *);
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame;


/* "psychxr/libovr/_libovr.pyx":3910
 * 
 * 
 * cdef class LibOVRPerfStats(object):             # <<<<<<<<<<<<<<
 *     """Class for frame performance statistics.
 * 
 */

struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStats {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *(*fromPtr)(ovrPerfStats *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr *__pyx_optional_args);
  void (*_new_struct)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *);
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStats;


/* "View.MemoryView":105
 * 
 * @cname("__pyx_array")
 * cdef class array:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_array {
  PyObject *(*get_memview)(struct __pyx_array_obj *);
};
static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;


/* "View.MemoryView":330
 * 
 * @cname('__pyx_memoryview')
 * cdef class memoryview(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef object obj
 */

struct __pyx_vtabstruct_memoryview {
  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
};
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;


/* "View.MemoryView":961
 * 
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
 *     "Internal class for passing memoryview slices to Python"
 * 
 */

struct __pyx_vtabstruct__memoryviewslice {
  struct __pyx_vtabstruct_memoryview __pyx_base;
};
static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;

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

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

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

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

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

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

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

/* decode_c_string_utf16.proto */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

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

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

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

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

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

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

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

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

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

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

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

/* SliceObject.proto */
#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
    __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* IsLittleEndian.proto */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);

/* BufferFormatCheck.proto */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type);

/* BufferGetAndValidate.proto */
#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
    ((obj == Py_None || obj == NULL) ?\
    (__Pyx_ZeroBuffer(buf), 0) :\
    __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
static int  __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
    __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
static void __Pyx_ZeroBuffer(Py_buffer* buf);
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };

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

/* BufferFallbackError.proto */
static void __Pyx_RaiseBufferFallbackError(void);

/* BufferIndexError.proto */
static void __Pyx_RaiseBufferIndexError(int axis);

#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

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

/* MemviewSliceInit.proto */
#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
#define __Pyx_MEMVIEW_DIRECT   1
#define __Pyx_MEMVIEW_PTR      2
#define __Pyx_MEMVIEW_FULL     4
#define __Pyx_MEMVIEW_CONTIG   8
#define __Pyx_MEMVIEW_STRIDED  16
#define __Pyx_MEMVIEW_FOLLOW   32
#define __Pyx_IS_C_CONTIG 1
#define __Pyx_IS_F_CONTIG 2
static int __Pyx_init_memviewslice(
                struct __pyx_memoryview_obj *memview,
                int ndim,
                __Pyx_memviewslice *memviewslice,
                int memview_is_new_reference);
static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);

#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)
/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

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

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

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

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

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

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

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

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

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

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

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* None.proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);

/* UnaryNegOverflows.proto */
#define UNARY_NEG_WOULD_OVERFLOW(x)\
        (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))

static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

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

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

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

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

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

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

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

/* None.proto */
static CYTHON_INLINE long __Pyx_div_long(long, long);

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

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

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

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

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#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);

#if PY_MAJOR_VERSION < 3
    static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
    #define __Pyx_GetBuffer PyObject_GetBuffer
    #define __Pyx_ReleaseBuffer PyBuffer_Release
#endif


/* BufferStructDeclare.proto */
typedef struct {
  Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
  size_t refcount;
  Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
  __Pyx_Buffer *rcbuffer;
  char *data;
  __Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;

/* MemviewSliceIsContig.proto */
static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);

/* OverlappingSlices.proto */
static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
                                __Pyx_memviewslice *slice2,
                                int ndim, size_t itemsize);

/* Capsule.proto */
static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrButton(ovrButton value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTouch(ovrTouch value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrControllerType(ovrControllerType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrSuccessType(ovrSuccessType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrSuccessTypes(ovrSuccessTypes value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrErrorType(ovrErrorType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrEyeType(ovrEyeType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrHandType(ovrHandType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTextureFormat(ovrTextureFormat value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDeviceType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTrackingOrigin(ovrTrackingOrigin value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrStatusBits(ovrStatusBits value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHudMode value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrDebugHudStereoMode(ovrDebugHudStereoMode value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrBoundaryType(ovrBoundaryType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlags value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrHmdType(ovrHmdType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOptions value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrLogLevel(ovrLogLevel value);

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrBool(ovrBool value);

static PyObject* __pyx_convert__to_py_ovrSessionStatus(ovrSessionStatus s);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

/* RealImag.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);

/* MemviewSliceCopyTemplate.proto */
static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object);

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE ovrTrackedDeviceType __Pyx_PyInt_As_ovrTrackedDeviceType(PyObject *);

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

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

/* TypeInfoCompare.proto */
static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);

/* MemviewSliceValidateAndInit.proto */
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_float(PyObject *, int writable_flag);

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

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

static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_f_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr(ovrPosef *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr *__pyx_optional_args); /* proto*/
static void __pyx_f_7psychxr_6libovr_7_libovr_10LibOVRPose__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_ori); /* proto*/
static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr(ovrPoseStatef *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr *__pyx_optional_args); /* proto*/
static void __pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPoseState__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_pose, PyObject *__pyx_v_linearVelocity, PyObject *__pyx_v_angularVelocity, PyObject *__pyx_v_linearAcceleration, PyObject *__pyx_v_angularAcceleration, CYTHON_UNUSED double __pyx_v_timeInSeconds); /* proto*/
static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_f_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr(ovrTrackingState *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr *__pyx_optional_args); /* proto*/
static void __pyx_f_7psychxr_6libovr_7_libovr_19LibOVRTrackingState__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto*/
static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_f_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr(OVR::Bounds3f *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr *__pyx_optional_args); /* proto*/
static void __pyx_f_7psychxr_6libovr_7_libovr_12LibOVRBounds__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_extents); /* proto*/
static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_f_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr(ovrHmdDesc *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr *__pyx_optional_args); /* proto*/
static void __pyx_f_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_newStruct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto*/
static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_f_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr(ovrPerfStatsPerCompositorFrame *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr *__pyx_optional_args); /* proto*/
static void __pyx_f_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto*/
static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr(ovrPerfStats *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr *__pyx_optional_args); /* proto*/
static void __pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPerfStats__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/

/* Module declarations from 'psychxr.libovr' */

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

/* Module declarations from 'psychxr.libovr.libovr_capi' */
static CYTHON_INLINE int __pyx_f_7psychxr_6libovr_11libovr_capi_OVR_SUCCESS(ovrResult); /*proto*/
static CYTHON_INLINE int __pyx_f_7psychxr_6libovr_11libovr_capi_OVR_UNQUALIFIED_SUCCESS(ovrResult); /*proto*/
static CYTHON_INLINE int __pyx_f_7psychxr_6libovr_11libovr_capi_OVR_FAILURE(ovrResult); /*proto*/

/* Module declarations from 'libcpp' */

/* Module declarations from 'psychxr.libovr.libovr_math' */

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

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

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

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

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

/* Module declarations from '__builtin__' */

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

/* Module declarations from 'cpython' */

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

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

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/

/* Module declarations from 'psychxr.libovr._libovr' */
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPoseState = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRTrackingState = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRBounds = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHmdInfo = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRSessionStatus = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPerfStats = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo = 0;
static PyTypeObject *__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer = 0;
static PyTypeObject *__pyx_array_type = 0;
static PyTypeObject *__pyx_MemviewEnum_type = 0;
static PyTypeObject *__pyx_memoryview_type = 0;
static PyTypeObject *__pyx_memoryviewslice_type = 0;
static ovrInitParams __pyx_v_7psychxr_6libovr_7_libovr__initParams;
static ovrSession __pyx_v_7psychxr_6libovr_7_libovr__ptrSession;
static ovrGraphicsLuid __pyx_v_7psychxr_6libovr_7_libovr__gfxLuid;
static ovrHmdDesc __pyx_v_7psychxr_6libovr_7_libovr__hmdDesc;
static ovrBoundaryLookAndFeel __pyx_v_7psychxr_6libovr_7_libovr__boundaryStyle;
static ovrTextureSwapChain __pyx_v_7psychxr_6libovr_7_libovr__swapChains[16];
static ovrMirrorTexture __pyx_v_7psychxr_6libovr_7_libovr__mirrorTexture;
static ovrLayerEyeFov __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer;
static ovrPosef __pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[2];
static ovrEyeRenderDesc __pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[2];
static ovrSessionStatus __pyx_v_7psychxr_6libovr_7_libovr__sessionStatus;
static ovrInputState __pyx_v_7psychxr_6libovr_7_libovr__inputStates[9];
static ovrInputState __pyx_v_7psychxr_6libovr_7_libovr__prevInputState[9];
static OVR::Matrix4f __pyx_v_7psychxr_6libovr_7_libovr__eyeProjectionMatrix[2];
static OVR::Matrix4f __pyx_v_7psychxr_6libovr_7_libovr__eyeViewMatrix[2];
static OVR::Matrix4f __pyx_v_7psychxr_6libovr_7_libovr__eyeViewProjectionMatrix[2];
static ovrErrorInfo __pyx_v_7psychxr_6libovr_7_libovr__last_error_info_;
static npy_intp __pyx_v_7psychxr_6libovr_7_libovr_VEC2_SHAPE[1];
static npy_intp __pyx_v_7psychxr_6libovr_7_libovr_VEC3_SHAPE[1];
static npy_intp __pyx_v_7psychxr_6libovr_7_libovr_FOVPORT_SHAPE[1];
static npy_intp __pyx_v_7psychxr_6libovr_7_libovr_QUAT_SHAPE[1];
static PyObject *generic = 0;
static PyObject *strided = 0;
static PyObject *indirect = 0;
static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
static int __pyx_memoryview_thread_locks_used;
static PyThread_type_lock __pyx_memoryview_thread_locks[8];
static float __pyx_f_7psychxr_6libovr_7_libovr_maxf(float, float); /*proto*/
static PyObject *__pyx_f_7psychxr_6libovr_7_libovr_bytes2str(char *); /*proto*/
static void __pyx_f_7psychxr_6libovr_7_libovr_LibOVRLogCallback(uintptr_t, int, char *); /*proto*/
static PyArrayObject *__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray(ovrVector3f *); /*proto*/
static PyArrayObject *__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrQuatf_as_ndarray(ovrQuatf *); /*proto*/
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
static void *__pyx_align_pointer(void *, size_t); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
static PyObject *_unellipsify(PyObject *, int); /*proto*/
static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int_t = { "int_t", NULL, sizeof(__pyx_t_5numpy_int_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int_t), 0 };
#define __Pyx_MODULE_NAME "psychxr.libovr._libovr"
extern int __pyx_module_is_main_psychxr__libovr___libovr;
int __pyx_module_is_main_psychxr__libovr___libovr = 0;

/* Implementation of 'psychxr.libovr._libovr' */
static PyObject *__pyx_builtin_RuntimeWarning;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_Ellipsis;
static PyObject *__pyx_builtin_IndexError;
static const char __pyx_k_[] = ": ";
static const char __pyx_k_N[] = "N";
static const char __pyx_k_O[] = "O";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_v[] = "v";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_mv[] = "mv";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_px[] = "px";
static const char __pyx_k_py[] = "py";
static const char __pyx_k_pz[] = "pz";
static const char __pyx_k_rm[] = "rm";
static const char __pyx_k_rw[] = "rw";
static const char __pyx_k_rx[] = "rx";
static const char __pyx_k_ry[] = "ry";
static const char __pyx_k_rz[] = "rz";
static const char __pyx_k_up[] = "up";
static const char __pyx_k_MIT[] = "MIT";
static const char __pyx_k__42[] = "";
static const char __pyx_k_all[] = "__all__";
static const char __pyx_k_dir[] = "dir";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_eye[] = "eye";
static const char __pyx_k_fov[] = "fov";
static const char __pyx_k_idx[] = "idx";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_low[] = "low";
static const char __pyx_k_mvp[] = "mvp";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_off[] = "off";
static const char __pyx_k_ori[] = "ori";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_pos[] = "pos";
static const char __pyx_k_red[] = "red";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_axis[] = "axis";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_bbox[] = "bbox";
static const char __pyx_k_blue[] = "blue";
static const char __pyx_k_clip[] = "clip";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_fast[] = "fast";
static const char __pyx_k_freq[] = "freq";
static const char __pyx_k_high[] = "high";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_memo[] = "memo";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_ndim[] = "ndim";
static const char __pyx_k_pack[] = "pack";
static const char __pyx_k_pose[] = "pose";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_step[] = "step";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_warn[] = "warn";
static const char __pyx_k_0_2_2[] = "0.2.2";
static const char __pyx_k_ASCII[] = "ASCII";
static const char __pyx_k_UTF_8[] = "UTF-8";
static const char __pyx_k_angle[] = "angle";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_btype[] = "btype";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_clear[] = "clear";
static const char __pyx_k_color[] = "color";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_email[] = "__email__";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_getAt[] = "getAt";
static const char __pyx_k_getUp[] = "getUp";
static const char __pyx_k_green[] = "green";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_major[] = "major";
static const char __pyx_k_minor[] = "minor";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_t_sec[] = "t_sec";
static const char __pyx_k_touch[] = "touch";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_vecIn[] = "vecIn";
static const char __pyx_k_width[] = "width";
static const char __pyx_k_zeros[] = "zeros";
static const char __pyx_k_HMD_CB[] = "HMD_CB";
static const char __pyx_k_Stable[] = "Stable";
static const char __pyx_k_author[] = "__author__";
static const char __pyx_k_bounds[] = "bounds";
static const char __pyx_k_buffer[] = "buffer";
static const char __pyx_k_button[] = "button";
static const char __pyx_k_create[] = "create";
static const char __pyx_k_distVp[] = "distVp";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_fov_in[] = "fov_in";
static const char __pyx_k_getInt[] = "getInt";
static const char __pyx_k_height[] = "height";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_layers[] = "layers";
static const char __pyx_k_levels[] = "levels";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_points[] = "points";
static const char __pyx_k_posOri[] = "posOri";
static const char __pyx_k_radius[] = "radius";
static const char __pyx_k_rayDir[] = "rayDir";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_rising[] = "rising";
static const char __pyx_k_setInt[] = "setInt";
static const char __pyx_k_status[] = "__status__";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_tex_id[] = "tex_id";
static const char __pyx_k_unpack[] = "unpack";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_HMD_CV1[] = "HMD_CV1";
static const char __pyx_k_HMD_DK1[] = "HMD_DK1";
static const char __pyx_k_HMD_DK2[] = "HMD_DK2";
static const char __pyx_k_SUCCESS[] = "SUCCESS";
static const char __pyx_k_TOUCH_A[] = "TOUCH_A";
static const char __pyx_k_TOUCH_B[] = "TOUCH_B";
static const char __pyx_k_TOUCH_X[] = "TOUCH_X";
static const char __pyx_k_TOUCH_Y[] = "TOUCH_Y";
static const char __pyx_k_absTime[] = "absTime";
static const char __pyx_k_asarray[] = "asarray";
static const char __pyx_k_corners[] = "corners";
static const char __pyx_k_credits[] = "__credits__";
static const char __pyx_k_degrees[] = "degrees";
static const char __pyx_k_destroy[] = "destroy";
static const char __pyx_k_devices[] = "devices";
static const char __pyx_k_extents[] = "extents";
static const char __pyx_k_eyePose[] = "eyePose";
static const char __pyx_k_failure[] = "failure";
static const char __pyx_k_falling[] = "falling";
static const char __pyx_k_farClip[] = "farClip";
static const char __pyx_k_float32[] = "float32";
static const char __pyx_k_fortran[] = "fortran";
static const char __pyx_k_forward[] = "forward";
static const char __pyx_k_fovPort[] = "fovPort";
static const char __pyx_k_getBool[] = "getBool";
static const char __pyx_k_inverse[] = "inverse";
static const char __pyx_k_license[] = "__license__";
static const char __pyx_k_memview[] = "memview";
static const char __pyx_k_pressed[] = "pressed";
static const char __pyx_k_refPose[] = "refPose";
static const char __pyx_k_setBool[] = "setBool";
static const char __pyx_k_success[] = "success";
static const char __pyx_k_thePose[] = "thePose";
static const char __pyx_k_vec_out[] = "vec_out";
static const char __pyx_k_version[] = "__version__";
static const char __pyx_k_BUTTON_A[] = "BUTTON_A";
static const char __pyx_k_BUTTON_B[] = "BUTTON_B";
static const char __pyx_k_BUTTON_X[] = "BUTTON_X";
static const char __pyx_k_BUTTON_Y[] = "BUTTON_Y";
static const char __pyx_k_EYE_LEFT[] = "EYE_LEFT";
static const char __pyx_k_Ellipsis[] = "Ellipsis";
static const char __pyx_k_HMD_DKHD[] = "HMD_DKHD";
static const char __pyx_k_HMD_ES06[] = "HMD_ES06";
static const char __pyx_k_HMD_ES09[] = "HMD_ES09";
static const char __pyx_k_HMD_ES11[] = "HMD_ES11";
static const char __pyx_k_HMD_NONE[] = "HMD_NONE";
static const char __pyx_k_KEY_NAME[] = "KEY_NAME";
static const char __pyx_k_KEY_USER[] = "KEY_USER";
static const char __pyx_k_cullPose[] = "cullPose";
static const char __pyx_k_deadzone[] = "deadzone";
static const char __pyx_k_deepcopy[] = "__deepcopy__";
static const char __pyx_k_endFrame[] = "endFrame";
static const char __pyx_k_getFloat[] = "getFloat";
static const char __pyx_k_getTouch[] = "getTouch";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_headPose[] = "headPose";
static const char __pyx_k_inverted[] = "inverted";
static const char __pyx_k_itemsize[] = "itemsize";
static const char __pyx_k_maxRange[] = "maxRange";
static const char __pyx_k_nearClip[] = "nearClip";
static const char __pyx_k_outPoses[] = "outPoses";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_released[] = "released";
static const char __pyx_k_setFloat[] = "setFloat";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_shutdown[] = "shutdown";
static const char __pyx_k_tanAngle[] = "tanAngle";
static const char __pyx_k_thisPose[] = "thisPose";
static const char __pyx_k_toReturn[] = "toReturn";
static const char __pyx_k_value_in[] = "value_in";
static const char __pyx_k_warnings[] = "warnings";
static const char __pyx_k_BUTTON_UP[] = "BUTTON_UP";
static const char __pyx_k_EYE_COUNT[] = "EYE_COUNT";
static const char __pyx_k_EYE_RIGHT[] = "EYE_RIGHT";
static const char __pyx_k_HAND_LEFT[] = "HAND_LEFT";
static const char __pyx_k_HMD_OTHER[] = "HMD_OTHER";
static const char __pyx_k_HMD_RIFTS[] = "HMD_RIFTS";
static const char __pyx_k_IsVisible[] = "IsVisible";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_amplitude[] = "amplitude";
static const char __pyx_k_copyright[] = "__copyright__";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_frequency[] = "frequency";
static const char __pyx_k_getButton[] = "getButton";
static const char __pyx_k_getString[] = "getString";
static const char __pyx_k_isVisible[] = "isVisible";
static const char __pyx_k_mirror_id[] = "mirror_id";
static const char __pyx_k_newOrigin[] = "newOrigin";
static const char __pyx_k_originOri[] = "originOri";
static const char __pyx_k_originPos[] = "originPos";
static const char __pyx_k_outLength[] = "outLength";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_setString[] = "setString";
static const char __pyx_k_swapChain[] = "swapChain";
static const char __pyx_k_testState[] = "testState";
static const char __pyx_k_timeoutMs[] = "timeoutMs";
static const char __pyx_k_to_return[] = "to_return";
static const char __pyx_k_tolerance[] = "tolerance";
static const char __pyx_k_HAND_COUNT[] = "HAND_COUNT";
static const char __pyx_k_HAND_RIGHT[] = "HAND_RIGHT";
static const char __pyx_k_HmdMounted[] = "HmdMounted";
static const char __pyx_k_HmdPresent[] = "HmdPresent";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_KEY_GENDER[] = "KEY_GENDER";
static const char __pyx_k_LibOVRPose[] = "LibOVRPose";
static const char __pyx_k_ShouldQuit[] = "ShouldQuit";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_beginFrame[] = "beginFrame";
static const char __pyx_k_bufferSize[] = "bufferSize";
static const char __pyx_k_continuous[] = "continuous";
static const char __pyx_k_controller[] = "controller";
static const char __pyx_k_curButtons[] = "curButtons";
static const char __pyx_k_curTouches[] = "curTouches";
static const char __pyx_k_defaultVal[] = "defaultVal";
static const char __pyx_k_focusAware[] = "focusAware";
static const char __pyx_k_frameIndex[] = "frameIndex";
static const char __pyx_k_getHmdInfo[] = "getHmdInfo";
static const char __pyx_k_hmdMounted[] = "hmdMounted";
static const char __pyx_k_initialize[] = "initialize";
static const char __pyx_k_maintainer[] = "__maintainer__";
static const char __pyx_k_mirrorDesc[] = "mirrorDesc";
static const char __pyx_k_originPose[] = "originPose";
static const char __pyx_k_originType[] = "originType";
static const char __pyx_k_prvButtons[] = "prvButtons";
static const char __pyx_k_prvTouches[] = "prvTouches";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_shouldQuit[] = "shouldQuit";
static const char __pyx_k_swapConfig[] = "swapConfig";
static const char __pyx_k_targetPose[] = "targetPose";
static const char __pyx_k_testResult[] = "testResult";
static const char __pyx_k_test_point[] = "test_point";
static const char __pyx_k_use_marker[] = "use_marker";
static const char __pyx_k_BUTTON_BACK[] = "BUTTON_BACK";
static const char __pyx_k_BUTTON_DOWN[] = "BUTTON_DOWN";
static const char __pyx_k_BUTTON_HOME[] = "BUTTON_HOME";
static const char __pyx_k_BUTTON_LEFT[] = "BUTTON_LEFT";
static const char __pyx_k_DEG_TO_RADF[] = "DEG_TO_RADF";
static const char __pyx_k_DisplayLost[] = "DisplayLost";
static const char __pyx_k_HMD_E3_2015[] = "HMD_E3_2015";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_RAD_TO_DEGF[] = "RAD_TO_DEGF";
static const char __pyx_k_current_idx[] = "current_idx";
static const char __pyx_k_devicePoses[] = "devicePoses";
static const char __pyx_k_deviceTypes[] = "deviceTypes";
static const char __pyx_k_displayLost[] = "displayLost";
static const char __pyx_k_errorString[] = "errorString";
static const char __pyx_k_logCallback[] = "logCallback";
static const char __pyx_k_stateResult[] = "stateResult";
static const char __pyx_k_triggerLeft[] = "triggerLeft";
static const char __pyx_k_BUILD_NUMBER[] = "BUILD_NUMBER";
static const char __pyx_k_BUTTON_ENTER[] = "BUTTON_ENTER";
static const char __pyx_k_BUTTON_LMASK[] = "BUTTON_LMASK";
static const char __pyx_k_BUTTON_RIGHT[] = "BUTTON_RIGHT";
static const char __pyx_k_BUTTON_RMASK[] = "BUTTON_RMASK";
static const char __pyx_k_BUTTON_VOLUP[] = "BUTTON_VOLUP";
static const char __pyx_k_ERROR_NO_HMD[] = "ERROR_NO_HMD";
static const char __pyx_k_LibOVRBounds[] = "LibOVRBounds";
static const char __pyx_k_PERF_HUD_OFF[] = "PERF_HUD_OFF";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_TOUCH_LTHUMB[] = "TOUCH_LTHUMB";
static const char __pyx_k_TOUCH_RTHUMB[] = "TOUCH_RTHUMB";
static const char __pyx_k_boundaryType[] = "boundaryType";
static const char __pyx_k_calcEyePoses[] = "calcEyePoses";
static const char __pyx_k_check_result[] = "check_result";
static const char __pyx_k_getPerfStats[] = "getPerfStats";
static const char __pyx_k_hideBoundary[] = "hideBoundary";
static const char __pyx_k_isHeadLocked[] = "isHeadLocked";
static const char __pyx_k_propertyName[] = "propertyName";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_showBoundary[] = "showBoundary";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_testBoundary[] = "testBoundary";
static const char __pyx_k_trackerCount[] = "trackerCount";
static const char __pyx_k_trackerIndex[] = "trackerIndex";
static const char __pyx_k_triggerRight[] = "triggerRight";
static const char __pyx_k_BUTTON_LTHUMB[] = "BUTTON_LTHUMB";
static const char __pyx_k_BUTTON_RTHUMB[] = "BUTTON_RTHUMB";
static const char __pyx_k_ERROR_TIMEOUT[] = "ERROR_TIMEOUT";
static const char __pyx_k_HasInputFocus[] = "HasInputFocus";
static const char __pyx_k_LibOVRHmdInfo[] = "LibOVRHmdInfo";
static const char __pyx_k_MAJOR_VERSION[] = "MAJOR_VERSION";
static const char __pyx_k_MINOR_VERSION[] = "MINOR_VERSION";
static const char __pyx_k_PATCH_VERSION[] = "PATCH_VERSION";
static const char __pyx_k_PERF_HUD_MODE[] = "PERF_HUD_MODE";
static const char __pyx_k_deviceBitmask[] = "deviceBitmask";
static const char __pyx_k_getFloatArray[] = "getFloatArray";
static const char __pyx_k_hasInputFocus[] = "hasInputFocus";
static const char __pyx_k_hmdToEyePoses[] = "hmdToEyePoses";
static const char __pyx_k_lastErrorInfo[] = "lastErrorInfo";
static const char __pyx_k_latencyMarker[] = "latencyMarker";
static const char __pyx_k_mirrorOptions[] = "mirrorOptions";
static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_setFloatArray[] = "setFloatArray";
static const char __pyx_k_setHeadLocked[] = "setHeadLocked";
static const char __pyx_k_textureFormat[] = "textureFormat";
static const char __pyx_k_thumbstick_x0[] = "thumbstick_x0";
static const char __pyx_k_thumbstick_x1[] = "thumbstick_x1";
static const char __pyx_k_thumbstick_y0[] = "thumbstick_y0";
static const char __pyx_k_thumbstick_y1[] = "thumbstick_y1";
static const char __pyx_k_timeInSeconds[] = "timeInSeconds";
static const char __pyx_k_BOUNDARY_OUTER[] = "BOUNDARY_OUTER";
static const char __pyx_k_BUTTON_PRIVATE[] = "BUTTON_PRIVATE";
static const char __pyx_k_BUTTON_VOLDOWN[] = "BUTTON_VOLDOWN";
static const char __pyx_k_DEFAULT_GENDER[] = "DEFAULT_GENDER";
static const char __pyx_k_DepthRequested[] = "DepthRequested";
static const char __pyx_k_ERROR_LIB_LOAD[] = "ERROR_LIB_LOAD";
static const char __pyx_k_ERROR_LIB_PATH[] = "ERROR_LIB_PATH";
static const char __pyx_k_ERROR_OBSOLETE[] = "ERROR_OBSOLETE";
static const char __pyx_k_KEY_EYE_HEIGHT[] = "KEY_EYE_HEIGHT";
static const char __pyx_k_LAYER_HUD_MODE[] = "LAYER_HUD_MODE";
static const char __pyx_k_LOG_LEVEL_INFO[] = "LOG_LEVEL_INFO";
static const char __pyx_k_OverlayPresent[] = "OverlayPresent";
static const char __pyx_k_PERF_HUD_COUNT[] = "PERF_HUD_COUNT";
static const char __pyx_k_RuntimeWarning[] = "RuntimeWarning";
static const char __pyx_k_ShouldRecenter[] = "ShouldRecenter";
static const char __pyx_k_TOUCH_LTHUMBUP[] = "TOUCH_LTHUMBUP";
static const char __pyx_k_TOUCH_RTHUMBUP[] = "TOUCH_RTHUMBUP";
static const char __pyx_k_depthRequested[] = "depthRequested";
static const char __pyx_k_getDevicePoses[] = "getDevicePoses";
static const char __pyx_k_getHapticsInfo[] = "getHapticsInfo";
static const char __pyx_k_getTrackerInfo[] = "getTrackerInfo";
static const char __pyx_k_isHmdConnected[] = "isHmdConnected";
static const char __pyx_k_linearVelocity[] = "linearVelocity";
static const char __pyx_k_overlayPresent[] = "overlayPresent";
static const char __pyx_k_playback_state[] = "playback_state";
static const char __pyx_k_resetPerfStats[] = "resetPerfStats";
static const char __pyx_k_setHighQuality[] = "setHighQuality";
static const char __pyx_k_shouldRecenter[] = "shouldRecenter";
static const char __pyx_k_texelsPerPixel[] = "texelsPerPixel";
static const char __pyx_k_valuesCapacity[] = "valuesCapacity";
static const char __pyx_k_FEATURE_VERSION[] = "FEATURE_VERSION";
static const char __pyx_k_LOG_LEVEL_DEBUG[] = "LOG_LEVEL_DEBUG";
static const char __pyx_k_LOG_LEVEL_ERROR[] = "LOG_LEVEL_ERROR";
static const char __pyx_k_Laurie_M_Wilcox[] = "Laurie M. Wilcox";
static const char __pyx_k_LibOVRPerfStats[] = "LibOVRPerfStats";
static const char __pyx_k_LibOVRPoseState[] = "LibOVRPoseState";
static const char __pyx_k_PRODUCT_VERSION[] = "PRODUCT_VERSION";
static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
static const char __pyx_k_angularVelocity[] = "angularVelocity";
static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
static const char __pyx_k_getEyeRenderFov[] = "getEyeRenderFov";
static const char __pyx_k_getGraphicsLUID[] = "getGraphicsLUID";
static const char __pyx_k_getHmdToEyePose[] = "getHmdToEyePose";
static const char __pyx_k_getTrackerCount[] = "getTrackerCount";
static const char __pyx_k_horzPixelPerDeg[] = "horzPixelPerDeg";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setEyeRenderFov[] = "setEyeRenderFov";
static const char __pyx_k_setHmdToEyePose[] = "setHmdToEyePose";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_vertPixelPerDeg[] = "vertPixelPerDeg";
static const char __pyx_k_BUTTON_LSHOULDER[] = "BUTTON_LSHOULDER";
static const char __pyx_k_BUTTON_RSHOULDER[] = "BUTTON_RSHOULDER";
static const char __pyx_k_ERROR_DISALLOWED[] = "ERROR_DISALLOWED";
static const char __pyx_k_ERROR_INITIALIZE[] = "ERROR_INITIALIZE";
static const char __pyx_k_FORMAT_D16_UNORM[] = "FORMAT_D16_UNORM";
static const char __pyx_k_FORMAT_D32_FLOAT[] = "FORMAT_D32_FLOAT";
static const char __pyx_k_Matthew_D_Cutone[] = "Matthew D. Cutone";
static const char __pyx_k_TOUCH_LTHUMBREST[] = "TOUCH_LTHUMBREST";
static const char __pyx_k_TOUCH_RTHUMBREST[] = "TOUCH_RTHUMBREST";
static const char __pyx_k_cutonem_yorku_ca[] = "cutonem@yorku.ca";
static const char __pyx_k_getEyeRenderPose[] = "getEyeRenderPose";
static const char __pyx_k_getEyeViewMatrix[] = "getEyeViewMatrix";
static const char __pyx_k_getLastErrorInfo[] = "getLastErrorInfo";
static const char __pyx_k_getMirrorTexture[] = "getMirrorTexture";
static const char __pyx_k_getSessionStatus[] = "getSessionStatus";
static const char __pyx_k_getTrackingState[] = "getTrackingState";
static const char __pyx_k_setBoundaryColor[] = "setBoundaryColor";
static const char __pyx_k_setEyeRenderPose[] = "setEyeRenderPose";
static const char __pyx_k_updateInputState[] = "updateInputState";
static const char __pyx_k_waitToBeginFrame[] = "waitToBeginFrame";
static const char __pyx_k_ERROR_LIB_SYMBOLS[] = "ERROR_LIB_SYMBOLS";
static const char __pyx_k_ERROR_OLD_VERSION[] = "ERROR_OLD_VERSION";
static const char __pyx_k_ERROR_UNSUPPORTED[] = "ERROR_UNSUPPORTED";
static const char __pyx_k_KEY_PLAYER_HEIGHT[] = "KEY_PLAYER_HEIGHT";
static const char __pyx_k_LibOVRHapticsInfo[] = "LibOVRHapticsInfo";
static const char __pyx_k_LibOVRTrackerInfo[] = "LibOVRTrackerInfo";
static const char __pyx_k_calcEyeBufferSize[] = "calcEyeBufferSize";
static const char __pyx_k_connectionTimeout[] = "connectionTimeout";
static const char __pyx_k_currentInputState[] = "currentInputState";
static const char __pyx_k_getEyeAspectRatio[] = "getEyeAspectRatio";
static const char __pyx_k_getEyeFocalLength[] = "getEyeFocalLength";
static const char __pyx_k_pixelsPerTanAngle[] = "pixelsPerTanAngle";
static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
static const char __pyx_k_BOUNDARY_PLAY_AREA[] = "BOUNDARY_PLAY_AREA";
static const char __pyx_k_DEFAULT_EYE_HEIGHT[] = "DEFAULT_EYE_HEIGHT";
static const char __pyx_k_ERROR_DISPLAY_INIT[] = "ERROR_DISPLAY_INIT";
static const char __pyx_k_ERROR_DISPLAY_LOST[] = "ERROR_DISPLAY_LOST";
static const char __pyx_k_ERROR_SERVER_START[] = "ERROR_SERVER_START";
static const char __pyx_k_PERF_HUD_ASW_STATS[] = "PERF_HUD_ASW_STATS";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_getBoundaryVisible[] = "getBoundaryVisible";
static const char __pyx_k_getPixelsPerDegree[] = "getPixelsPerDegree";
static const char __pyx_k_linearAcceleration[] = "linearAcceleration";
static const char __pyx_k_previousInputState[] = "previousInputState";
static const char __pyx_k_resetBoundaryColor[] = "resetBoundaryColor";
static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
static const char __pyx_k_unqualifiedSuccess[] = "unqualifiedSuccess";
static const char __pyx_k_ERROR_LOST_TRACKING[] = "ERROR_LOST_TRACKING";
static const char __pyx_k_ERROR_SERVICE_ERROR[] = "ERROR_SERVICE_ERROR";
static const char __pyx_k_LibOVRHapticsBuffer[] = "LibOVRHapticsBuffer";
static const char __pyx_k_LibOVRSessionStatus[] = "LibOVRSessionStatus";
static const char __pyx_k_LibOVRTrackingState[] = "LibOVRTrackingState";
static const char __pyx_k_SUCCESS_NOT_VISIBLE[] = "SUCCESS_NOT_VISIBLE";
static const char __pyx_k_TEXTURE_SWAP_CHAIN0[] = "TEXTURE_SWAP_CHAIN0";
static const char __pyx_k_TEXTURE_SWAP_CHAIN1[] = "TEXTURE_SWAP_CHAIN1";
static const char __pyx_k_TEXTURE_SWAP_CHAIN2[] = "TEXTURE_SWAP_CHAIN2";
static const char __pyx_k_TEXTURE_SWAP_CHAIN3[] = "TEXTURE_SWAP_CHAIN3";
static const char __pyx_k_TEXTURE_SWAP_CHAIN4[] = "TEXTURE_SWAP_CHAIN4";
static const char __pyx_k_TEXTURE_SWAP_CHAIN5[] = "TEXTURE_SWAP_CHAIN5";
static const char __pyx_k_TEXTURE_SWAP_CHAIN6[] = "TEXTURE_SWAP_CHAIN6";
static const char __pyx_k_TEXTURE_SWAP_CHAIN7[] = "TEXTURE_SWAP_CHAIN7";
static const char __pyx_k_TEXTURE_SWAP_CHAIN8[] = "TEXTURE_SWAP_CHAIN8";
static const char __pyx_k_TEXTURE_SWAP_CHAIN9[] = "TEXTURE_SWAP_CHAIN9";
static const char __pyx_k_TOUCH_LINDEXTRIGGER[] = "TOUCH_LINDEXTRIGGER";
static const char __pyx_k_angularAcceleration[] = "angularAcceleration";
static const char __pyx_k_createMirrorTexture[] = "createMirrorTexture";
static const char __pyx_k_getLayerEyeFovFlags[] = "getLayerEyeFovFlags";
static const char __pyx_k_getSensorSampleTime[] = "getSensorSampleTime";
static const char __pyx_k_getThumbstickValues[] = "getThumbstickValues";
static const char __pyx_k_setLayerEyeFovFlags[] = "setLayerEyeFovFlags";
static const char __pyx_k_setSensorSampleTime[] = "setSensorSampleTime";
static const char __pyx_k_CONTROLLER_TYPE_NONE[] = "CONTROLLER_TYPE_NONE";
static const char __pyx_k_CONTROLLER_TYPE_XBOX[] = "CONTROLLER_TYPE_XBOX";
static const char __pyx_k_ERROR_CLIENT_VERSION[] = "ERROR_CLIENT_VERSION";
static const char __pyx_k_ERROR_LIB_SIGN_CHECK[] = "ERROR_LIB_SIGN_CHECK";
static const char __pyx_k_ERROR_NO_CALIBRATION[] = "ERROR_NO_CALIBRATION";
static const char __pyx_k_ERROR_OUT_OF_DATE_OS[] = "ERROR_OUT_OF_DATE_OS";
static const char __pyx_k_ERROR_REMOTE_SESSION[] = "ERROR_REMOTE_SESSION";
static const char __pyx_k_TEXTURE_SWAP_CHAIN10[] = "TEXTURE_SWAP_CHAIN10";
static const char __pyx_k_TEXTURE_SWAP_CHAIN11[] = "TEXTURE_SWAP_CHAIN11";
static const char __pyx_k_TEXTURE_SWAP_CHAIN12[] = "TEXTURE_SWAP_CHAIN12";
static const char __pyx_k_TEXTURE_SWAP_CHAIN13[] = "TEXTURE_SWAP_CHAIN13";
static const char __pyx_k_TEXTURE_SWAP_CHAIN14[] = "TEXTURE_SWAP_CHAIN14";
static const char __pyx_k_TEXTURE_SWAP_CHAIN15[] = "TEXTURE_SWAP_CHAIN15";
static const char __pyx_k_TOUCH_LINDEXPOINTING[] = "TOUCH_LINDEXPOINTING";
static const char __pyx_k_TOUCH_RINDEXPOINTING[] = "TOUCH_RINDEXPOINTING";
static const char __pyx_k_destroyMirrorTexture[] = "destroyMirrorTexture";
static const char __pyx_k_getDistortedViewport[] = "getDistortedViewport";
static const char __pyx_k_getEyeRenderViewport[] = "getEyeRenderViewport";
static const char __pyx_k_getHandTriggerValues[] = "getHandTriggerValues";
static const char __pyx_k_setEyeRenderViewport[] = "setEyeRenderViewport";
static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
static const char __pyx_k_CONTROLLER_TYPE_TOUCH[] = "CONTROLLER_TYPE_TOUCH";
static const char __pyx_k_DEBUG_HUD_STEREO_MODE[] = "DEBUG_HUD_STEREO_MODE";
static const char __pyx_k_DEFAULT_PLAYER_HEIGHT[] = "DEFAULT_PLAYER_HEIGHT";
static const char __pyx_k_ERROR_AUDIO_COM_ERROR[] = "ERROR_AUDIO_COM_ERROR";
static const char __pyx_k_ERROR_DISPLAY_REMOVED[] = "ERROR_DISPLAY_REMOVED";
static const char __pyx_k_ERROR_INCOMPATIBLE_OS[] = "ERROR_INCOMPATIBLE_OS";
static const char __pyx_k_ERROR_INVALID_SESSION[] = "ERROR_INVALID_SESSION";
static const char __pyx_k_ERROR_NOT_INITIALIZED[] = "ERROR_NOT_INITIALIZED";
static const char __pyx_k_ERROR_SERVICE_VERSION[] = "ERROR_SERVICE_VERSION";
static const char __pyx_k_FORMAT_R8G8B8A8_UNORM[] = "FORMAT_R8G8B8A8_UNORM";
static const char __pyx_k_MIRROR_OPTION_DEFAULT[] = "MIRROR_OPTION_DEFAULT";
static const char __pyx_k_PERF_HUD_PERF_SUMMARY[] = "PERF_HUD_PERF_SUMMARY";
static const char __pyx_k_PERF_HUD_VERSION_INFO[] = "PERF_HUD_VERSION_INFO";
static const char __pyx_k_STATUS_POSITION_VALID[] = "STATUS_POSITION_VALID";
static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
static const char __pyx_k_getBoundaryDimensions[] = "getBoundaryDimensions";
static const char __pyx_k_getIndexTriggerValues[] = "getIndexTriggerValues";
static const char __pyx_k_getTrackingOriginType[] = "getTrackingOriginType";
static const char __pyx_k_setTrackingOriginType[] = "setTrackingOriginType";
static const char __pyx_k_specifyTrackingOrigin[] = "specifyTrackingOrigin";
static const char __pyx_k_CONTROLLER_TYPE_LTOUCH[] = "CONTROLLER_TYPE_LTOUCH";
static const char __pyx_k_CONTROLLER_TYPE_REMOTE[] = "CONTROLLER_TYPE_REMOTE";
static const char __pyx_k_CONTROLLER_TYPE_RTOUCH[] = "CONTROLLER_TYPE_RTOUCH";
static const char __pyx_k_DLL_COMPATIBLE_VERSION[] = "DLL_COMPATIBLE_VERSION";
static const char __pyx_k_ERROR_REINITIALIZATION[] = "ERROR_REINITIALIZATION";
static const char __pyx_k_FORMAT_R11G11B10_FLOAT[] = "FORMAT_R11G11B10_FLOAT";
static const char __pyx_k_LAYER_FLAG_HEAD_LOCKED[] = "LAYER_FLAG_HEAD_LOCKED";
static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
static const char __pyx_k_commitTextureSwapChain[] = "commitTextureSwapChain";
static const char __pyx_k_getEyeProjectionMatrix[] = "getEyeProjectionMatrix";
static const char __pyx_k_isOculusServiceRunning[] = "isOculusServiceRunning";
static const char __pyx_k_psychxr_libovr__libovr[] = "psychxr.libovr._libovr";
static const char __pyx_k_recenterTrackingOrigin[] = "recenterTrackingOrigin";
static const char __pyx_k_setControllerVibration[] = "setControllerVibration";
static const char __pyx_k_CONTROLLER_TYPE_OBJECT0[] = "CONTROLLER_TYPE_OBJECT0";
static const char __pyx_k_CONTROLLER_TYPE_OBJECT1[] = "CONTROLLER_TYPE_OBJECT1";
static const char __pyx_k_CONTROLLER_TYPE_OBJECT2[] = "CONTROLLER_TYPE_OBJECT2";
static const char __pyx_k_CONTROLLER_TYPE_OBJECT3[] = "CONTROLLER_TYPE_OBJECT3";
static const char __pyx_k_ERROR_INITIALIZE_VULKAN[] = "ERROR_INITIALIZE_VULKAN";
static const char __pyx_k_ERROR_INVALID_OPERATION[] = "ERROR_INVALID_OPERATION";
static const char __pyx_k_ERROR_INVALID_PARAMETER[] = "ERROR_INVALID_PARAMETER";
static const char __pyx_k_ERROR_LEAKING_RESOURCES[] = "ERROR_LEAKING_RESOURCES";
static const char __pyx_k_ERROR_RUNTIME_EXCEPTION[] = "ERROR_RUNTIME_EXCEPTION";
static const char __pyx_k_LAYER_FLAG_HIGH_QUALITY[] = "LAYER_FLAG_HIGH_QUALITY";
static const char __pyx_k_LAYER_HUD_CURRENT_LAYER[] = "LAYER_HUD_CURRENT_LAYER";
static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
static const char __pyx_k_PERF_HUD_LATENCY_TIMING[] = "PERF_HUD_LATENCY_TIMING";
static const char __pyx_k_STATUS_POSITION_TRACKED[] = "STATUS_POSITION_TRACKED";
static const char __pyx_k_TRACKED_DEVICE_TYPE_HMD[] = "TRACKED_DEVICE_TYPE_HMD";
static const char __pyx_k_clearShouldRecenterFlag[] = "clearShouldRecenterFlag";
static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
static const char __pyx_k_destroyTextureSwapChain[] = "destroyTextureSwapChain";
static const char __pyx_k_getPredictedDisplayTime[] = "getPredictedDisplayTime";
static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
static const char __pyx_k_ERROR_DEVICE_UNAVAILABLE[] = "ERROR_DEVICE_UNAVAILABLE";
static const char __pyx_k_ERROR_MISFORMATTED_BLOCK[] = "ERROR_MISFORMATTED_BLOCK";
static const char __pyx_k_ERROR_SERVICE_CONNECTION[] = "ERROR_SERVICE_CONNECTION";
static const char __pyx_k_FORMAT_D24_UNORM_S8_UINT[] = "FORMAT_D24_UNORM_S8_UINT";
static const char __pyx_k_KEY_EYE_TO_NOSE_DISTANCE[] = "KEY_EYE_TO_NOSE_DISTANCE";
static const char __pyx_k_KEY_NECK_TO_EYE_DISTANCE[] = "KEY_NECK_TO_EYE_DISTANCE";
static const char __pyx_k_LibOVRBoundaryTestResult[] = "LibOVRBoundaryTestResult";
static const char __pyx_k_MAX_PROVIDED_FRAME_STATS[] = "MAX_PROVIDED_FRAME_STATS";
static const char __pyx_k_STATUS_ORIENTATION_VALID[] = "STATUS_ORIENTATION_VALID";
static const char __pyx_k_SUCCESS_BOUNDARY_INVALID[] = "SUCCESS_BOUNDARY_INVALID";
static const char __pyx_k_TEXTURE_SWAP_CHAIN_COUNT[] = "TEXTURE_SWAP_CHAIN_COUNT";
static const char __pyx_k_createTextureSwapChainGL[] = "createTextureSwapChainGL";
static const char __pyx_k_getEyeVerticalFovRadians[] = "getEyeVerticalFovRadians";
static const char __pyx_k_DEBUG_HUD_STEREO_MODE_OFF[] = "DEBUG_HUD_STEREO_MODE_OFF";
static const char __pyx_k_ERROR_APPLICATION_VISIBLE[] = "ERROR_APPLICATION_VISIBLE";
static const char __pyx_k_ERROR_MISMATCHED_ADAPTERS[] = "ERROR_MISMATCHED_ADAPTERS";
static const char __pyx_k_ERROR_TRACKER_DRIVER_INIT[] = "ERROR_TRACKER_DRIVER_INIT";
static const char __pyx_k_FORMAT_R16G16B16A16_FLOAT[] = "FORMAT_R16G16B16A16_FLOAT";
static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
static const char __pyx_k_LAYER_HUD_SHOW_ALL_LAYERS[] = "LAYER_HUD_SHOW_ALL_LAYERS";
static const char __pyx_k_TRACKED_DEVICE_TYPE_TOUCH[] = "TRACKED_DEVICE_TYPE_TOUCH";
static const char __pyx_k_TRACKING_ORIGIN_EYE_LEVEL[] = "TRACKING_ORIGIN_EYE_LEVEL";
static const char __pyx_k_submitControllerVibration[] = "submitControllerVibration";
static const char __pyx_k_DEBUG_HUD_STEREO_MODE_QUAD[] = "DEBUG_HUD_STEREO_MODE_QUAD";
static const char __pyx_k_ERROR_DISPLAY_MANAGER_INIT[] = "ERROR_DISPLAY_MANAGER_INIT";
static const char __pyx_k_FORMAT_R8G8B8A8_UNORM_SRGB[] = "FORMAT_R8G8B8A8_UNORM_SRGB";
static const char __pyx_k_HAPTICS_BUFFER_SAMPLES_MAX[] = "HAPTICS_BUFFER_SAMPLES_MAX";
static const char __pyx_k_PERF_HUD_APP_RENDER_TIMING[] = "PERF_HUD_APP_RENDER_TIMING";
static const char __pyx_k_STATUS_ORIENTATION_TRACKED[] = "STATUS_ORIENTATION_TRACKED";
static const char __pyx_k_SUCCESS_DEVICE_UNAVAILABLE[] = "SUCCESS_DEVICE_UNAVAILABLE";
static const char __pyx_k_TRACKED_DEVICE_TYPE_LTOUCH[] = "TRACKED_DEVICE_TYPE_LTOUCH";
static const char __pyx_k_TRACKED_DEVICE_TYPE_RTOUCH[] = "TRACKED_DEVICE_TYPE_RTOUCH";
static const char __pyx_k_getControllerPlaybackState[] = "getControllerPlaybackState";
static const char __pyx_k_getEyeHorizontalFovRadians[] = "getEyeHorizontalFovRadians";
static const char __pyx_k_psychxr_libovr__libovr_pyx[] = "psychxr\\libovr\\_libovr.pyx";
static const char __pyx_k_DEBUG_HUD_STEREO_GUIDE_SIZE[] = "DEBUG_HUD_STEREO_GUIDE_SIZE";
static const char __pyx_k_ERROR_DISPLAY_LIMIT_REACHED[] = "ERROR_DISPLAY_LIMIT_REACHED";
static const char __pyx_k_ERROR_GRAPHICS_DEVICE_RESET[] = "ERROR_GRAPHICS_DEVICE_RESET";
static const char __pyx_k_Invalid_frequency_specified[] = "Invalid frequency specified.";
static const char __pyx_k_MIRROR_OPTION_LEFT_EYE_ONLY[] = "MIRROR_OPTION_LEFT_EYE_ONLY";
static const char __pyx_k_PERF_HUD_COMP_RENDER_TIMING[] = "PERF_HUD_COMP_RENDER_TIMING";
static const char __pyx_k_TRACKED_DEVICE_TYPE_OBJECT0[] = "TRACKED_DEVICE_TYPE_OBJECT0";
static const char __pyx_k_TRACKED_DEVICE_TYPE_OBJECT1[] = "TRACKED_DEVICE_TYPE_OBJECT1";
static const char __pyx_k_TRACKED_DEVICE_TYPE_OBJECT2[] = "TRACKED_DEVICE_TYPE_OBJECT2";
static const char __pyx_k_TRACKED_DEVICE_TYPE_OBJECT3[] = "TRACKED_DEVICE_TYPE_OBJECT3";
static const char __pyx_k_TRACKING_ORIGIN_FLOOR_LEVEL[] = "TRACKING_ORIGIN_FLOOR_LEVEL";
static const char __pyx_k_getConnectedControllerTypes[] = "getConnectedControllerTypes";
static const char __pyx_k_getTextureSwapChainBufferGL[] = "getTextureSwapChainBufferGL";
static const char __pyx_k_getTextureSwapChainLengthGL[] = "getTextureSwapChainLengthGL";
static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
static const char __pyx_k_setEyeColorTextureSwapChain[] = "setEyeColorTextureSwapChain";
static const char __pyx_k_DEBUG_HUD_STEREO_GUIDE_COLOR[] = "DEBUG_HUD_STEREO_GUIDE_COLOR";
static const char __pyx_k_DEFAULT_NECK_TO_EYE_VERTICAL[] = "DEFAULT_NECK_TO_EYE_VERTICAL";
static const char __pyx_k_ERROR_AUDIO_DEVICE_NOT_FOUND[] = "ERROR_AUDIO_DEVICE_NOT_FOUND";
static const char __pyx_k_ERROR_BLACKLISTED_GFX_DRIVER[] = "ERROR_BLACKLISTED_GFX_DRIVER";
static const char __pyx_k_ERROR_CLIENT_SKIPPED_DESTROY[] = "ERROR_CLIENT_SKIPPED_DESTROY";
static const char __pyx_k_ERROR_INSUFFICENT_ARRAY_SIZE[] = "ERROR_INSUFFICENT_ARRAY_SIZE";
static const char __pyx_k_ERROR_OUT_OF_DATE_GFX_DRIVER[] = "ERROR_OUT_OF_DATE_GFX_DRIVER";
static const char __pyx_k_MIRROR_OPTION_RIGHT_EYE_ONLY[] = "MIRROR_OPTION_RIGHT_EYE_ONLY";
static const char __pyx_k_getPixelsPerTanAngleAtCenter[] = "getPixelsPerTanAngleAtCenter";
static const char __pyx_k_getTanAngleToRenderTargetNDC[] = "getTanAngleToRenderTargetNDC";
static const char __pyx_k_ERROR_CLIENT_SKIPPED_SHUTDOWN[] = "ERROR_CLIENT_SKIPPED_SHUTDOWN";
static const char __pyx_k_ERROR_NO_EXTERNAL_CAMERA_INFO[] = "ERROR_NO_EXTERNAL_CAMERA_INFO";
static const char __pyx_k_ERROR_TEXTURE_SWAP_CHAIN_FULL[] = "ERROR_TEXTURE_SWAP_CHAIN_FULL";
static const char __pyx_k_MIN_REQUESTABLE_MINOR_VERSION[] = "MIN_REQUESTABLE_MINOR_VERSION";
static const char __pyx_k_MIRROR_OPTION_POST_DISTORTION[] = "MIRROR_OPTION_POST_DISTORTION";
static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
static const char __pyx_k_DEFAULT_NECK_TO_EYE_HORIZONTAL[] = "DEFAULT_NECK_TO_EYE_HORIZONTAL";
static const char __pyx_k_Invalid_trigger_mode_specified[] = "Invalid trigger mode specified.";
static const char __pyx_k_MIRROR_OPTION_INCLUDE_GUARDIAN[] = "MIRROR_OPTION_INCLUDE_GUARDIAN";
static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
static const char __pyx_k_Copyright_2019_Matthew_D_Cutone[] = "Copyright 2019 Matthew D. Cutone";
static const char __pyx_k_DEBUG_HUD_STEREO_GUIDE_POSITION[] = "DEBUG_HUD_STEREO_GUIDE_POSITION";
static const char __pyx_k_DEBUG_HUD_STEREO_MODE_CROSSHAIR[] = "DEBUG_HUD_STEREO_MODE_CROSSHAIR_AT_INFINITY";
static const char __pyx_k_DEBUG_HUD_STEREO_MODE_QUAD_WITH[] = "DEBUG_HUD_STEREO_MODE_QUAD_WITH_CROSSHAIR";
static const char __pyx_k_ERROR_MEMORY_ALLOCATION_FAILURE[] = "ERROR_MEMORY_ALLOCATION_FAILURE";
static const char __pyx_k_ERROR_SERVICE_DEADLOCK_DETECTED[] = "ERROR_SERVICE_DEADLOCK_DETECTED";
static const char __pyx_k_Invalid_boundary_type_specified[] = "Invalid boundary type specified.";
static const char __pyx_k_LibOVRPose_px_py_pz_rx_ry_rz_rw[] = "LibOVRPose(({px}, {py}, {pz}), ({rx}, {ry}, {rz}, {rw}))";
static const char __pyx_k_PsychXR_was_built_using_version[] = "PsychXR was built using version {major}.{minor} of the Oculus PC SDK however 1.40 is recommended. This might be perfectly fine if there aren't any API breaking changes.";
static const char __pyx_k_getTextureSwapChainCurrentIndex[] = "getTextureSwapChainCurrentIndex";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
static const char __pyx_k_Array_has_invalid_number_of_dime[] = "Array has invalid number of dimensions, must be 1.";
static const char __pyx_k_Array_too_large_must_have_length[] = "Array too large, must have length < HAPTICS_BUFFER_SAMPLES_MAX";
static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
static const char __pyx_k_Cannot_get_buffer_ID_NULL_eye_bu[] = "Cannot get buffer ID, NULL eye buffer texture.";
static const char __pyx_k_Cannot_get_swap_chain_length_NUL[] = "Cannot get swap chain length, NULL eye buffer texture.";
static const char __pyx_k_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB[] = "DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE";
static const char __pyx_k_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR[] = "DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL";
static const char __pyx_k_Default_value_must_be_type_str_o[] = "Default value must be type 'str' or 'bytes'.";
static const char __pyx_k_ERROR_CONTENT_PROTECTION_NOT_AVA[] = "ERROR_CONTENT_PROTECTION_NOT_AVAILABLE";
static const char __pyx_k_ERROR_DISABLED_OR_DEFAULT_ADAPTE[] = "ERROR_DISABLED_OR_DEFAULT_ADAPTER";
static const char __pyx_k_ERROR_DISPLAY_PLUGGED_INCORRECTY[] = "ERROR_DISPLAY_PLUGGED_INCORRECTY";
static const char __pyx_k_ERROR_EXTERNAL_CAMERA_CAPTURE_FA[] = "ERROR_EXTERNAL_CAMERA_CAPTURE_FAILED";
static const char __pyx_k_ERROR_EXTERNAL_CAMERA_INITIALIZE[] = "ERROR_EXTERNAL_CAMERA_INITIALIZED_FAILED";
static const char __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS[] = "ERROR_EXTERNAL_CAMERA_NAME_LISTS_BUFFER_SIZE";
static const char __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_WRONG[] = "ERROR_EXTERNAL_CAMERA_NAME_WRONG_SIZE";
static const char __pyx_k_ERROR_EXTERNAL_CAMERA_NOT_CALIBR[] = "ERROR_EXTERNAL_CAMERA_NOT_CALIBRATED";
static const char __pyx_k_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR[] = "ERROR_HYBRID_GRAPHICS_NOT_SUPPORTED";
static const char __pyx_k_ERROR_INVALID_HEADSET_ORIENTATIO[] = "ERROR_INVALID_HEADSET_ORIENTATION";
static const char __pyx_k_ERROR_NO_VALID_VR_DISPLAY_SYSTEM[] = "ERROR_NO_VALID_VR_DISPLAY_SYSTEM";
static const char __pyx_k_ERROR_TEXTURE_SWAP_CHAIN_INVALID[] = "ERROR_TEXTURE_SWAP_CHAIN_INVALID";
static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
static const char __pyx_k_Failed_to_allocate_array_deviceP[] = "Failed to allocate array 'devicePoses'.";
static const char __pyx_k_Failed_to_allocate_array_devices[] = "Failed to allocate array 'devices'.";
static const char __pyx_k_Failed_to_allocate_ovrPosef_in_t[] = "Failed to allocate 'ovrPosef' in 'timeIntegrate'.";
static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
static const char __pyx_k_Interpolation_factor_must_be_bet[] = "Interpolation factor must be between 0.0 and 1.0.";
static const char __pyx_k_Invalid_controller_type_specifie[] = "Invalid controller type specified.";
static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
static const char __pyx_k_Invalid_tracking_origin_type_spe[] = "Invalid tracking origin type specified must be 'TRACKING_ORIGIN_FLOOR_LEVEL' or 'TRACKING_ORIGIN_EYE_LEVEL'.";
static const char __pyx_k_Invalid_value_for_pose_must_be_L[] = "Invalid value for `pose`, must be `LibOVRPose`, `list` or `tuple`.";
static const char __pyx_k_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT[] = "LAYER_FLAG_TEXTURE_ORIGIN_AT_BOTTOM_LEFT";
static const char __pyx_k_LibOVRPerfStatsPerCompositorFram[] = "LibOVRPerfStatsPerCompositorFrame";
static const char __pyx_k_MIRROR_OPTION_FORCE_SYMMETRIC_FO[] = "MIRROR_OPTION_FORCE_SYMMETRIC_FOV";
static const char __pyx_k_MIRROR_OPTION_INCLUDE_NOTIFICATI[] = "MIRROR_OPTION_INCLUDE_NOTIFICATIONS";
static const char __pyx_k_MIRROR_OPTION_INCLUDE_SYSTEM_GUI[] = "MIRROR_OPTION_INCLUDE_SYSTEM_GUI";
static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
static const char __pyx_k_Swap_chain_TEXTURE_SWAP_CHAIN_al[] = "Swap chain TEXTURE_SWAP_CHAIN{} already initialized!";
static const char __pyx_k_This_extension_module_exposes_th[] = "This extension module exposes the LibOVR API to Python using the official,\nproprietary Oculus PC SDK.\n\nThis extension module makes use of the official Oculus PC SDK. A C/C++ interface\nfor tracking, rendering, and VR math for Oculus products. The Oculus PC SDK is\nCopyright (c) Facebook Technologies, LLC and its affiliates. All rights\nreserved. You must accept the 'EULA', 'Terms of Use' and 'Privacy Policy'\nassociated with the Oculus PC SDK to use this module in your software (which you\ndid when you downloaded the SDK to build this module, didn't ya?), if not see\nhttps://www.oculus.com/legal/terms-of-service/ to access those documents.\n\n";
static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
static const char __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2[] = "ERROR_EXTERNAL_CAMERA_NAME_LISTS_MISMATCH";
static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
static PyObject *__pyx_kp_u_;
static PyObject *__pyx_kp_u_0_2_2;
static PyObject *__pyx_n_s_ASCII;
static PyObject *__pyx_kp_u_Array_has_invalid_number_of_dime;
static PyObject *__pyx_kp_u_Array_too_large_must_have_length;
static PyObject *__pyx_n_s_BOUNDARY_OUTER;
static PyObject *__pyx_n_u_BOUNDARY_OUTER;
static PyObject *__pyx_n_s_BOUNDARY_PLAY_AREA;
static PyObject *__pyx_n_u_BOUNDARY_PLAY_AREA;
static PyObject *__pyx_n_s_BUILD_NUMBER;
static PyObject *__pyx_n_u_BUILD_NUMBER;
static PyObject *__pyx_n_s_BUTTON_A;
static PyObject *__pyx_n_u_BUTTON_A;
static PyObject *__pyx_n_s_BUTTON_B;
static PyObject *__pyx_n_u_BUTTON_B;
static PyObject *__pyx_n_s_BUTTON_BACK;
static PyObject *__pyx_n_u_BUTTON_BACK;
static PyObject *__pyx_n_s_BUTTON_DOWN;
static PyObject *__pyx_n_u_BUTTON_DOWN;
static PyObject *__pyx_n_s_BUTTON_ENTER;
static PyObject *__pyx_n_u_BUTTON_ENTER;
static PyObject *__pyx_n_s_BUTTON_HOME;
static PyObject *__pyx_n_u_BUTTON_HOME;
static PyObject *__pyx_n_s_BUTTON_LEFT;
static PyObject *__pyx_n_u_BUTTON_LEFT;
static PyObject *__pyx_n_s_BUTTON_LMASK;
static PyObject *__pyx_n_u_BUTTON_LMASK;
static PyObject *__pyx_n_s_BUTTON_LSHOULDER;
static PyObject *__pyx_n_u_BUTTON_LSHOULDER;
static PyObject *__pyx_n_s_BUTTON_LTHUMB;
static PyObject *__pyx_n_u_BUTTON_LTHUMB;
static PyObject *__pyx_n_s_BUTTON_PRIVATE;
static PyObject *__pyx_n_u_BUTTON_PRIVATE;
static PyObject *__pyx_n_s_BUTTON_RIGHT;
static PyObject *__pyx_n_u_BUTTON_RIGHT;
static PyObject *__pyx_n_s_BUTTON_RMASK;
static PyObject *__pyx_n_u_BUTTON_RMASK;
static PyObject *__pyx_n_s_BUTTON_RSHOULDER;
static PyObject *__pyx_n_u_BUTTON_RSHOULDER;
static PyObject *__pyx_n_s_BUTTON_RTHUMB;
static PyObject *__pyx_n_u_BUTTON_RTHUMB;
static PyObject *__pyx_n_s_BUTTON_UP;
static PyObject *__pyx_n_u_BUTTON_UP;
static PyObject *__pyx_n_s_BUTTON_VOLDOWN;
static PyObject *__pyx_n_u_BUTTON_VOLDOWN;
static PyObject *__pyx_n_s_BUTTON_VOLUP;
static PyObject *__pyx_n_u_BUTTON_VOLUP;
static PyObject *__pyx_n_s_BUTTON_X;
static PyObject *__pyx_n_u_BUTTON_X;
static PyObject *__pyx_n_s_BUTTON_Y;
static PyObject *__pyx_n_u_BUTTON_Y;
static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_LTOUCH;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_LTOUCH;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_NONE;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_OBJECT0;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_OBJECT0;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_OBJECT1;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_OBJECT1;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_OBJECT2;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_OBJECT2;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_OBJECT3;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_OBJECT3;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_REMOTE;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_REMOTE;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_RTOUCH;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_RTOUCH;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_TOUCH;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_TOUCH;
static PyObject *__pyx_n_s_CONTROLLER_TYPE_XBOX;
static PyObject *__pyx_n_u_CONTROLLER_TYPE_XBOX;
static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
static PyObject *__pyx_kp_u_Cannot_get_buffer_ID_NULL_eye_bu;
static PyObject *__pyx_kp_u_Cannot_get_swap_chain_length_NUL;
static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
static PyObject *__pyx_kp_u_Copyright_2019_Matthew_D_Cutone;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_COLOR;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_COLOR;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_POSITION;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_POSITION;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_SIZE;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_SIZE;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_MODE;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_MODE;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_MODE_CROSSHAIR;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_MODE_CROSSHAIR;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_MODE_OFF;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_MODE_OFF;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_MODE_QUAD;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD;
static PyObject *__pyx_n_s_DEBUG_HUD_STEREO_MODE_QUAD_WITH;
static PyObject *__pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD_WITH;
static PyObject *__pyx_n_s_DEFAULT_EYE_HEIGHT;
static PyObject *__pyx_n_u_DEFAULT_EYE_HEIGHT;
static PyObject *__pyx_n_s_DEFAULT_GENDER;
static PyObject *__pyx_n_u_DEFAULT_GENDER;
static PyObject *__pyx_n_s_DEFAULT_NECK_TO_EYE_HORIZONTAL;
static PyObject *__pyx_n_u_DEFAULT_NECK_TO_EYE_HORIZONTAL;
static PyObject *__pyx_n_s_DEFAULT_NECK_TO_EYE_VERTICAL;
static PyObject *__pyx_n_u_DEFAULT_NECK_TO_EYE_VERTICAL;
static PyObject *__pyx_n_s_DEFAULT_PLAYER_HEIGHT;
static PyObject *__pyx_n_u_DEFAULT_PLAYER_HEIGHT;
static PyObject *__pyx_n_s_DEG_TO_RADF;
static PyObject *__pyx_n_s_DLL_COMPATIBLE_VERSION;
static PyObject *__pyx_n_u_DLL_COMPATIBLE_VERSION;
static PyObject *__pyx_kp_u_Default_value_must_be_type_str_o;
static PyObject *__pyx_n_s_DepthRequested;
static PyObject *__pyx_n_s_DisplayLost;
static PyObject *__pyx_n_s_ERROR_APPLICATION_VISIBLE;
static PyObject *__pyx_n_u_ERROR_APPLICATION_VISIBLE;
static PyObject *__pyx_n_s_ERROR_AUDIO_COM_ERROR;
static PyObject *__pyx_n_u_ERROR_AUDIO_COM_ERROR;
static PyObject *__pyx_n_s_ERROR_AUDIO_DEVICE_NOT_FOUND;
static PyObject *__pyx_n_u_ERROR_AUDIO_DEVICE_NOT_FOUND;
static PyObject *__pyx_n_s_ERROR_BLACKLISTED_GFX_DRIVER;
static PyObject *__pyx_n_u_ERROR_BLACKLISTED_GFX_DRIVER;
static PyObject *__pyx_n_s_ERROR_CLIENT_SKIPPED_DESTROY;
static PyObject *__pyx_n_u_ERROR_CLIENT_SKIPPED_DESTROY;
static PyObject *__pyx_n_s_ERROR_CLIENT_SKIPPED_SHUTDOWN;
static PyObject *__pyx_n_u_ERROR_CLIENT_SKIPPED_SHUTDOWN;
static PyObject *__pyx_n_s_ERROR_CLIENT_VERSION;
static PyObject *__pyx_n_u_ERROR_CLIENT_VERSION;
static PyObject *__pyx_n_s_ERROR_CONTENT_PROTECTION_NOT_AVA;
static PyObject *__pyx_n_u_ERROR_CONTENT_PROTECTION_NOT_AVA;
static PyObject *__pyx_n_s_ERROR_DEVICE_UNAVAILABLE;
static PyObject *__pyx_n_u_ERROR_DEVICE_UNAVAILABLE;
static PyObject *__pyx_n_s_ERROR_DISABLED_OR_DEFAULT_ADAPTE;
static PyObject *__pyx_n_u_ERROR_DISABLED_OR_DEFAULT_ADAPTE;
static PyObject *__pyx_n_s_ERROR_DISALLOWED;
static PyObject *__pyx_n_u_ERROR_DISALLOWED;
static PyObject *__pyx_n_s_ERROR_DISPLAY_INIT;
static PyObject *__pyx_n_u_ERROR_DISPLAY_INIT;
static PyObject *__pyx_n_s_ERROR_DISPLAY_LIMIT_REACHED;
static PyObject *__pyx_n_u_ERROR_DISPLAY_LIMIT_REACHED;
static PyObject *__pyx_n_s_ERROR_DISPLAY_LOST;
static PyObject *__pyx_n_u_ERROR_DISPLAY_LOST;
static PyObject *__pyx_n_s_ERROR_DISPLAY_MANAGER_INIT;
static PyObject *__pyx_n_u_ERROR_DISPLAY_MANAGER_INIT;
static PyObject *__pyx_n_s_ERROR_DISPLAY_PLUGGED_INCORRECTY;
static PyObject *__pyx_n_u_ERROR_DISPLAY_PLUGGED_INCORRECTY;
static PyObject *__pyx_n_s_ERROR_DISPLAY_REMOVED;
static PyObject *__pyx_n_u_ERROR_DISPLAY_REMOVED;
static PyObject *__pyx_n_s_ERROR_EXTERNAL_CAMERA_CAPTURE_FA;
static PyObject *__pyx_n_u_ERROR_EXTERNAL_CAMERA_CAPTURE_FA;
static PyObject *__pyx_n_s_ERROR_EXTERNAL_CAMERA_INITIALIZE;
static PyObject *__pyx_n_u_ERROR_EXTERNAL_CAMERA_INITIALIZE;
static PyObject *__pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_LISTS;
static PyObject *__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS;
static PyObject *__pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2;
static PyObject *__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2;
static PyObject *__pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_WRONG;
static PyObject *__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_WRONG;
static PyObject *__pyx_n_s_ERROR_EXTERNAL_CAMERA_NOT_CALIBR;
static PyObject *__pyx_n_u_ERROR_EXTERNAL_CAMERA_NOT_CALIBR;
static PyObject *__pyx_n_s_ERROR_GRAPHICS_DEVICE_RESET;
static PyObject *__pyx_n_u_ERROR_GRAPHICS_DEVICE_RESET;
static PyObject *__pyx_n_s_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR;
static PyObject *__pyx_n_u_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR;
static PyObject *__pyx_n_s_ERROR_INCOMPATIBLE_OS;
static PyObject *__pyx_n_u_ERROR_INCOMPATIBLE_OS;
static PyObject *__pyx_n_s_ERROR_INITIALIZE;
static PyObject *__pyx_n_u_ERROR_INITIALIZE;
static PyObject *__pyx_n_s_ERROR_INITIALIZE_VULKAN;
static PyObject *__pyx_n_u_ERROR_INITIALIZE_VULKAN;
static PyObject *__pyx_n_s_ERROR_INSUFFICENT_ARRAY_SIZE;
static PyObject *__pyx_n_u_ERROR_INSUFFICENT_ARRAY_SIZE;
static PyObject *__pyx_n_s_ERROR_INVALID_HEADSET_ORIENTATIO;
static PyObject *__pyx_n_u_ERROR_INVALID_HEADSET_ORIENTATIO;
static PyObject *__pyx_n_s_ERROR_INVALID_OPERATION;
static PyObject *__pyx_n_s_ERROR_INVALID_PARAMETER;
static PyObject *__pyx_n_u_ERROR_INVALID_PARAMETER;
static PyObject *__pyx_n_s_ERROR_INVALID_SESSION;
static PyObject *__pyx_n_u_ERROR_INVALID_SESSION;
static PyObject *__pyx_n_s_ERROR_LEAKING_RESOURCES;
static PyObject *__pyx_n_u_ERROR_LEAKING_RESOURCES;
static PyObject *__pyx_n_s_ERROR_LIB_LOAD;
static PyObject *__pyx_n_u_ERROR_LIB_LOAD;
static PyObject *__pyx_n_s_ERROR_LIB_PATH;
static PyObject *__pyx_n_u_ERROR_LIB_PATH;
static PyObject *__pyx_n_s_ERROR_LIB_SIGN_CHECK;
static PyObject *__pyx_n_u_ERROR_LIB_SIGN_CHECK;
static PyObject *__pyx_n_s_ERROR_LIB_SYMBOLS;
static PyObject *__pyx_n_u_ERROR_LIB_SYMBOLS;
static PyObject *__pyx_n_s_ERROR_LOST_TRACKING;
static PyObject *__pyx_n_u_ERROR_LOST_TRACKING;
static PyObject *__pyx_n_s_ERROR_MEMORY_ALLOCATION_FAILURE;
static PyObject *__pyx_n_u_ERROR_MEMORY_ALLOCATION_FAILURE;
static PyObject *__pyx_n_s_ERROR_MISFORMATTED_BLOCK;
static PyObject *__pyx_n_u_ERROR_MISFORMATTED_BLOCK;
static PyObject *__pyx_n_s_ERROR_MISMATCHED_ADAPTERS;
static PyObject *__pyx_n_u_ERROR_MISMATCHED_ADAPTERS;
static PyObject *__pyx_n_s_ERROR_NOT_INITIALIZED;
static PyObject *__pyx_n_u_ERROR_NOT_INITIALIZED;
static PyObject *__pyx_n_s_ERROR_NO_CALIBRATION;
static PyObject *__pyx_n_u_ERROR_NO_CALIBRATION;
static PyObject *__pyx_n_s_ERROR_NO_EXTERNAL_CAMERA_INFO;
static PyObject *__pyx_n_u_ERROR_NO_EXTERNAL_CAMERA_INFO;
static PyObject *__pyx_n_s_ERROR_NO_HMD;
static PyObject *__pyx_n_u_ERROR_NO_HMD;
static PyObject *__pyx_n_s_ERROR_NO_VALID_VR_DISPLAY_SYSTEM;
static PyObject *__pyx_n_u_ERROR_NO_VALID_VR_DISPLAY_SYSTEM;
static PyObject *__pyx_n_s_ERROR_OBSOLETE;
static PyObject *__pyx_n_u_ERROR_OBSOLETE;
static PyObject *__pyx_n_s_ERROR_OLD_VERSION;
static PyObject *__pyx_n_u_ERROR_OLD_VERSION;
static PyObject *__pyx_n_s_ERROR_OUT_OF_DATE_GFX_DRIVER;
static PyObject *__pyx_n_u_ERROR_OUT_OF_DATE_GFX_DRIVER;
static PyObject *__pyx_n_s_ERROR_OUT_OF_DATE_OS;
static PyObject *__pyx_n_u_ERROR_OUT_OF_DATE_OS;
static PyObject *__pyx_n_s_ERROR_REINITIALIZATION;
static PyObject *__pyx_n_u_ERROR_REINITIALIZATION;
static PyObject *__pyx_n_s_ERROR_REMOTE_SESSION;
static PyObject *__pyx_n_u_ERROR_REMOTE_SESSION;
static PyObject *__pyx_n_s_ERROR_RUNTIME_EXCEPTION;
static PyObject *__pyx_n_u_ERROR_RUNTIME_EXCEPTION;
static PyObject *__pyx_n_s_ERROR_SERVER_START;
static PyObject *__pyx_n_u_ERROR_SERVER_START;
static PyObject *__pyx_n_s_ERROR_SERVICE_CONNECTION;
static PyObject *__pyx_n_u_ERROR_SERVICE_CONNECTION;
static PyObject *__pyx_n_s_ERROR_SERVICE_DEADLOCK_DETECTED;
static PyObject *__pyx_n_u_ERROR_SERVICE_DEADLOCK_DETECTED;
static PyObject *__pyx_n_s_ERROR_SERVICE_ERROR;
static PyObject *__pyx_n_u_ERROR_SERVICE_ERROR;
static PyObject *__pyx_n_s_ERROR_SERVICE_VERSION;
static PyObject *__pyx_n_u_ERROR_SERVICE_VERSION;
static PyObject *__pyx_n_s_ERROR_TEXTURE_SWAP_CHAIN_FULL;
static PyObject *__pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_FULL;
static PyObject *__pyx_n_s_ERROR_TEXTURE_SWAP_CHAIN_INVALID;
static PyObject *__pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_INVALID;
static PyObject *__pyx_n_s_ERROR_TIMEOUT;
static PyObject *__pyx_n_u_ERROR_TIMEOUT;
static PyObject *__pyx_n_s_ERROR_TRACKER_DRIVER_INIT;
static PyObject *__pyx_n_u_ERROR_TRACKER_DRIVER_INIT;
static PyObject *__pyx_n_s_ERROR_UNSUPPORTED;
static PyObject *__pyx_n_u_ERROR_UNSUPPORTED;
static PyObject *__pyx_n_s_EYE_COUNT;
static PyObject *__pyx_n_u_EYE_COUNT;
static PyObject *__pyx_n_s_EYE_LEFT;
static PyObject *__pyx_n_u_EYE_LEFT;
static PyObject *__pyx_n_s_EYE_RIGHT;
static PyObject *__pyx_n_u_EYE_RIGHT;
static PyObject *__pyx_n_s_Ellipsis;
static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
static PyObject *__pyx_n_s_FEATURE_VERSION;
static PyObject *__pyx_n_u_FEATURE_VERSION;
static PyObject *__pyx_n_s_FORMAT_D16_UNORM;
static PyObject *__pyx_n_u_FORMAT_D16_UNORM;
static PyObject *__pyx_n_s_FORMAT_D24_UNORM_S8_UINT;
static PyObject *__pyx_n_u_FORMAT_D24_UNORM_S8_UINT;
static PyObject *__pyx_n_s_FORMAT_D32_FLOAT;
static PyObject *__pyx_n_u_FORMAT_D32_FLOAT;
static PyObject *__pyx_n_s_FORMAT_R11G11B10_FLOAT;
static PyObject *__pyx_n_u_FORMAT_R11G11B10_FLOAT;
static PyObject *__pyx_n_s_FORMAT_R16G16B16A16_FLOAT;
static PyObject *__pyx_n_u_FORMAT_R16G16B16A16_FLOAT;
static PyObject *__pyx_n_s_FORMAT_R8G8B8A8_UNORM;
static PyObject *__pyx_n_u_FORMAT_R8G8B8A8_UNORM;
static PyObject *__pyx_n_s_FORMAT_R8G8B8A8_UNORM_SRGB;
static PyObject *__pyx_n_u_FORMAT_R8G8B8A8_UNORM_SRGB;
static PyObject *__pyx_kp_u_Failed_to_allocate_array_deviceP;
static PyObject *__pyx_kp_u_Failed_to_allocate_array_devices;
static PyObject *__pyx_kp_u_Failed_to_allocate_ovrPosef_in_t;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
static PyObject *__pyx_n_s_HAND_COUNT;
static PyObject *__pyx_n_u_HAND_COUNT;
static PyObject *__pyx_n_s_HAND_LEFT;
static PyObject *__pyx_n_u_HAND_LEFT;
static PyObject *__pyx_n_s_HAND_RIGHT;
static PyObject *__pyx_n_u_HAND_RIGHT;
static PyObject *__pyx_n_s_HAPTICS_BUFFER_SAMPLES_MAX;
static PyObject *__pyx_n_u_HAPTICS_BUFFER_SAMPLES_MAX;
static PyObject *__pyx_n_s_HMD_CB;
static PyObject *__pyx_n_u_HMD_CB;
static PyObject *__pyx_n_s_HMD_CV1;
static PyObject *__pyx_n_u_HMD_CV1;
static PyObject *__pyx_n_s_HMD_DK1;
static PyObject *__pyx_n_u_HMD_DK1;
static PyObject *__pyx_n_s_HMD_DK2;
static PyObject *__pyx_n_u_HMD_DK2;
static PyObject *__pyx_n_s_HMD_DKHD;
static PyObject *__pyx_n_u_HMD_DKHD;
static PyObject *__pyx_n_s_HMD_E3_2015;
static PyObject *__pyx_n_u_HMD_E3_2015;
static PyObject *__pyx_n_s_HMD_ES06;
static PyObject *__pyx_n_u_HMD_ES06;
static PyObject *__pyx_n_s_HMD_ES09;
static PyObject *__pyx_n_u_HMD_ES09;
static PyObject *__pyx_n_s_HMD_ES11;
static PyObject *__pyx_n_u_HMD_ES11;
static PyObject *__pyx_n_s_HMD_NONE;
static PyObject *__pyx_n_u_HMD_NONE;
static PyObject *__pyx_n_s_HMD_OTHER;
static PyObject *__pyx_n_u_HMD_OTHER;
static PyObject *__pyx_n_s_HMD_RIFTS;
static PyObject *__pyx_n_u_HMD_RIFTS;
static PyObject *__pyx_n_s_HasInputFocus;
static PyObject *__pyx_n_s_HmdMounted;
static PyObject *__pyx_n_s_HmdPresent;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
static PyObject *__pyx_kp_u_Interpolation_factor_must_be_bet;
static PyObject *__pyx_kp_u_Invalid_boundary_type_specified;
static PyObject *__pyx_kp_u_Invalid_controller_type_specifie;
static PyObject *__pyx_kp_u_Invalid_frequency_specified;
static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
static PyObject *__pyx_kp_u_Invalid_tracking_origin_type_spe;
static PyObject *__pyx_kp_u_Invalid_trigger_mode_specified;
static PyObject *__pyx_kp_u_Invalid_value_for_pose_must_be_L;
static PyObject *__pyx_n_s_IsVisible;
static PyObject *__pyx_n_s_KEY_EYE_HEIGHT;
static PyObject *__pyx_n_u_KEY_EYE_HEIGHT;
static PyObject *__pyx_n_s_KEY_EYE_TO_NOSE_DISTANCE;
static PyObject *__pyx_n_u_KEY_EYE_TO_NOSE_DISTANCE;
static PyObject *__pyx_n_s_KEY_GENDER;
static PyObject *__pyx_n_u_KEY_GENDER;
static PyObject *__pyx_n_s_KEY_NAME;
static PyObject *__pyx_n_u_KEY_NAME;
static PyObject *__pyx_n_s_KEY_NECK_TO_EYE_DISTANCE;
static PyObject *__pyx_n_u_KEY_NECK_TO_EYE_DISTANCE;
static PyObject *__pyx_n_s_KEY_PLAYER_HEIGHT;
static PyObject *__pyx_n_u_KEY_PLAYER_HEIGHT;
static PyObject *__pyx_n_s_KEY_USER;
static PyObject *__pyx_n_u_KEY_USER;
static PyObject *__pyx_n_s_LAYER_FLAG_HEAD_LOCKED;
static PyObject *__pyx_n_u_LAYER_FLAG_HEAD_LOCKED;
static PyObject *__pyx_n_s_LAYER_FLAG_HIGH_QUALITY;
static PyObject *__pyx_n_u_LAYER_FLAG_HIGH_QUALITY;
static PyObject *__pyx_n_s_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT;
static PyObject *__pyx_n_u_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT;
static PyObject *__pyx_n_s_LAYER_HUD_CURRENT_LAYER;
static PyObject *__pyx_n_s_LAYER_HUD_MODE;
static PyObject *__pyx_n_s_LAYER_HUD_SHOW_ALL_LAYERS;
static PyObject *__pyx_n_s_LOG_LEVEL_DEBUG;
static PyObject *__pyx_n_u_LOG_LEVEL_DEBUG;
static PyObject *__pyx_n_s_LOG_LEVEL_ERROR;
static PyObject *__pyx_n_u_LOG_LEVEL_ERROR;
static PyObject *__pyx_n_s_LOG_LEVEL_INFO;
static PyObject *__pyx_n_u_LOG_LEVEL_INFO;
static PyObject *__pyx_kp_u_Laurie_M_Wilcox;
static PyObject *__pyx_n_s_LibOVRBoundaryTestResult;
static PyObject *__pyx_n_u_LibOVRBoundaryTestResult;
static PyObject *__pyx_n_s_LibOVRBounds;
static PyObject *__pyx_n_u_LibOVRBounds;
static PyObject *__pyx_n_s_LibOVRHapticsBuffer;
static PyObject *__pyx_n_u_LibOVRHapticsBuffer;
static PyObject *__pyx_n_s_LibOVRHapticsInfo;
static PyObject *__pyx_n_u_LibOVRHapticsInfo;
static PyObject *__pyx_n_s_LibOVRHmdInfo;
static PyObject *__pyx_n_u_LibOVRHmdInfo;
static PyObject *__pyx_n_s_LibOVRPerfStats;
static PyObject *__pyx_n_u_LibOVRPerfStats;
static PyObject *__pyx_n_s_LibOVRPerfStatsPerCompositorFram;
static PyObject *__pyx_n_u_LibOVRPerfStatsPerCompositorFram;
static PyObject *__pyx_n_s_LibOVRPose;
static PyObject *__pyx_n_u_LibOVRPose;
static PyObject *__pyx_n_s_LibOVRPoseState;
static PyObject *__pyx_n_u_LibOVRPoseState;
static PyObject *__pyx_kp_u_LibOVRPose_px_py_pz_rx_ry_rz_rw;
static PyObject *__pyx_n_s_LibOVRSessionStatus;
static PyObject *__pyx_n_u_LibOVRSessionStatus;
static PyObject *__pyx_n_s_LibOVRTrackerInfo;
static PyObject *__pyx_n_u_LibOVRTrackerInfo;
static PyObject *__pyx_n_s_LibOVRTrackingState;
static PyObject *__pyx_n_u_LibOVRTrackingState;
static PyObject *__pyx_n_s_MAJOR_VERSION;
static PyObject *__pyx_n_u_MAJOR_VERSION;
static PyObject *__pyx_n_s_MAX_PROVIDED_FRAME_STATS;
static PyObject *__pyx_n_u_MAX_PROVIDED_FRAME_STATS;
static PyObject *__pyx_n_s_MINOR_VERSION;
static PyObject *__pyx_n_u_MINOR_VERSION;
static PyObject *__pyx_n_s_MIN_REQUESTABLE_MINOR_VERSION;
static PyObject *__pyx_n_u_MIN_REQUESTABLE_MINOR_VERSION;
static PyObject *__pyx_n_s_MIRROR_OPTION_DEFAULT;
static PyObject *__pyx_n_u_MIRROR_OPTION_DEFAULT;
static PyObject *__pyx_n_s_MIRROR_OPTION_FORCE_SYMMETRIC_FO;
static PyObject *__pyx_n_u_MIRROR_OPTION_FORCE_SYMMETRIC_FO;
static PyObject *__pyx_n_s_MIRROR_OPTION_INCLUDE_GUARDIAN;
static PyObject *__pyx_n_u_MIRROR_OPTION_INCLUDE_GUARDIAN;
static PyObject *__pyx_n_s_MIRROR_OPTION_INCLUDE_NOTIFICATI;
static PyObject *__pyx_n_u_MIRROR_OPTION_INCLUDE_NOTIFICATI;
static PyObject *__pyx_n_s_MIRROR_OPTION_INCLUDE_SYSTEM_GUI;
static PyObject *__pyx_n_u_MIRROR_OPTION_INCLUDE_SYSTEM_GUI;
static PyObject *__pyx_n_s_MIRROR_OPTION_LEFT_EYE_ONLY;
static PyObject *__pyx_n_u_MIRROR_OPTION_LEFT_EYE_ONLY;
static PyObject *__pyx_n_s_MIRROR_OPTION_POST_DISTORTION;
static PyObject *__pyx_n_u_MIRROR_OPTION_POST_DISTORTION;
static PyObject *__pyx_n_s_MIRROR_OPTION_RIGHT_EYE_ONLY;
static PyObject *__pyx_n_u_MIRROR_OPTION_RIGHT_EYE_ONLY;
static PyObject *__pyx_n_u_MIT;
static PyObject *__pyx_kp_u_Matthew_D_Cutone;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
static PyObject *__pyx_kp_s_MemoryView_of_r_object;
static PyObject *__pyx_n_s_N;
static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
static PyObject *__pyx_n_b_O;
static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
static PyObject *__pyx_n_s_OverlayPresent;
static PyObject *__pyx_n_s_PATCH_VERSION;
static PyObject *__pyx_n_u_PATCH_VERSION;
static PyObject *__pyx_n_s_PERF_HUD_APP_RENDER_TIMING;
static PyObject *__pyx_n_u_PERF_HUD_APP_RENDER_TIMING;
static PyObject *__pyx_n_s_PERF_HUD_ASW_STATS;
static PyObject *__pyx_n_u_PERF_HUD_ASW_STATS;
static PyObject *__pyx_n_s_PERF_HUD_COMP_RENDER_TIMING;
static PyObject *__pyx_n_u_PERF_HUD_COMP_RENDER_TIMING;
static PyObject *__pyx_n_s_PERF_HUD_COUNT;
static PyObject *__pyx_n_s_PERF_HUD_LATENCY_TIMING;
static PyObject *__pyx_n_u_PERF_HUD_LATENCY_TIMING;
static PyObject *__pyx_n_s_PERF_HUD_MODE;
static PyObject *__pyx_n_u_PERF_HUD_MODE;
static PyObject *__pyx_n_s_PERF_HUD_OFF;
static PyObject *__pyx_n_u_PERF_HUD_OFF;
static PyObject *__pyx_n_s_PERF_HUD_PERF_SUMMARY;
static PyObject *__pyx_n_u_PERF_HUD_PERF_SUMMARY;
static PyObject *__pyx_n_s_PERF_HUD_VERSION_INFO;
static PyObject *__pyx_n_u_PERF_HUD_VERSION_INFO;
static PyObject *__pyx_n_s_PRODUCT_VERSION;
static PyObject *__pyx_n_u_PRODUCT_VERSION;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_kp_u_PsychXR_was_built_using_version;
static PyObject *__pyx_n_s_RAD_TO_DEGF;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_RuntimeWarning;
static PyObject *__pyx_n_s_STATUS_ORIENTATION_TRACKED;
static PyObject *__pyx_n_u_STATUS_ORIENTATION_TRACKED;
static PyObject *__pyx_n_s_STATUS_ORIENTATION_VALID;
static PyObject *__pyx_n_u_STATUS_ORIENTATION_VALID;
static PyObject *__pyx_n_s_STATUS_POSITION_TRACKED;
static PyObject *__pyx_n_u_STATUS_POSITION_TRACKED;
static PyObject *__pyx_n_s_STATUS_POSITION_VALID;
static PyObject *__pyx_n_u_STATUS_POSITION_VALID;
static PyObject *__pyx_n_s_SUCCESS;
static PyObject *__pyx_n_u_SUCCESS;
static PyObject *__pyx_n_s_SUCCESS_BOUNDARY_INVALID;
static PyObject *__pyx_n_u_SUCCESS_BOUNDARY_INVALID;
static PyObject *__pyx_n_s_SUCCESS_DEVICE_UNAVAILABLE;
static PyObject *__pyx_n_u_SUCCESS_DEVICE_UNAVAILABLE;
static PyObject *__pyx_n_s_SUCCESS_NOT_VISIBLE;
static PyObject *__pyx_n_u_SUCCESS_NOT_VISIBLE;
static PyObject *__pyx_n_s_ShouldQuit;
static PyObject *__pyx_n_s_ShouldRecenter;
static PyObject *__pyx_n_u_Stable;
static PyObject *__pyx_kp_u_Swap_chain_TEXTURE_SWAP_CHAIN_al;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN0;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN0;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN1;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN1;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN10;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN10;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN11;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN11;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN12;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN12;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN13;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN13;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN14;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN14;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN15;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN15;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN2;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN2;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN3;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN3;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN4;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN4;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN5;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN5;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN6;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN6;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN7;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN7;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN8;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN8;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN9;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN9;
static PyObject *__pyx_n_s_TEXTURE_SWAP_CHAIN_COUNT;
static PyObject *__pyx_n_u_TEXTURE_SWAP_CHAIN_COUNT;
static PyObject *__pyx_n_s_TOUCH_A;
static PyObject *__pyx_n_u_TOUCH_A;
static PyObject *__pyx_n_s_TOUCH_B;
static PyObject *__pyx_n_u_TOUCH_B;
static PyObject *__pyx_n_s_TOUCH_LINDEXPOINTING;
static PyObject *__pyx_n_u_TOUCH_LINDEXPOINTING;
static PyObject *__pyx_n_s_TOUCH_LINDEXTRIGGER;
static PyObject *__pyx_n_u_TOUCH_LINDEXTRIGGER;
static PyObject *__pyx_n_s_TOUCH_LTHUMB;
static PyObject *__pyx_n_u_TOUCH_LTHUMB;
static PyObject *__pyx_n_s_TOUCH_LTHUMBREST;
static PyObject *__pyx_n_u_TOUCH_LTHUMBREST;
static PyObject *__pyx_n_s_TOUCH_LTHUMBUP;
static PyObject *__pyx_n_u_TOUCH_LTHUMBUP;
static PyObject *__pyx_n_s_TOUCH_RINDEXPOINTING;
static PyObject *__pyx_n_u_TOUCH_RINDEXPOINTING;
static PyObject *__pyx_n_s_TOUCH_RTHUMB;
static PyObject *__pyx_n_u_TOUCH_RTHUMB;
static PyObject *__pyx_n_s_TOUCH_RTHUMBREST;
static PyObject *__pyx_n_u_TOUCH_RTHUMBREST;
static PyObject *__pyx_n_s_TOUCH_RTHUMBUP;
static PyObject *__pyx_n_u_TOUCH_RTHUMBUP;
static PyObject *__pyx_n_s_TOUCH_X;
static PyObject *__pyx_n_u_TOUCH_X;
static PyObject *__pyx_n_s_TOUCH_Y;
static PyObject *__pyx_n_u_TOUCH_Y;
static PyObject *__pyx_n_s_TRACKED_DEVICE_TYPE_HMD;
static PyObject *__pyx_n_u_TRACKED_DEVICE_TYPE_HMD;
static PyObject *__pyx_n_s_TRACKED_DEVICE_TYPE_LTOUCH;
static PyObject *__pyx_n_u_TRACKED_DEVICE_TYPE_LTOUCH;
static PyObject *__pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT0;
static PyObject *__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT0;
static PyObject *__pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT1;
static PyObject *__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT1;
static PyObject *__pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT2;
static PyObject *__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT2;
static PyObject *__pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT3;
static PyObject *__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT3;
static PyObject *__pyx_n_s_TRACKED_DEVICE_TYPE_RTOUCH;
static PyObject *__pyx_n_u_TRACKED_DEVICE_TYPE_RTOUCH;
static PyObject *__pyx_n_s_TRACKED_DEVICE_TYPE_TOUCH;
static PyObject *__pyx_n_u_TRACKED_DEVICE_TYPE_TOUCH;
static PyObject *__pyx_n_s_TRACKING_ORIGIN_EYE_LEVEL;
static PyObject *__pyx_n_u_TRACKING_ORIGIN_EYE_LEVEL;
static PyObject *__pyx_n_s_TRACKING_ORIGIN_FLOOR_LEVEL;
static PyObject *__pyx_n_u_TRACKING_ORIGIN_FLOOR_LEVEL;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_u_UTF_8;
static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_View_MemoryView;
static PyObject *__pyx_kp_u__42;
static PyObject *__pyx_n_s_absTime;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_allocate_buffer;
static PyObject *__pyx_n_s_amplitude;
static PyObject *__pyx_n_s_angle;
static PyObject *__pyx_n_s_angularAcceleration;
static PyObject *__pyx_n_s_angularVelocity;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_asarray;
static PyObject *__pyx_n_s_author;
static PyObject *__pyx_n_s_axis;
static PyObject *__pyx_n_s_base;
static PyObject *__pyx_n_s_bbox;
static PyObject *__pyx_n_s_beginFrame;
static PyObject *__pyx_n_u_beginFrame;
static PyObject *__pyx_n_s_blue;
static PyObject *__pyx_n_s_boundaryType;
static PyObject *__pyx_n_s_bounds;
static PyObject *__pyx_n_s_btype;
static PyObject *__pyx_n_s_buffer;
static PyObject *__pyx_n_s_bufferSize;
static PyObject *__pyx_n_s_button;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_u_c;
static PyObject *__pyx_n_s_calcEyeBufferSize;
static PyObject *__pyx_n_u_calcEyeBufferSize;
static PyObject *__pyx_n_s_calcEyePoses;
static PyObject *__pyx_n_u_calcEyePoses;
static PyObject *__pyx_n_s_check_result;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_clearShouldRecenterFlag;
static PyObject *__pyx_n_u_clearShouldRecenterFlag;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_clip;
static PyObject *__pyx_n_s_color;
static PyObject *__pyx_n_s_commitTextureSwapChain;
static PyObject *__pyx_n_u_commitTextureSwapChain;
static PyObject *__pyx_n_s_connectionTimeout;
static PyObject *__pyx_kp_s_contiguous_and_direct;
static PyObject *__pyx_kp_s_contiguous_and_indirect;
static PyObject *__pyx_n_u_continuous;
static PyObject *__pyx_n_s_controller;
static PyObject *__pyx_n_s_copyright;
static PyObject *__pyx_n_s_corners;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_n_s_create;
static PyObject *__pyx_n_u_create;
static PyObject *__pyx_n_s_createMirrorTexture;
static PyObject *__pyx_n_u_createMirrorTexture;
static PyObject *__pyx_n_s_createTextureSwapChainGL;
static PyObject *__pyx_n_u_createTextureSwapChainGL;
static PyObject *__pyx_n_s_credits;
static PyObject *__pyx_n_s_cullPose;
static PyObject *__pyx_n_u_cullPose;
static PyObject *__pyx_n_s_curButtons;
static PyObject *__pyx_n_s_curTouches;
static PyObject *__pyx_n_s_currentInputState;
static PyObject *__pyx_n_s_current_idx;
static PyObject *__pyx_kp_u_cutonem_yorku_ca;
static PyObject *__pyx_n_s_deadzone;
static PyObject *__pyx_n_s_deepcopy;
static PyObject *__pyx_n_s_defaultVal;
static PyObject *__pyx_n_s_degrees;
static PyObject *__pyx_n_s_depthRequested;
static PyObject *__pyx_n_s_destroy;
static PyObject *__pyx_n_u_destroy;
static PyObject *__pyx_n_s_destroyMirrorTexture;
static PyObject *__pyx_n_u_destroyMirrorTexture;
static PyObject *__pyx_n_s_destroyTextureSwapChain;
static PyObject *__pyx_n_u_destroyTextureSwapChain;
static PyObject *__pyx_n_s_deviceBitmask;
static PyObject *__pyx_n_s_devicePoses;
static PyObject *__pyx_n_s_deviceTypes;
static PyObject *__pyx_n_s_devices;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dir;
static PyObject *__pyx_n_s_displayLost;
static PyObject *__pyx_n_s_distVp;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_dtype_is_object;
static PyObject *__pyx_n_s_email;
static PyObject *__pyx_n_s_enable;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_endFrame;
static PyObject *__pyx_n_u_endFrame;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_errorString;
static PyObject *__pyx_n_s_extents;
static PyObject *__pyx_n_s_eye;
static PyObject *__pyx_n_s_eyePose;
static PyObject *__pyx_n_s_failure;
static PyObject *__pyx_n_u_failure;
static PyObject *__pyx_n_u_falling;
static PyObject *__pyx_n_s_farClip;
static PyObject *__pyx_n_s_fast;
static PyObject *__pyx_n_s_flags;
static PyObject *__pyx_n_s_float32;
static PyObject *__pyx_n_s_focusAware;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fortran;
static PyObject *__pyx_n_u_fortran;
static PyObject *__pyx_n_s_forward;
static PyObject *__pyx_n_s_fov;
static PyObject *__pyx_n_s_fovPort;
static PyObject *__pyx_n_s_fov_in;
static PyObject *__pyx_n_s_frameIndex;
static PyObject *__pyx_n_s_freq;
static PyObject *__pyx_n_s_frequency;
static PyObject *__pyx_n_s_getAt;
static PyObject *__pyx_n_s_getBool;
static PyObject *__pyx_n_u_getBool;
static PyObject *__pyx_n_s_getBoundaryDimensions;
static PyObject *__pyx_n_u_getBoundaryDimensions;
static PyObject *__pyx_n_s_getBoundaryVisible;
static PyObject *__pyx_n_u_getBoundaryVisible;
static PyObject *__pyx_n_s_getButton;
static PyObject *__pyx_n_u_getButton;
static PyObject *__pyx_n_s_getConnectedControllerTypes;
static PyObject *__pyx_n_u_getConnectedControllerTypes;
static PyObject *__pyx_n_s_getControllerPlaybackState;
static PyObject *__pyx_n_u_getControllerPlaybackState;
static PyObject *__pyx_n_s_getDevicePoses;
static PyObject *__pyx_n_u_getDevicePoses;
static PyObject *__pyx_n_s_getDistortedViewport;
static PyObject *__pyx_n_u_getDistortedViewport;
static PyObject *__pyx_n_s_getEyeAspectRatio;
static PyObject *__pyx_n_u_getEyeAspectRatio;
static PyObject *__pyx_n_s_getEyeFocalLength;
static PyObject *__pyx_n_u_getEyeFocalLength;
static PyObject *__pyx_n_s_getEyeHorizontalFovRadians;
static PyObject *__pyx_n_u_getEyeHorizontalFovRadians;
static PyObject *__pyx_n_s_getEyeProjectionMatrix;
static PyObject *__pyx_n_u_getEyeProjectionMatrix;
static PyObject *__pyx_n_s_getEyeRenderFov;
static PyObject *__pyx_n_u_getEyeRenderFov;
static PyObject *__pyx_n_s_getEyeRenderPose;
static PyObject *__pyx_n_u_getEyeRenderPose;
static PyObject *__pyx_n_s_getEyeRenderViewport;
static PyObject *__pyx_n_u_getEyeRenderViewport;
static PyObject *__pyx_n_s_getEyeVerticalFovRadians;
static PyObject *__pyx_n_u_getEyeVerticalFovRadians;
static PyObject *__pyx_n_s_getEyeViewMatrix;
static PyObject *__pyx_n_u_getEyeViewMatrix;
static PyObject *__pyx_n_s_getFloat;
static PyObject *__pyx_n_u_getFloat;
static PyObject *__pyx_n_s_getFloatArray;
static PyObject *__pyx_n_u_getFloatArray;
static PyObject *__pyx_n_s_getGraphicsLUID;
static PyObject *__pyx_n_u_getGraphicsLUID;
static PyObject *__pyx_n_s_getHandTriggerValues;
static PyObject *__pyx_n_u_getHandTriggerValues;
static PyObject *__pyx_n_s_getHapticsInfo;
static PyObject *__pyx_n_u_getHapticsInfo;
static PyObject *__pyx_n_s_getHmdInfo;
static PyObject *__pyx_n_u_getHmdInfo;
static PyObject *__pyx_n_s_getHmdToEyePose;
static PyObject *__pyx_n_u_getHmdToEyePose;
static PyObject *__pyx_n_s_getIndexTriggerValues;
static PyObject *__pyx_n_u_getIndexTriggerValues;
static PyObject *__pyx_n_s_getInt;
static PyObject *__pyx_n_u_getInt;
static PyObject *__pyx_n_s_getLastErrorInfo;
static PyObject *__pyx_n_u_getLastErrorInfo;
static PyObject *__pyx_n_s_getLayerEyeFovFlags;
static PyObject *__pyx_n_u_getLayerEyeFovFlags;
static PyObject *__pyx_n_s_getMirrorTexture;
static PyObject *__pyx_n_u_getMirrorTexture;
static PyObject *__pyx_n_s_getPerfStats;
static PyObject *__pyx_n_u_getPerfStats;
static PyObject *__pyx_n_s_getPixelsPerDegree;
static PyObject *__pyx_n_u_getPixelsPerDegree;
static PyObject *__pyx_n_s_getPixelsPerTanAngleAtCenter;
static PyObject *__pyx_n_u_getPixelsPerTanAngleAtCenter;
static PyObject *__pyx_n_s_getPredictedDisplayTime;
static PyObject *__pyx_n_u_getPredictedDisplayTime;
static PyObject *__pyx_n_s_getSensorSampleTime;
static PyObject *__pyx_n_u_getSensorSampleTime;
static PyObject *__pyx_n_s_getSessionStatus;
static PyObject *__pyx_n_u_getSessionStatus;
static PyObject *__pyx_n_s_getString;
static PyObject *__pyx_n_u_getString;
static PyObject *__pyx_n_s_getTanAngleToRenderTargetNDC;
static PyObject *__pyx_n_u_getTanAngleToRenderTargetNDC;
static PyObject *__pyx_n_s_getTextureSwapChainBufferGL;
static PyObject *__pyx_n_u_getTextureSwapChainBufferGL;
static PyObject *__pyx_n_s_getTextureSwapChainCurrentIndex;
static PyObject *__pyx_n_u_getTextureSwapChainCurrentIndex;
static PyObject *__pyx_n_s_getTextureSwapChainLengthGL;
static PyObject *__pyx_n_u_getTextureSwapChainLengthGL;
static PyObject *__pyx_n_s_getThumbstickValues;
static PyObject *__pyx_n_u_getThumbstickValues;
static PyObject *__pyx_n_s_getTouch;
static PyObject *__pyx_n_u_getTouch;
static PyObject *__pyx_n_s_getTrackerCount;
static PyObject *__pyx_n_u_getTrackerCount;
static PyObject *__pyx_n_s_getTrackerInfo;
static PyObject *__pyx_n_u_getTrackerInfo;
static PyObject *__pyx_n_s_getTrackingOriginType;
static PyObject *__pyx_n_u_getTrackingOriginType;
static PyObject *__pyx_n_s_getTrackingState;
static PyObject *__pyx_n_u_getTrackingState;
static PyObject *__pyx_n_s_getUp;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
static PyObject *__pyx_n_s_green;
static PyObject *__pyx_n_s_hasInputFocus;
static PyObject *__pyx_n_s_headPose;
static PyObject *__pyx_n_s_height;
static PyObject *__pyx_n_s_hideBoundary;
static PyObject *__pyx_n_u_hideBoundary;
static PyObject *__pyx_n_u_high;
static PyObject *__pyx_n_s_hmdMounted;
static PyObject *__pyx_n_s_hmdToEyePoses;
static PyObject *__pyx_n_s_horzPixelPerDeg;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_idx;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_initialize;
static PyObject *__pyx_n_u_initialize;
static PyObject *__pyx_n_s_int;
static PyObject *__pyx_n_s_inverse;
static PyObject *__pyx_n_s_inverted;
static PyObject *__pyx_n_s_isHeadLocked;
static PyObject *__pyx_n_u_isHeadLocked;
static PyObject *__pyx_n_s_isHmdConnected;
static PyObject *__pyx_n_u_isHmdConnected;
static PyObject *__pyx_n_s_isOculusServiceRunning;
static PyObject *__pyx_n_u_isOculusServiceRunning;
static PyObject *__pyx_n_s_isVisible;
static PyObject *__pyx_n_s_itemsize;
static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
static PyObject *__pyx_n_s_j;
static PyObject *__pyx_n_s_lastErrorInfo;
static PyObject *__pyx_n_s_latencyMarker;
static PyObject *__pyx_n_s_layers;
static PyObject *__pyx_n_s_levels;
static PyObject *__pyx_n_s_license;
static PyObject *__pyx_n_s_linearAcceleration;
static PyObject *__pyx_n_s_linearVelocity;
static PyObject *__pyx_n_s_logCallback;
static PyObject *__pyx_n_u_low;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_maintainer;
static PyObject *__pyx_n_s_major;
static PyObject *__pyx_n_s_maxRange;
static PyObject *__pyx_n_s_memo;
static PyObject *__pyx_n_s_memview;
static PyObject *__pyx_n_s_minor;
static PyObject *__pyx_n_s_mirrorDesc;
static PyObject *__pyx_n_s_mirrorOptions;
static PyObject *__pyx_n_s_mirror_id;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_mv;
static PyObject *__pyx_n_s_mvp;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
static PyObject *__pyx_n_s_ndim;
static PyObject *__pyx_n_s_nearClip;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_newOrigin;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_u_off;
static PyObject *__pyx_n_s_ori;
static PyObject *__pyx_n_s_originOri;
static PyObject *__pyx_n_s_originPos;
static PyObject *__pyx_n_s_originPose;
static PyObject *__pyx_n_s_originType;
static PyObject *__pyx_n_s_out;
static PyObject *__pyx_n_s_outLength;
static PyObject *__pyx_n_s_outPoses;
static PyObject *__pyx_n_s_overlayPresent;
static PyObject *__pyx_n_s_pack;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pixelsPerTanAngle;
static PyObject *__pyx_n_s_playback_state;
static PyObject *__pyx_n_s_points;
static PyObject *__pyx_n_s_pos;
static PyObject *__pyx_n_s_posOri;
static PyObject *__pyx_n_s_pose;
static PyObject *__pyx_n_u_pressed;
static PyObject *__pyx_n_s_previousInputState;
static PyObject *__pyx_n_s_propertyName;
static PyObject *__pyx_n_s_prvButtons;
static PyObject *__pyx_n_s_prvTouches;
static PyObject *__pyx_n_s_psychxr_libovr__libovr;
static PyObject *__pyx_kp_s_psychxr_libovr__libovr_pyx;
static PyObject *__pyx_n_s_px;
static PyObject *__pyx_n_s_py;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_getbuffer;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_Enum;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_pz;
static PyObject *__pyx_n_s_radius;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_rayDir;
static PyObject *__pyx_n_s_recenterTrackingOrigin;
static PyObject *__pyx_n_u_recenterTrackingOrigin;
static PyObject *__pyx_n_s_red;
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_refPose;
static PyObject *__pyx_n_u_released;
static PyObject *__pyx_n_s_resetBoundaryColor;
static PyObject *__pyx_n_u_resetBoundaryColor;
static PyObject *__pyx_n_s_resetPerfStats;
static PyObject *__pyx_n_u_resetPerfStats;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_u_rising;
static PyObject *__pyx_n_s_rm;
static PyObject *__pyx_n_s_rw;
static PyObject *__pyx_n_s_rx;
static PyObject *__pyx_n_s_ry;
static PyObject *__pyx_n_s_rz;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_n_s_setBool;
static PyObject *__pyx_n_u_setBool;
static PyObject *__pyx_n_s_setBoundaryColor;
static PyObject *__pyx_n_u_setBoundaryColor;
static PyObject *__pyx_n_s_setControllerVibration;
static PyObject *__pyx_n_u_setControllerVibration;
static PyObject *__pyx_n_s_setEyeColorTextureSwapChain;
static PyObject *__pyx_n_u_setEyeColorTextureSwapChain;
static PyObject *__pyx_n_s_setEyeRenderFov;
static PyObject *__pyx_n_u_setEyeRenderFov;
static PyObject *__pyx_n_s_setEyeRenderPose;
static PyObject *__pyx_n_u_setEyeRenderPose;
static PyObject *__pyx_n_s_setEyeRenderViewport;
static PyObject *__pyx_n_u_setEyeRenderViewport;
static PyObject *__pyx_n_s_setFloat;
static PyObject *__pyx_n_u_setFloat;
static PyObject *__pyx_n_s_setFloatArray;
static PyObject *__pyx_n_u_setFloatArray;
static PyObject *__pyx_n_s_setHeadLocked;
static PyObject *__pyx_n_u_setHeadLocked;
static PyObject *__pyx_n_s_setHighQuality;
static PyObject *__pyx_n_u_setHighQuality;
static PyObject *__pyx_n_s_setHmdToEyePose;
static PyObject *__pyx_n_u_setHmdToEyePose;
static PyObject *__pyx_n_s_setInt;
static PyObject *__pyx_n_u_setInt;
static PyObject *__pyx_n_s_setLayerEyeFovFlags;
static PyObject *__pyx_n_u_setLayerEyeFovFlags;
static PyObject *__pyx_n_s_setSensorSampleTime;
static PyObject *__pyx_n_u_setSensorSampleTime;
static PyObject *__pyx_n_s_setString;
static PyObject *__pyx_n_u_setString;
static PyObject *__pyx_n_s_setTrackingOriginType;
static PyObject *__pyx_n_u_setTrackingOriginType;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_shouldQuit;
static PyObject *__pyx_n_s_shouldRecenter;
static PyObject *__pyx_n_s_showBoundary;
static PyObject *__pyx_n_u_showBoundary;
static PyObject *__pyx_n_s_shutdown;
static PyObject *__pyx_n_u_shutdown;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_specifyTrackingOrigin;
static PyObject *__pyx_n_u_specifyTrackingOrigin;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_stateResult;
static PyObject *__pyx_n_s_status;
static PyObject *__pyx_n_s_step;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_kp_s_strided_and_direct;
static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
static PyObject *__pyx_kp_s_strided_and_indirect;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_submitControllerVibration;
static PyObject *__pyx_n_u_submitControllerVibration;
static PyObject *__pyx_n_s_success;
static PyObject *__pyx_n_u_success;
static PyObject *__pyx_n_s_swapChain;
static PyObject *__pyx_n_s_swapConfig;
static PyObject *__pyx_n_s_t_sec;
static PyObject *__pyx_n_s_tanAngle;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_targetPose;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_testBoundary;
static PyObject *__pyx_n_u_testBoundary;
static PyObject *__pyx_n_s_testResult;
static PyObject *__pyx_n_s_testState;
static PyObject *__pyx_n_s_test_point;
static PyObject *__pyx_n_s_tex_id;
static PyObject *__pyx_n_s_texelsPerPixel;
static PyObject *__pyx_n_s_textureFormat;
static PyObject *__pyx_n_s_thePose;
static PyObject *__pyx_n_s_thisPose;
static PyObject *__pyx_n_s_thumbstick_x0;
static PyObject *__pyx_n_s_thumbstick_x1;
static PyObject *__pyx_n_s_thumbstick_y0;
static PyObject *__pyx_n_s_thumbstick_y1;
static PyObject *__pyx_n_s_timeInSeconds;
static PyObject *__pyx_n_u_timeInSeconds;
static PyObject *__pyx_n_s_timeoutMs;
static PyObject *__pyx_n_s_toReturn;
static PyObject *__pyx_n_s_to_return;
static PyObject *__pyx_n_s_tolerance;
static PyObject *__pyx_n_s_touch;
static PyObject *__pyx_n_s_trackerCount;
static PyObject *__pyx_n_s_trackerIndex;
static PyObject *__pyx_n_s_triggerLeft;
static PyObject *__pyx_n_s_triggerRight;
static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
static PyObject *__pyx_n_s_unpack;
static PyObject *__pyx_n_s_unqualifiedSuccess;
static PyObject *__pyx_n_u_unqualifiedSuccess;
static PyObject *__pyx_n_s_up;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_updateInputState;
static PyObject *__pyx_n_u_updateInputState;
static PyObject *__pyx_n_s_use_marker;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_in;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_valuesCapacity;
static PyObject *__pyx_n_s_vecIn;
static PyObject *__pyx_n_s_vec_out;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_vertPixelPerDeg;
static PyObject *__pyx_n_s_waitToBeginFrame;
static PyObject *__pyx_n_u_waitToBeginFrame;
static PyObject *__pyx_n_s_warn;
static PyObject *__pyx_n_s_warnings;
static PyObject *__pyx_n_s_width;
static PyObject *__pyx_n_s_zeros;
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_check_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_result); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_ori); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static void __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_a, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_16__deepcopy__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_18isEqual(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_pose, float __pyx_v_tolerance); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_20duplicate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_22__str__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_24setIdentity(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_26getPos(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_28setPos(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_30getOri(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_32setOri(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_ori); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_2at___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_34getAt(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_2up___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_36getUp(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_38getOriAxisAngle(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_degrees); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_40setOriAxisAngle(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_axis, float __pyx_v_angle, int __pyx_v_degrees); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_42getYawPitchRoll(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_refPose, int __pyx_v_degrees, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_44getOriAngle(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, int __pyx_v_degrees); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_46alignTo(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_alignTo); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_48getSwingTwist(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_twistAxis); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_50getAngleTo(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_target, PyObject *__pyx_v_dir, int __pyx_v_degrees); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_52getAzimuthElevation(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_target, int __pyx_v_degrees); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_11modelMatrix___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_18inverseModelMatrix___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_54getModelMatrix(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, int __pyx_v_inverse, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_56getViewMatrix(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, int __pyx_v_inverse, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_58normalize(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_60invert(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_62inverted(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_64rotate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_66inverseRotate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_68translate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_70transform(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_72inverseTransform(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_74transformNormal(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_76inverseTransformNormal(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_78apply(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_80distanceTo(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_82raycastSphere(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_targetPose, float __pyx_v_radius, PyObject *__pyx_v_rayDir, float __pyx_v_maxRange); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_84interp(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_end, float __pyx_v_s, int __pyx_v_fast); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_86isVisible(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_88__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_90__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_thePose, PyObject *__pyx_v_linearVelocity, PyObject *__pyx_v_angularVelocity, PyObject *__pyx_v_linearAcceleration, PyObject *__pyx_v_angularAcceleration, double __pyx_v_timeInSeconds); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static void __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_6__deepcopy__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_8duplicate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_10timeIntegrate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, float __pyx_v_dt); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static void __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8headPose___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9handPoses___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_11statusFlags___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_13positionValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16orientationValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_15handStatusFlags___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_17handPositionValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_20handOrientationValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16calibratedOrigin___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_extents); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static void __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_6clear(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7isValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_8fit(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_points, int __pyx_v_clear); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_10addPoint(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_point); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_12trackerIndex___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4pose___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11leveledPose___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11isConnected___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13isPoseTracked___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13horizontalFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11verticalFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_5nearZ___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4farZ___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static void __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7hmdType___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_22hasOrientationTracking___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasPositionTracking___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasMagYawCorrection___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13isDebugDevice___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11productName___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12manufacturer___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12serialNumber___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_10resolution___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11refreshRate___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3hid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15firmwareVersion___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13defaultEyeFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9maxEyeFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15symmetricEyeFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_2__cinit__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9isVisible___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdPresent___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdMounted___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11displayLost___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10shouldQuit___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14shouldRecenter___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_13hasInputFocus___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14overlayPresent___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14depthRequested___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_2__cinit__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12isTriggering___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_15closestDistance___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12closestPoint___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_18closestPointNormal___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static void __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13hmdVsyncIndex___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13appFrameIndex___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20appDroppedFrameCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24appMotionToPhotonLatency___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appQueueAheadTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appCpuElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appGpuElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20compositorFrameIndex___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_27compositorDroppedFrameCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17compositorLatency___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorCpuElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorGpuElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_37compositorCpuStartToGpuEndElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_34compositorGpuEndToVsyncElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11timeToVsync___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11aswIsActive___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_23aswActivatedToggleCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_22aswPresentedFrameCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_19aswFailedFrameCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static void __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_10frameStats___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_15frameStatsCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_20anyFrameStatsDropped___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_27adaptiveGpuPerformanceScale___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_14aswIsAvailable___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_16visibleProcessId___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_2__cinit__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_12sampleRateHz___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_10sampleTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_29queueMinSizeToAvoidStarvation___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMinSamples___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMaxSamples___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_20submitOptimalSamples___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_buffer); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self, PyObject *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_12samplesCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_2success(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_result); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_4unqualifiedSuccess(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_result); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_6failure(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_result); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_8getBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, int __pyx_v_defaultVal); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10setBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12getInt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, int __pyx_v_defaultVal); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_14setInt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_16getFloat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, float __pyx_v_defaultVal); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_18setFloat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, float __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_20setFloatArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_22getFloatArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24setString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_26getString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, PyObject *__pyx_v_defaultVal); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_28isOculusServiceRunning(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_timeoutMs); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_30isHmdConnected(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_timeoutMs); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_32getHmdInfo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_34initialize(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_focusAware, int __pyx_v_connectionTimeout, PyObject *__pyx_v_logCallback); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_36create(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_38destroyTextureSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_40destroyMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_42destroy(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_44shutdown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_46getGraphicsLUID(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_48setHighQuality(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_enable); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_50setHeadLocked(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_enable); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_52isHeadLocked(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_54getPixelsPerTanAngleAtCenter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_56getTanAngleToRenderTargetNDC(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyObject *__pyx_v_tanAngle); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_58getPixelsPerDegree(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_60getDistortedViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_62getEyeRenderFov(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_64setEyeRenderFov(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyObject *__pyx_v_fov); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_66getEyeAspectRatio(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_68getEyeHorizontalFovRadians(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_70getEyeVerticalFovRadians(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_72getEyeFocalLength(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_74calcEyeBufferSize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED int __pyx_v_eye, float __pyx_v_texelsPerPixel); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_76getLayerEyeFovFlags(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_78setLayerEyeFovFlags(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_80createTextureSwapChainGL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain, int __pyx_v_width, int __pyx_v_height, int __pyx_v_textureFormat, int __pyx_v_levels); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_82getTextureSwapChainLengthGL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_84getTextureSwapChainCurrentIndex(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_86getTextureSwapChainBufferGL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain, int __pyx_v_index); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_88setEyeColorTextureSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, int __pyx_v_swapChain); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_90createMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_width, int __pyx_v_height, int __pyx_v_textureFormat, int __pyx_v_mirrorOptions); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_92getMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_94getSensorSampleTime(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_96setSensorSampleTime(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_absTime); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_98getTrackingState(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_absTime, int __pyx_v_latencyMarker); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_100getDevicePoses(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_deviceTypes, double __pyx_v_absTime, int __pyx_v_latencyMarker); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_102calcEyePoses(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_headPose, PyObject *__pyx_v_originPose); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_104getHmdToEyePose(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_106setHmdToEyePose(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED int __pyx_v_eye, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_eyePose); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_108getEyeRenderPose(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_110setEyeRenderPose(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_eyePose); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_112getEyeProjectionMatrix(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, float __pyx_v_nearClip, float __pyx_v_farClip, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_114getEyeRenderViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_116setEyeRenderViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_118getEyeViewMatrix(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_120getPredictedDisplayTime(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_122timeInSeconds(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_124waitToBeginFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_126beginFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_128commitTextureSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_130endFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_132getTrackingOriginType(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_134setTrackingOriginType(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_136recenterTrackingOrigin(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_138specifyTrackingOrigin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_newOrigin); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_140clearShouldRecenterFlag(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_142getTrackerCount(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_144getTrackerInfo(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_trackerIndex); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_146getSessionStatus(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_148getPerfStats(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_150resetPerfStats(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_152getLastErrorInfo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_154setBoundaryColor(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_red, float __pyx_v_green, float __pyx_v_blue); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_156resetBoundaryColor(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_158getBoundaryVisible(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_160showBoundary(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_162hideBoundary(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_164getBoundaryDimensions(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_boundaryType); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_166testBoundary(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_deviceBitmask, int __pyx_v_boundaryType); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_168getConnectedControllerTypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_170updateInputState(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_172getButton(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_button, PyObject *__pyx_v_testState); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_174getTouch(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_touch, PyObject *__pyx_v_testState); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_176getThumbstickValues(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_deadzone); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_178getIndexTriggerValues(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_deadzone); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_180getHandTriggerValues(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_deadzone); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_182setControllerVibration(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, PyObject *__pyx_v_frequency, float __pyx_v_amplitude); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_184getHapticsInfo(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_186submitControllerVibration(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_188getControllerPlaybackState(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller); /* proto */
static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_190cullPose(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_pose); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPose(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPoseState(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRTrackingState(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRBounds(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHmdInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRSessionStatus(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPerfStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_float_0_;
static PyObject *__pyx_float_1_;
static PyObject *__pyx_float_0_0;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_float_2_0;
static PyObject *__pyx_float_neg_1_;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_9;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_11;
static PyObject *__pyx_int_12;
static PyObject *__pyx_int_13;
static PyObject *__pyx_int_14;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_16;
static PyObject *__pyx_int_184977713;
static PyObject *__pyx_int_neg_1;
static int __pyx_k__43;
static int __pyx_k__46;
static int __pyx_k__47;
static PyObject *__pyx_slice__4;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__168;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__198;
static PyObject *__pyx_tuple__200;
static PyObject *__pyx_tuple__202;
static PyObject *__pyx_tuple__204;
static PyObject *__pyx_tuple__206;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__210;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__257;
static PyObject *__pyx_tuple__259;
static PyObject *__pyx_tuple__261;
static PyObject *__pyx_tuple__263;
static PyObject *__pyx_tuple__264;
static PyObject *__pyx_tuple__265;
static PyObject *__pyx_tuple__266;
static PyObject *__pyx_tuple__267;
static PyObject *__pyx_tuple__268;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__143;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__167;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__195;
static PyObject *__pyx_codeobj__197;
static PyObject *__pyx_codeobj__199;
static PyObject *__pyx_codeobj__201;
static PyObject *__pyx_codeobj__203;
static PyObject *__pyx_codeobj__205;
static PyObject *__pyx_codeobj__207;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__211;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__228;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__252;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__256;
static PyObject *__pyx_codeobj__258;
static PyObject *__pyx_codeobj__260;
static PyObject *__pyx_codeobj__262;
static PyObject *__pyx_codeobj__269;
/* Late includes */

/* "psychxr/libovr/_libovr.pyx":449
 * #
 * cdef capi.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):             # <<<<<<<<<<<<<<
 *     if capi.OVR_FAILURE(result):
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_1check_result(PyObject *__pyx_self, PyObject *__pyx_v_result); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_check_result[] = "check_result(result)";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_1check_result = {"check_result", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_1check_result, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_check_result};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_1check_result(PyObject *__pyx_self, PyObject *__pyx_v_result) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_result (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_check_result(__pyx_self, ((PyObject *)__pyx_v_result));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_check_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_result) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrResult __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("check_result", 0);

  /* "psychxr/libovr/_libovr.pyx":450
 * cdef capi.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):
 *     if capi.OVR_FAILURE(result):             # <<<<<<<<<<<<<<
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)
 *         raise RuntimeError(
 */
  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_result); if (unlikely((__pyx_t_1 == ((ovrResult)-1)) && PyErr_Occurred())) __PYX_ERR(0, 450, __pyx_L1_error)
  __pyx_t_2 = (__pyx_f_7psychxr_6libovr_11libovr_capi_OVR_FAILURE(__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psychxr/libovr/_libovr.pyx":451
 * def check_result(result):
 *     if capi.OVR_FAILURE(result):
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)             # <<<<<<<<<<<<<<
 *         raise RuntimeError(
 *             str(result) + ": " + _last_error_info_.ErrorString.decode("utf-8"))
 */
    ovr_GetLastErrorInfo((&__pyx_v_7psychxr_6libovr_7_libovr__last_error_info_));

    /* "psychxr/libovr/_libovr.pyx":453
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)
 *         raise RuntimeError(
 *             str(result) + ": " + _last_error_info_.ErrorString.decode("utf-8"))             # <<<<<<<<<<<<<<
 * 
 * # helper functions and data
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_v_7psychxr_6libovr_7_libovr__last_error_info_.ErrorString;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psychxr/libovr/_libovr.pyx":452
 *     if capi.OVR_FAILURE(result):
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)
 *         raise RuntimeError(             # <<<<<<<<<<<<<<
 *             str(result) + ": " + _last_error_info_.ErrorString.decode("utf-8"))
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 452, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":450
 * cdef capi.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):
 *     if capi.OVR_FAILURE(result):             # <<<<<<<<<<<<<<
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)
 *         raise RuntimeError(
 */
  }

  /* "psychxr/libovr/_libovr.pyx":449
 * #
 * cdef capi.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):             # <<<<<<<<<<<<<<
 *     if capi.OVR_FAILURE(result):
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.libovr._libovr.check_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":460
 * 
 * 
 * cdef float maxf(float a, float b):             # <<<<<<<<<<<<<<
 *     return a if a >= b else b
 * 
 */

static float __pyx_f_7psychxr_6libovr_7_libovr_maxf(float __pyx_v_a, float __pyx_v_b) {
  float __pyx_r;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("maxf", 0);

  /* "psychxr/libovr/_libovr.pyx":461
 * 
 * cdef float maxf(float a, float b):
 *     return a if a >= b else b             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (((__pyx_v_a >= __pyx_v_b) != 0)) {
    __pyx_t_1 = __pyx_v_a;
  } else {
    __pyx_t_1 = __pyx_v_b;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":460
 * 
 * 
 * cdef float maxf(float a, float b):             # <<<<<<<<<<<<<<
 *     return a if a >= b else b
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":464
 * 
 * 
 * cdef char* str2bytes(str strIn):             # <<<<<<<<<<<<<<
 *     """Convert UTF-8 encoded strings to bytes."""
 *     py_bytes = strIn.encode('UTF-8')
 */

static char *__pyx_f_7psychxr_6libovr_7_libovr_str2bytes(PyObject *__pyx_v_strIn) {
  PyObject *__pyx_v_py_bytes = NULL;
  char *__pyx_v_to_return;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  __Pyx_RefNannySetupContext("str2bytes", 0);

  /* "psychxr/libovr/_libovr.pyx":466
 * cdef char* str2bytes(str strIn):
 *     """Convert UTF-8 encoded strings to bytes."""
 *     py_bytes = strIn.encode('UTF-8')             # <<<<<<<<<<<<<<
 *     cdef char* to_return = py_bytes
 * 
 */
  if (unlikely(__pyx_v_strIn == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 466, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_strIn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_py_bytes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":467
 *     """Convert UTF-8 encoded strings to bytes."""
 *     py_bytes = strIn.encode('UTF-8')
 *     cdef char* to_return = py_bytes             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
  __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_py_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L1_error)
  __pyx_v_to_return = __pyx_t_2;

  /* "psychxr/libovr/_libovr.pyx":469
 *     cdef char* to_return = py_bytes
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":464
 * 
 * 
 * cdef char* str2bytes(str strIn):             # <<<<<<<<<<<<<<
 *     """Convert UTF-8 encoded strings to bytes."""
 *     py_bytes = strIn.encode('UTF-8')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.str2bytes", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_py_bytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":472
 * 
 * 
 * cdef str bytes2str(char* bytesIn):             # <<<<<<<<<<<<<<
 *     """Convert UTF-8 encoded strings to bytes."""
 *     return bytesIn.decode('UTF-8')
 */

static PyObject *__pyx_f_7psychxr_6libovr_7_libovr_bytes2str(char *__pyx_v_bytesIn) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("bytes2str", 0);

  /* "psychxr/libovr/_libovr.pyx":474
 * cdef str bytes2str(char* bytesIn):
 *     """Convert UTF-8 encoded strings to bytes."""
 *     return bytesIn.decode('UTF-8')             # <<<<<<<<<<<<<<
 * 
 * # ------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_bytesIn, 0, strlen(__pyx_v_bytesIn), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":472
 * 
 * 
 * cdef str bytes2str(char* bytesIn):             # <<<<<<<<<<<<<<
 *     """Convert UTF-8 encoded strings to bytes."""
 *     return bytesIn.decode('UTF-8')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.bytes2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":492
 * #
 * 
 * cdef void LibOVRLogCallback(uintptr_t userData, int level, char* message) with gil:             # <<<<<<<<<<<<<<
 *     """Callback function for LibOVR logging messages.
 *     """
 */

static void __pyx_f_7psychxr_6libovr_7_libovr_LibOVRLogCallback(uintptr_t __pyx_v_userData, int __pyx_v_level, char *__pyx_v_message) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("LibOVRLogCallback", 0);

  /* "psychxr/libovr/_libovr.pyx":495
 *     """Callback function for LibOVR logging messages.
 *     """
 *     (<object>(<void*>userData))(level, bytes2str(message))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_7psychxr_6libovr_7_libovr_bytes2str(__pyx_v_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)((void *)__pyx_v_userData)));
  __pyx_t_4 = ((PyObject *)((void *)__pyx_v_userData)); __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":492
 * #
 * 
 * cdef void LibOVRLogCallback(uintptr_t userData, int level, char* message) with gil:             # <<<<<<<<<<<<<<
 *     """Callback function for LibOVR logging messages.
 *     """
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.LibOVRLogCallback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "psychxr/libovr/_libovr.pyx":784
 * 
 * 
 * cdef np.ndarray _wrap_ovrVector2f_as_ndarray(capi.ovrVector2f* prtVec):             # <<<<<<<<<<<<<<
 *     """Wrap an ovrVector2f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 */

static PyArrayObject *__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector2f_as_ndarray(ovrVector2f *__pyx_v_prtVec) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_wrap_ovrVector2f_as_ndarray", 0);

  /* "psychxr/libovr/_libovr.pyx":786
 * cdef np.ndarray _wrap_ovrVector2f_as_ndarray(capi.ovrVector2f* prtVec):
 *     """Wrap an ovrVector2f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(             # <<<<<<<<<<<<<<
 *         1, VEC2_SHAPE, np.NPY_FLOAT32, <void*>prtVec)
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));

  /* "psychxr/libovr/_libovr.pyx":787
 *     """Wrap an ovrVector2f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 *         1, VEC2_SHAPE, np.NPY_FLOAT32, <void*>prtVec)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyArray_SimpleNewFromData(1, __pyx_v_7psychxr_6libovr_7_libovr_VEC2_SHAPE, NPY_FLOAT32, ((void *)__pyx_v_prtVec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":786
 * cdef np.ndarray _wrap_ovrVector2f_as_ndarray(capi.ovrVector2f* prtVec):
 *     """Wrap an ovrVector2f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(             # <<<<<<<<<<<<<<
 *         1, VEC2_SHAPE, np.NPY_FLOAT32, <void*>prtVec)
 * 
 */
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 786, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":784
 * 
 * 
 * cdef np.ndarray _wrap_ovrVector2f_as_ndarray(capi.ovrVector2f* prtVec):             # <<<<<<<<<<<<<<
 *     """Wrap an ovrVector2f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr._wrap_ovrVector2f_as_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":790
 * 
 * 
 * cdef np.ndarray _wrap_ovrVector3f_as_ndarray(capi.ovrVector3f* prtVec):             # <<<<<<<<<<<<<<
 *     """Wrap an ovrVector3f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 */

static PyArrayObject *__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray(ovrVector3f *__pyx_v_prtVec) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_wrap_ovrVector3f_as_ndarray", 0);

  /* "psychxr/libovr/_libovr.pyx":792
 * cdef np.ndarray _wrap_ovrVector3f_as_ndarray(capi.ovrVector3f* prtVec):
 *     """Wrap an ovrVector3f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(             # <<<<<<<<<<<<<<
 *         1, VEC3_SHAPE, np.NPY_FLOAT32, <void*>prtVec)
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));

  /* "psychxr/libovr/_libovr.pyx":793
 *     """Wrap an ovrVector3f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 *         1, VEC3_SHAPE, np.NPY_FLOAT32, <void*>prtVec)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyArray_SimpleNewFromData(1, __pyx_v_7psychxr_6libovr_7_libovr_VEC3_SHAPE, NPY_FLOAT32, ((void *)__pyx_v_prtVec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":792
 * cdef np.ndarray _wrap_ovrVector3f_as_ndarray(capi.ovrVector3f* prtVec):
 *     """Wrap an ovrVector3f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(             # <<<<<<<<<<<<<<
 *         1, VEC3_SHAPE, np.NPY_FLOAT32, <void*>prtVec)
 * 
 */
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 792, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":790
 * 
 * 
 * cdef np.ndarray _wrap_ovrVector3f_as_ndarray(capi.ovrVector3f* prtVec):             # <<<<<<<<<<<<<<
 *     """Wrap an ovrVector3f object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr._wrap_ovrVector3f_as_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":796
 * 
 * 
 * cdef np.ndarray _wrap_ovrQuatf_as_ndarray(capi.ovrQuatf* prtVec):             # <<<<<<<<<<<<<<
 *     """Wrap an ovrQuatf object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 */

static PyArrayObject *__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrQuatf_as_ndarray(ovrQuatf *__pyx_v_prtVec) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_wrap_ovrQuatf_as_ndarray", 0);

  /* "psychxr/libovr/_libovr.pyx":798
 * cdef np.ndarray _wrap_ovrQuatf_as_ndarray(capi.ovrQuatf* prtVec):
 *     """Wrap an ovrQuatf object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(             # <<<<<<<<<<<<<<
 *         1, QUAT_SHAPE, np.NPY_FLOAT32, <void*>prtVec)
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));

  /* "psychxr/libovr/_libovr.pyx":799
 *     """Wrap an ovrQuatf object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 *         1, QUAT_SHAPE, np.NPY_FLOAT32, <void*>prtVec)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyArray_SimpleNewFromData(1, __pyx_v_7psychxr_6libovr_7_libovr_QUAT_SHAPE, NPY_FLOAT32, ((void *)__pyx_v_prtVec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":798
 * cdef np.ndarray _wrap_ovrQuatf_as_ndarray(capi.ovrQuatf* prtVec):
 *     """Wrap an ovrQuatf object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(             # <<<<<<<<<<<<<<
 *         1, QUAT_SHAPE, np.NPY_FLOAT32, <void*>prtVec)
 * 
 */
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 798, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":796
 * 
 * 
 * cdef np.ndarray _wrap_ovrQuatf_as_ndarray(capi.ovrQuatf* prtVec):             # <<<<<<<<<<<<<<
 *     """Wrap an ovrQuatf object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr._wrap_ovrQuatf_as_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":808
 * 
 * 
 * cdef np.ndarray _wrap_ovrFovPort_as_ndarray(capi.ovrFovPort* prtVec):             # <<<<<<<<<<<<<<
 *     """Wrap an ovrFovPort object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 */

static PyArrayObject *__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrFovPort_as_ndarray(ovrFovPort *__pyx_v_prtVec) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_wrap_ovrFovPort_as_ndarray", 0);

  /* "psychxr/libovr/_libovr.pyx":810
 * cdef np.ndarray _wrap_ovrFovPort_as_ndarray(capi.ovrFovPort* prtVec):
 *     """Wrap an ovrFovPort object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(             # <<<<<<<<<<<<<<
 *         1, FOVPORT_SHAPE, np.NPY_FLOAT32, <void*>prtVec)
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));

  /* "psychxr/libovr/_libovr.pyx":811
 *     """Wrap an ovrFovPort object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 *         1, FOVPORT_SHAPE, np.NPY_FLOAT32, <void*>prtVec)             # <<<<<<<<<<<<<<
 * 
 * # ------------------------------------------------------------------------------
 */
  __pyx_t_1 = PyArray_SimpleNewFromData(1, __pyx_v_7psychxr_6libovr_7_libovr_FOVPORT_SHAPE, NPY_FLOAT32, ((void *)__pyx_v_prtVec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":810
 * cdef np.ndarray _wrap_ovrFovPort_as_ndarray(capi.ovrFovPort* prtVec):
 *     """Wrap an ovrFovPort object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(             # <<<<<<<<<<<<<<
 *         1, FOVPORT_SHAPE, np.NPY_FLOAT32, <void*>prtVec)
 * 
 */
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 810, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":808
 * 
 * 
 * cdef np.ndarray _wrap_ovrFovPort_as_ndarray(capi.ovrFovPort* prtVec):             # <<<<<<<<<<<<<<
 *     """Wrap an ovrFovPort object with a NumPy array."""
 *     return np.PyArray_SimpleNewFromData(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr._wrap_ovrFovPort_as_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":873
 *     cdef LibOVRBounds _bbox
 * 
 *     def __init__(self, pos=(0., 0., 0.), ori=(0., 0., 0., 1.)):             # <<<<<<<<<<<<<<
 *         self._new_struct(pos, ori)
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_ori = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,&__pyx_n_s_ori,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)__pyx_tuple__2);
    values[1] = ((PyObject *)__pyx_tuple__3);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pos);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ori);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 873, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = values[0];
    __pyx_v_ori = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_pos, __pyx_v_ori);

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_ori) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psychxr/libovr/_libovr.pyx":874
 * 
 *     def __init__(self, pos=(0., 0., 0.), ori=(0., 0., 0., 1.)):
 *         self._new_struct(pos, ori)             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, *args, **kwargs):
 */
  ((struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self->__pyx_vtab)->_new_struct(__pyx_v_self, __pyx_v_pos, __pyx_v_ori);

  /* "psychxr/libovr/_libovr.pyx":873
 *     cdef LibOVRBounds _bbox
 * 
 *     def __init__(self, pos=(0., 0., 0.), ori=(0., 0., 0., 1.)):             # <<<<<<<<<<<<<<
 *         self._new_struct(pos, ori)
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":876
 *         self._new_struct(pos, ori)
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/libovr/_libovr.pyx":877
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.ptr_owner = False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_v_self->ptr_owner = 0;

  /* "psychxr/libovr/_libovr.pyx":876
 *         self._new_struct(pos, ori)
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":880
 * 
 *     @staticmethod
 *     cdef LibOVRPose fromPtr(capi.ovrPosef* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRPose wrapper = LibOVRPose.__new__(LibOVRPose)
 *         wrapper.c_data = ptr
 */

static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_f_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr(ovrPosef *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr *__pyx_optional_args) {
  int __pyx_v_owner = ((int)0);
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_wrapper = 0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fromPtr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_owner = __pyx_optional_args->owner;
    }
  }

  /* "psychxr/libovr/_libovr.pyx":881
 *     @staticmethod
 *     cdef LibOVRPose fromPtr(capi.ovrPosef* ptr, bint owner=False):
 *         cdef LibOVRPose wrapper = LibOVRPose.__new__(LibOVRPose)             # <<<<<<<<<<<<<<
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPose(((PyTypeObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_wrapper = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":882
 *     cdef LibOVRPose fromPtr(capi.ovrPosef* ptr, bint owner=False):
 *         cdef LibOVRPose wrapper = LibOVRPose.__new__(LibOVRPose)
 *         wrapper.c_data = ptr             # <<<<<<<<<<<<<<
 *         wrapper.ptr_owner = owner
 * 
 */
  __pyx_v_wrapper->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":883
 *         cdef LibOVRPose wrapper = LibOVRPose.__new__(LibOVRPose)
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner             # <<<<<<<<<<<<<<
 * 
 *         wrapper._pos = _wrap_ovrVector3f_as_ndarray(&ptr.Position)
 */
  __pyx_v_wrapper->ptr_owner = __pyx_v_owner;

  /* "psychxr/libovr/_libovr.pyx":885
 *         wrapper.ptr_owner = owner
 * 
 *         wrapper._pos = _wrap_ovrVector3f_as_ndarray(&ptr.Position)             # <<<<<<<<<<<<<<
 *         wrapper._ori = _wrap_ovrQuatf_as_ndarray(&ptr.Orientation)
 *         wrapper._bbox = None
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_ptr->Position))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_pos));
  __pyx_v_wrapper->_pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":886
 * 
 *         wrapper._pos = _wrap_ovrVector3f_as_ndarray(&ptr.Position)
 *         wrapper._ori = _wrap_ovrQuatf_as_ndarray(&ptr.Orientation)             # <<<<<<<<<<<<<<
 *         wrapper._bbox = None
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrQuatf_as_ndarray((&__pyx_v_ptr->Orientation))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_ori);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_ori));
  __pyx_v_wrapper->_ori = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":887
 *         wrapper._pos = _wrap_ovrVector3f_as_ndarray(&ptr.Position)
 *         wrapper._ori = _wrap_ovrQuatf_as_ndarray(&ptr.Orientation)
 *         wrapper._bbox = None             # <<<<<<<<<<<<<<
 * 
 *         return wrapper
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_wrapper->_bbox);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_bbox));
  __pyx_v_wrapper->_bbox = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)Py_None);

  /* "psychxr/libovr/_libovr.pyx":889
 *         wrapper._bbox = None
 * 
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cdef void _new_struct(self, object pos, object ori):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_wrapper));
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":880
 * 
 *     @staticmethod
 *     cdef LibOVRPose fromPtr(capi.ovrPosef* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRPose wrapper = LibOVRPose.__new__(LibOVRPose)
 *         wrapper.c_data = ptr
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.fromPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":891
 *         return wrapper
 * 
 *     cdef void _new_struct(self, object pos, object ori):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

static void __pyx_f_7psychxr_6libovr_7_libovr_10LibOVRPose__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_ori) {
  ovrPosef *__pyx_v_ptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  float __pyx_t_3;
  __Pyx_RefNannySetupContext("_new_struct", 0);

  /* "psychxr/libovr/_libovr.pyx":892
 * 
 *     cdef void _new_struct(self, object pos, object ori):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":893
 *     cdef void _new_struct(self, object pos, object ori):
 *         if self.c_data is not NULL:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 */
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":892
 * 
 *     cdef void _new_struct(self, object pos, object ori):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":895
 *             return
 * 
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))             # <<<<<<<<<<<<<<
 * 
 *         if ptr is NULL:
 */
  __pyx_v_ptr = ((ovrPosef *)PyMem_Malloc((sizeof(ovrPosef))));

  /* "psychxr/libovr/_libovr.pyx":897
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":898
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         # clear memory
 */
    PyErr_NoMemory(); __PYX_ERR(0, 898, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":897
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":901
 * 
 *         # clear memory
 *         ptr.Position.x = <float>pos[0]             # <<<<<<<<<<<<<<
 *         ptr.Position.y = <float>pos[1]
 *         ptr.Position.z = <float>pos[2]
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ptr->Position.x = ((float)__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":902
 *         # clear memory
 *         ptr.Position.x = <float>pos[0]
 *         ptr.Position.y = <float>pos[1]             # <<<<<<<<<<<<<<
 *         ptr.Position.z = <float>pos[2]
 *         ptr.Orientation.x = <float>ori[0]
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ptr->Position.y = ((float)__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":903
 *         ptr.Position.x = <float>pos[0]
 *         ptr.Position.y = <float>pos[1]
 *         ptr.Position.z = <float>pos[2]             # <<<<<<<<<<<<<<
 *         ptr.Orientation.x = <float>ori[0]
 *         ptr.Orientation.y = <float>ori[1]
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ptr->Position.z = ((float)__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":904
 *         ptr.Position.y = <float>pos[1]
 *         ptr.Position.z = <float>pos[2]
 *         ptr.Orientation.x = <float>ori[0]             # <<<<<<<<<<<<<<
 *         ptr.Orientation.y = <float>ori[1]
 *         ptr.Orientation.z = <float>ori[2]
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ori, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ptr->Orientation.x = ((float)__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":905
 *         ptr.Position.z = <float>pos[2]
 *         ptr.Orientation.x = <float>ori[0]
 *         ptr.Orientation.y = <float>ori[1]             # <<<<<<<<<<<<<<
 *         ptr.Orientation.z = <float>ori[2]
 *         ptr.Orientation.w = <float>ori[3]
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ori, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ptr->Orientation.y = ((float)__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":906
 *         ptr.Orientation.x = <float>ori[0]
 *         ptr.Orientation.y = <float>ori[1]
 *         ptr.Orientation.z = <float>ori[2]             # <<<<<<<<<<<<<<
 *         ptr.Orientation.w = <float>ori[3]
 * 
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ori, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ptr->Orientation.z = ((float)__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":907
 *         ptr.Orientation.y = <float>ori[1]
 *         ptr.Orientation.z = <float>ori[2]
 *         ptr.Orientation.w = <float>ori[3]             # <<<<<<<<<<<<<<
 * 
 *         self.c_data = ptr
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ori, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ptr->Orientation.w = ((float)__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":909
 *         ptr.Orientation.w = <float>ori[3]
 * 
 *         self.c_data = ptr             # <<<<<<<<<<<<<<
 *         self.ptr_owner = True
 * 
 */
  __pyx_v_self->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":910
 * 
 *         self.c_data = ptr
 *         self.ptr_owner = True             # <<<<<<<<<<<<<<
 * 
 *         self._pos = _wrap_ovrVector3f_as_ndarray(&ptr.Position)
 */
  __pyx_v_self->ptr_owner = 1;

  /* "psychxr/libovr/_libovr.pyx":912
 *         self.ptr_owner = True
 * 
 *         self._pos = _wrap_ovrVector3f_as_ndarray(&ptr.Position)             # <<<<<<<<<<<<<<
 *         self._ori = _wrap_ovrQuatf_as_ndarray(&ptr.Orientation)
 *         self._bbox = None
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_ptr->Position))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pos));
  __pyx_v_self->_pos = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":913
 * 
 *         self._pos = _wrap_ovrVector3f_as_ndarray(&ptr.Position)
 *         self._ori = _wrap_ovrQuatf_as_ndarray(&ptr.Orientation)             # <<<<<<<<<<<<<<
 *         self._bbox = None
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrQuatf_as_ndarray((&__pyx_v_ptr->Orientation))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_ori);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_ori));
  __pyx_v_self->_ori = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":914
 *         self._pos = _wrap_ovrVector3f_as_ndarray(&ptr.Position)
 *         self._ori = _wrap_ovrQuatf_as_ndarray(&ptr.Orientation)
 *         self._bbox = None             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_bbox);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_bbox));
  __pyx_v_self->_bbox = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)Py_None);

  /* "psychxr/libovr/_libovr.pyx":891
 *         return wrapper
 * 
 *     cdef void _new_struct(self, object pos, object ori):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.LibOVRPose._new_struct", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "psychxr/libovr/_libovr.pyx":916
 *         self._bbox = None
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 */

/* Python wrapper */
static void __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_4__dealloc__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static void __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "psychxr/libovr/_libovr.pyx":918
 *     def __dealloc__(self):
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":919
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    __pyx_t_1 = ((__pyx_v_self->ptr_owner == 1) != 0);
    if (__pyx_t_1) {

      /* "psychxr/libovr/_libovr.pyx":920
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)             # <<<<<<<<<<<<<<
 *                 self.c_data = NULL
 * 
 */
      PyMem_Free(__pyx_v_self->c_data);

      /* "psychxr/libovr/_libovr.pyx":921
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(LibOVRPose a, LibOVRPose b):
 */
      __pyx_v_self->c_data = NULL;

      /* "psychxr/libovr/_libovr.pyx":919
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    }

    /* "psychxr/libovr/_libovr.pyx":918
 *     def __dealloc__(self):
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  }

  /* "psychxr/libovr/_libovr.pyx":916
 *         self._bbox = None
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 */

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

/* "psychxr/libovr/_libovr.pyx":923
 *                 self.c_data = NULL
 * 
 *     def __mul__(LibOVRPose a, LibOVRPose b):             # <<<<<<<<<<<<<<
 *         """Multiplication operator (*) to combine poses.
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_7__mul__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__[] = "Multiplication operator (*) to combine poses.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__;
#endif
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_7__mul__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "a", 0))) __PYX_ERR(0, 923, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "b", 0))) __PYX_ERR(0, 923, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_a), ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_b));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_a, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_b) {
  ovrPosef *__pyx_v_ptr;
  OVR::Posef __pyx_v_pose_r;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr __pyx_t_3;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "psychxr/libovr/_libovr.pyx":926
 *         """Multiplication operator (*) to combine poses.
 *         """
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))             # <<<<<<<<<<<<<<
 * 
 *         if ptr is NULL:
 */
  __pyx_v_ptr = ((ovrPosef *)PyMem_Malloc((sizeof(ovrPosef))));

  /* "psychxr/libovr/_libovr.pyx":928
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":929
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef pose_r = \
 */
    PyErr_NoMemory(); __PYX_ERR(0, 929, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":928
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":932
 * 
 *         cdef libovr_math.Posef pose_r = \
 *             <libovr_math.Posef>a.c_data[0] * <libovr_math.Posef>b.c_data[0]             # <<<<<<<<<<<<<<
 * 
 *         # copy into
 */
  __pyx_v_pose_r = (((OVR::Posef)(__pyx_v_a->c_data[0])) * ((OVR::Posef)(__pyx_v_b->c_data[0])));

  /* "psychxr/libovr/_libovr.pyx":935
 * 
 *         # copy into
 *         ptr[0] = <capi.ovrPosef>pose_r             # <<<<<<<<<<<<<<
 *         return LibOVRPose.fromPtr(ptr, True)
 * 
 */
  (__pyx_v_ptr[0]) = __pyx_v_pose_r;

  /* "psychxr/libovr/_libovr.pyx":936
 *         # copy into
 *         ptr[0] = <capi.ovrPosef>pose_r
 *         return LibOVRPose.fromPtr(ptr, True)             # <<<<<<<<<<<<<<
 * 
 *     def __imul__(self, LibOVRPose other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.owner = 1;
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr(__pyx_v_ptr, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":923
 *                 self.c_data = NULL
 * 
 *     def __mul__(LibOVRPose a, LibOVRPose b):             # <<<<<<<<<<<<<<
 *         """Multiplication operator (*) to combine poses.
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":938
 *         return LibOVRPose.fromPtr(ptr, True)
 * 
 *     def __imul__(self, LibOVRPose other):             # <<<<<<<<<<<<<<
 *         """Multiplication operator (*=) to combine poses.
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_9__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__[] = "Multiplication operator (*=) to combine poses.\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__;
#endif
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_9__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "other", 0))) __PYX_ERR(0, 938, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_other) {
  OVR::Posef __pyx_v_this_pose;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__imul__", 0);

  /* "psychxr/libovr/_libovr.pyx":941
 *         """Multiplication operator (*=) to combine poses.
 *         """
 *         cdef libovr_math.Posef this_pose = <libovr_math.Posef>self.c_data[0]             # <<<<<<<<<<<<<<
 *         self.c_data[0] = <capi.ovrPosef>(
 *                 <libovr_math.Posef>other.c_data[0] * this_pose)
 */
  __pyx_v_this_pose = ((OVR::Posef)(__pyx_v_self->c_data[0]));

  /* "psychxr/libovr/_libovr.pyx":942
 *         """
 *         cdef libovr_math.Posef this_pose = <libovr_math.Posef>self.c_data[0]
 *         self.c_data[0] = <capi.ovrPosef>(             # <<<<<<<<<<<<<<
 *                 <libovr_math.Posef>other.c_data[0] * this_pose)
 * 
 */
  (__pyx_v_self->c_data[0]) = (((OVR::Posef)(__pyx_v_other->c_data[0])) * __pyx_v_this_pose);

  /* "psychxr/libovr/_libovr.pyx":945
 *                 <libovr_math.Posef>other.c_data[0] * this_pose)
 * 
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __invert__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":938
 *         return LibOVRPose.fromPtr(ptr, True)
 * 
 *     def __imul__(self, LibOVRPose other):             # <<<<<<<<<<<<<<
 *         """Multiplication operator (*=) to combine poses.
 *         """
 */

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

/* "psychxr/libovr/_libovr.pyx":947
 *         return self
 * 
 *     def __invert__(self):             # <<<<<<<<<<<<<<
 *         """Invert operator (~) to invert a pose."""
 *         return self.inverted()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_11__invert__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__[] = "Invert operator (~) to invert a pose.";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__;
#endif
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_11__invert__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__invert__", 0);

  /* "psychxr/libovr/_libovr.pyx":949
 *     def __invert__(self):
 *         """Invert operator (~) to invert a pose."""
 *         return self.inverted()             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, LibOVRPose other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_inverted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":947
 *         return self
 * 
 *     def __invert__(self):             # <<<<<<<<<<<<<<
 *         """Invert operator (~) to invert a pose."""
 *         return self.inverted()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":951
 *         return self.inverted()
 * 
 *     def __eq__(self, LibOVRPose other):             # <<<<<<<<<<<<<<
 *         """Equality operator (==) for two poses.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_13__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__[] = "Equality operator (==) for two poses.\n\n        The tolerance of the comparison is defined by the Oculus SDK as 1e-5.\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__;
#endif
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_13__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "other", 0))) __PYX_ERR(0, 951, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "psychxr/libovr/_libovr.pyx":957
 * 
 *         """
 *         return (<libovr_math.Posef>self.c_data[0]).IsEqual(             # <<<<<<<<<<<<<<
 *             <libovr_math.Posef>other.c_data[0], <float>1e-5)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":958
 *         """
 *         return (<libovr_math.Posef>self.c_data[0]).IsEqual(
 *             <libovr_math.Posef>other.c_data[0], <float>1e-5)             # <<<<<<<<<<<<<<
 * 
 *     def __ne__(self, LibOVRPose other):
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(((OVR::Posef)(__pyx_v_self->c_data[0])).IsEqual(((OVR::Posef)(__pyx_v_other->c_data[0])), ((float)1e-5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":951
 *         return self.inverted()
 * 
 *     def __eq__(self, LibOVRPose other):             # <<<<<<<<<<<<<<
 *         """Equality operator (==) for two poses.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":960
 *             <libovr_math.Posef>other.c_data[0], <float>1e-5)
 * 
 *     def __ne__(self, LibOVRPose other):             # <<<<<<<<<<<<<<
 *         """Inequality operator (!=) for two poses.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_15__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__[] = "Inequality operator (!=) for two poses.\n\n        The tolerance of the comparison is defined by the Oculus SDK as 1e-5.\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__;
#endif
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_15__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "other", 0))) __PYX_ERR(0, 960, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__ne__", 0);

  /* "psychxr/libovr/_libovr.pyx":966
 * 
 *         """
 *         return not (<libovr_math.Posef>self.c_data[0]).IsEqual(             # <<<<<<<<<<<<<<
 *             <libovr_math.Posef>other.c_data[0], <float>1e-5)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":967
 *         """
 *         return not (<libovr_math.Posef>self.c_data[0]).IsEqual(
 *             <libovr_math.Posef>other.c_data[0], <float>1e-5)             # <<<<<<<<<<<<<<
 * 
 *     def __deepcopy__(self, memo=None):
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(((OVR::Posef)(__pyx_v_self->c_data[0])).IsEqual(((OVR::Posef)(__pyx_v_other->c_data[0])), ((float)1e-5)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":960
 *             <libovr_math.Posef>other.c_data[0], <float>1e-5)
 * 
 *     def __ne__(self, LibOVRPose other):             # <<<<<<<<<<<<<<
 *         """Inequality operator (!=) for two poses.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":969
 *             <libovr_math.Posef>other.c_data[0], <float>1e-5)
 * 
 *     def __deepcopy__(self, memo=None):             # <<<<<<<<<<<<<<
 *         # create a new object with a copy of the data stored in c_data
 *         # allocate new struct
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_17__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_16__deepcopy__[] = "LibOVRPose.__deepcopy__(self, memo=None)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_17__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_memo = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memo,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(0, 969, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_memo = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__deepcopy__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 969, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_16__deepcopy__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_memo);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_16__deepcopy__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_memo) {
  ovrPosef *__pyx_v_ptr;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__deepcopy__", 0);

  /* "psychxr/libovr/_libovr.pyx":972
 *         # create a new object with a copy of the data stored in c_data
 *         # allocate new struct
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))             # <<<<<<<<<<<<<<
 * 
 *         if ptr is NULL:
 */
  __pyx_v_ptr = ((ovrPosef *)PyMem_Malloc((sizeof(ovrPosef))));

  /* "psychxr/libovr/_libovr.pyx":974
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":975
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         cdef LibOVRPose to_return = LibOVRPose.fromPtr(ptr, owner=True)
 */
    PyErr_NoMemory(); __PYX_ERR(0, 975, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":974
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":977
 *             raise MemoryError
 * 
 *         cdef LibOVRPose to_return = LibOVRPose.fromPtr(ptr, owner=True)             # <<<<<<<<<<<<<<
 * 
 *         # copy over data
 */
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.owner = 1;
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr(__pyx_v_ptr, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":980
 * 
 *         # copy over data
 *         to_return.c_data[0] = self.c_data[0]             # <<<<<<<<<<<<<<
 *         if memo is not None:
 *             memo[id(self)] = to_return
 */
  (__pyx_v_to_return->c_data[0]) = (__pyx_v_self->c_data[0]);

  /* "psychxr/libovr/_libovr.pyx":981
 *         # copy over data
 *         to_return.c_data[0] = self.c_data[0]
 *         if memo is not None:             # <<<<<<<<<<<<<<
 *             memo[id(self)] = to_return
 * 
 */
  __pyx_t_1 = (__pyx_v_memo != Py_None);
  __pyx_t_4 = (__pyx_t_1 != 0);
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":982
 *         to_return.c_data[0] = self.c_data[0]
 *         if memo is not None:
 *             memo[id(self)] = to_return             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_2, ((PyObject *)__pyx_v_to_return)) < 0)) __PYX_ERR(0, 982, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "psychxr/libovr/_libovr.pyx":981
 *         # copy over data
 *         to_return.c_data[0] = self.c_data[0]
 *         if memo is not None:             # <<<<<<<<<<<<<<
 *             memo[id(self)] = to_return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":984
 *             memo[id(self)] = to_return
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":969
 *             <libovr_math.Posef>other.c_data[0], <float>1e-5)
 * 
 *     def __deepcopy__(self, memo=None):             # <<<<<<<<<<<<<<
 *         # create a new object with a copy of the data stored in c_data
 *         # allocate new struct
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":987
 * 
 *     @property
 *     def bounds(self):             # <<<<<<<<<<<<<<
 *         """Bounding object associated with this pose."""
 *         return self._bbox
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":989
 *     def bounds(self):
 *         """Bounding object associated with this pose."""
 *         return self._bbox             # <<<<<<<<<<<<<<
 * 
 *     @bounds.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_bbox));
  __pyx_r = ((PyObject *)__pyx_v_self->_bbox);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":987
 * 
 *     @property
 *     def bounds(self):             # <<<<<<<<<<<<<<
 *         """Bounding object associated with this pose."""
 *         return self._bbox
 */

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

/* "psychxr/libovr/_libovr.pyx":992
 * 
 *     @bounds.setter
 *     def bounds(self, LibOVRBounds value):             # <<<<<<<<<<<<<<
 *         self._bbox = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRBounds, 1, "value", 0))) __PYX_ERR(0, 992, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":993
 *     @bounds.setter
 *     def bounds(self, LibOVRBounds value):
 *         self._bbox = value             # <<<<<<<<<<<<<<
 * 
 *     def isEqual(self, LibOVRPose pose, float tolerance=1e-5):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_value));
  __Pyx_GOTREF(__pyx_v_self->_bbox);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_bbox));
  __pyx_v_self->_bbox = __pyx_v_value;

  /* "psychxr/libovr/_libovr.pyx":992
 * 
 *     @bounds.setter
 *     def bounds(self, LibOVRBounds value):             # <<<<<<<<<<<<<<
 *         self._bbox = value
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":995
 *         self._bbox = value
 * 
 *     def isEqual(self, LibOVRPose pose, float tolerance=1e-5):             # <<<<<<<<<<<<<<
 *         """Check if poses are close to equal in position and orientation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_19isEqual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_18isEqual[] = "LibOVRPose.isEqual(self, LibOVRPose pose, float tolerance=1e-5)\nCheck if poses are close to equal in position and orientation.\n\n        Same as using the equality operator (==) on poses, but you can specify\n        and arbitrary value for `tolerance`.\n\n        Parameters\n        ----------\n        pose : LibOVRPose\n            The other pose.\n        tolerance : float, optional\n            Tolerance for the comparison, default is 1e-5 as defined in\n            `OVR_MATH.h`.\n\n        Returns\n        -------\n        bool\n            True if pose components are within `tolerance` from this pose.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_19isEqual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_pose = 0;
  float __pyx_v_tolerance;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isEqual (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pose,&__pyx_n_s_tolerance,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pose)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isEqual") < 0)) __PYX_ERR(0, 995, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)values[0]);
    if (values[1]) {
      __pyx_v_tolerance = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_tolerance == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L3_error)
    } else {
      __pyx_v_tolerance = ((float)1e-5);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isEqual", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 995, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.isEqual", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pose), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "pose", 0))) __PYX_ERR(0, 995, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_18isEqual(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_pose, __pyx_v_tolerance);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_18isEqual(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_pose, float __pyx_v_tolerance) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("isEqual", 0);

  /* "psychxr/libovr/_libovr.pyx":1015
 * 
 *         """
 *         return (<libovr_math.Posef>self.c_data[0]).IsEqual(             # <<<<<<<<<<<<<<
 *             <libovr_math.Posef>pose.c_data[0], tolerance)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":1016
 *         """
 *         return (<libovr_math.Posef>self.c_data[0]).IsEqual(
 *             <libovr_math.Posef>pose.c_data[0], tolerance)             # <<<<<<<<<<<<<<
 * 
 *     def duplicate(self):
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(((OVR::Posef)(__pyx_v_self->c_data[0])).IsEqual(((OVR::Posef)(__pyx_v_pose->c_data[0])), __pyx_v_tolerance)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":995
 *         self._bbox = value
 * 
 *     def isEqual(self, LibOVRPose pose, float tolerance=1e-5):             # <<<<<<<<<<<<<<
 *         """Check if poses are close to equal in position and orientation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.isEqual", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1018
 *             <libovr_math.Posef>pose.c_data[0], tolerance)
 * 
 *     def duplicate(self):             # <<<<<<<<<<<<<<
 *         """Create a deep copy of this object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_21duplicate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_20duplicate[] = "LibOVRPose.duplicate(self)\nCreate a deep copy of this object.\n\n        Same as calling `copy.deepcopy` on an instance.\n\n        Returns\n        -------\n        LibOVRPose\n            An independent copy of this object.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_21duplicate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("duplicate (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_20duplicate(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_20duplicate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("duplicate", 0);

  /* "psychxr/libovr/_libovr.pyx":1029
 * 
 *         """
 *         return self.__deepcopy__()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1018
 *             <libovr_math.Posef>pose.c_data[0], tolerance)
 * 
 *     def duplicate(self):             # <<<<<<<<<<<<<<
 *         """Create a deep copy of this object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.duplicate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1031
 *         return self.__deepcopy__()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return \
 *             "LibOVRPose(({px}, {py}, {pz}), ({rx}, {ry}, {rz}, {rw}))".format(
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_23__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_23__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_22__str__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_22__str__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "psychxr/libovr/_libovr.pyx":1032
 * 
 *     def __str__(self):
 *         return \             # <<<<<<<<<<<<<<
 *             "LibOVRPose(({px}, {py}, {pz}), ({rx}, {ry}, {rz}, {rw}))".format(
 *                 px=self.c_data[0].Position.x,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":1033
 *     def __str__(self):
 *         return \
 *             "LibOVRPose(({px}, {py}, {pz}), ({rx}, {ry}, {rz}, {rw}))".format(             # <<<<<<<<<<<<<<
 *                 px=self.c_data[0].Position.x,
 *                 py=self.c_data[0].Position.y,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_LibOVRPose_px_py_pz_rx_ry_rz_rw, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":1034
 *         return \
 *             "LibOVRPose(({px}, {py}, {pz}), ({rx}, {ry}, {rz}, {rw}))".format(
 *                 px=self.c_data[0].Position.x,             # <<<<<<<<<<<<<<
 *                 py=self.c_data[0].Position.y,
 *                 pz=self.c_data[0].Position.z,
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).Position.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_px, __pyx_t_3) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":1035
 *             "LibOVRPose(({px}, {py}, {pz}), ({rx}, {ry}, {rz}, {rw}))".format(
 *                 px=self.c_data[0].Position.x,
 *                 py=self.c_data[0].Position.y,             # <<<<<<<<<<<<<<
 *                 pz=self.c_data[0].Position.z,
 *                 rx=self.c_data[0].Orientation.x,
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).Position.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_py, __pyx_t_3) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":1036
 *                 px=self.c_data[0].Position.x,
 *                 py=self.c_data[0].Position.y,
 *                 pz=self.c_data[0].Position.z,             # <<<<<<<<<<<<<<
 *                 rx=self.c_data[0].Orientation.x,
 *                 ry=self.c_data[0].Orientation.y,
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).Position.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pz, __pyx_t_3) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":1037
 *                 py=self.c_data[0].Position.y,
 *                 pz=self.c_data[0].Position.z,
 *                 rx=self.c_data[0].Orientation.x,             # <<<<<<<<<<<<<<
 *                 ry=self.c_data[0].Orientation.y,
 *                 rz=self.c_data[0].Orientation.z,
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).Orientation.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_rx, __pyx_t_3) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":1038
 *                 pz=self.c_data[0].Position.z,
 *                 rx=self.c_data[0].Orientation.x,
 *                 ry=self.c_data[0].Orientation.y,             # <<<<<<<<<<<<<<
 *                 rz=self.c_data[0].Orientation.z,
 *                 rw=self.c_data[0].Orientation.w)
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).Orientation.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ry, __pyx_t_3) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":1039
 *                 rx=self.c_data[0].Orientation.x,
 *                 ry=self.c_data[0].Orientation.y,
 *                 rz=self.c_data[0].Orientation.z,             # <<<<<<<<<<<<<<
 *                 rw=self.c_data[0].Orientation.w)
 * 
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).Orientation.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_rz, __pyx_t_3) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":1040
 *                 ry=self.c_data[0].Orientation.y,
 *                 rz=self.c_data[0].Orientation.z,
 *                 rw=self.c_data[0].Orientation.w)             # <<<<<<<<<<<<<<
 * 
 *     def setIdentity(self):
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).Orientation.w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_rw, __pyx_t_3) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":1033
 *     def __str__(self):
 *         return \
 *             "LibOVRPose(({px}, {py}, {pz}), ({rx}, {ry}, {rz}, {rw}))".format(             # <<<<<<<<<<<<<<
 *                 px=self.c_data[0].Position.x,
 *                 py=self.c_data[0].Position.y,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1031
 *         return self.__deepcopy__()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return \
 *             "LibOVRPose(({px}, {py}, {pz}), ({rx}, {ry}, {rz}, {rw}))".format(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1042
 *                 rw=self.c_data[0].Orientation.w)
 * 
 *     def setIdentity(self):             # <<<<<<<<<<<<<<
 *         """Clear this pose's translation and orientation."""
 *         (<libovr_math.Posef>self.c_data[0]).SetIdentity()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_25setIdentity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_24setIdentity[] = "LibOVRPose.setIdentity(self)\nClear this pose's translation and orientation.";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_25setIdentity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setIdentity (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_24setIdentity(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_24setIdentity(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setIdentity", 0);

  /* "psychxr/libovr/_libovr.pyx":1044
 *     def setIdentity(self):
 *         """Clear this pose's translation and orientation."""
 *         (<libovr_math.Posef>self.c_data[0]).SetIdentity()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  ((OVR::Posef)(__pyx_v_self->c_data[0])).SetIdentity();

  /* "psychxr/libovr/_libovr.pyx":1042
 *                 rw=self.c_data[0].Orientation.w)
 * 
 *     def setIdentity(self):             # <<<<<<<<<<<<<<
 *         """Clear this pose's translation and orientation."""
 *         (<libovr_math.Posef>self.c_data[0]).SetIdentity()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1047
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         """ndarray : Position vector [X, Y, Z].
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":1075
 * 
 *         """
 *         return self._pos             # <<<<<<<<<<<<<<
 * 
 *     @pos.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_pos));
  __pyx_r = ((PyObject *)__pyx_v_self->_pos);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1047
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         """ndarray : Position vector [X, Y, Z].
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":1078
 * 
 *     @pos.setter
 *     def pos(self, object value):             # <<<<<<<<<<<<<<
 *         self._pos[:] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":1079
 *     @pos.setter
 *     def pos(self, object value):
 *         self._pos[:] = value             # <<<<<<<<<<<<<<
 * 
 *     def getPos(self, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_pos), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":1078
 * 
 *     @pos.setter
 *     def pos(self, object value):             # <<<<<<<<<<<<<<
 *         self._pos[:] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1081
 *         self._pos[:] = value
 * 
 *     def getPos(self, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Position vector X, Y, Z.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_27getPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_26getPos[] = "LibOVRPose.getPos(self, ndarray out=None)\nPosition vector X, Y, Z.\n\n        The returned object is a NumPy array which contains a copy of the data\n        stored in an internal structure (ovrPosef). The array is conformal with\n        the internal data's type (float32) and size (length 3).\n\n        Parameters\n        ----------\n        out : ndarray or None\n            Optional array to write values to. Must have a float32 data type.\n\n        Returns\n        -------\n        ndarray\n            Position coordinate of this pose.\n\n        Examples\n        --------\n\n        Get the position coordinates::\n\n            x, y, z = myPose.getPos()  # Python float literals\n            # ... or ...\n            pos = myPose.getPos()  # NumPy array shape=(3,) and dtype=float32\n\n        Write the position to an existing array by specifying `out`::\n\n            position = numpy.zeros((3,), dtype=numpy.float32)  # mind the dtype!\n            myPose.getPos(position)  # position now contains myPose.pos\n\n        You can also pass a view/slice to `out`::\n\n            coords = numpy.zeros((100,3,), dtype=numpy.float32)  # big array\n            myPose.getPos(coords[42,:])  # row 42\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_27getPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPos (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPos") < 0)) __PYX_ERR(0, 1081, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_out = ((PyArrayObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPos", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1081, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getPos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1081, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_26getPos(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_26getPos(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  __Pyx_RefNannySetupContext("getPos", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1081, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1119
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1120
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1120, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1120, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1119
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1122
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = self.c_data[0].Position.x
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1124
 *             toReturn = out
 * 
 *         toReturn[0] = self.c_data[0].Position.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = self.c_data[0].Position.y
 *         toReturn[2] = self.c_data[0].Position.z
 */
  __pyx_t_12 = (__pyx_v_self->c_data[0]).Position.x;
  __pyx_t_13 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_13 < 0) {
    __pyx_t_13 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1124, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_12;

  /* "psychxr/libovr/_libovr.pyx":1125
 * 
 *         toReturn[0] = self.c_data[0].Position.x
 *         toReturn[1] = self.c_data[0].Position.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = self.c_data[0].Position.z
 * 
 */
  __pyx_t_12 = (__pyx_v_self->c_data[0]).Position.y;
  __pyx_t_14 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_14 < 0) {
    __pyx_t_14 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1125, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_12;

  /* "psychxr/libovr/_libovr.pyx":1126
 *         toReturn[0] = self.c_data[0].Position.x
 *         toReturn[1] = self.c_data[0].Position.y
 *         toReturn[2] = self.c_data[0].Position.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_12 = (__pyx_v_self->c_data[0]).Position.z;
  __pyx_t_15 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_15 < 0) {
    __pyx_t_15 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1126, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_12;

  /* "psychxr/libovr/_libovr.pyx":1128
 *         toReturn[2] = self.c_data[0].Position.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def setPos(self, object pos):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1081
 *         self._pos[:] = value
 * 
 *     def getPos(self, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Position vector X, Y, Z.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getPos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1130
 *         return toReturn
 * 
 *     def setPos(self, object pos):             # <<<<<<<<<<<<<<
 *         """Set the position of the pose in a scene.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_29setPos(PyObject *__pyx_v_self, PyObject *__pyx_v_pos); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_28setPos[] = "LibOVRPose.setPos(self, pos)\nSet the position of the pose in a scene.\n\n        Parameters\n        ----------\n        pos : array_like\n            Position vector [X, Y, Z].\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_29setPos(PyObject *__pyx_v_self, PyObject *__pyx_v_pos) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setPos (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_28setPos(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v_pos));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_28setPos(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_pos) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  __Pyx_RefNannySetupContext("setPos", 0);

  /* "psychxr/libovr/_libovr.pyx":1139
 * 
 *         """
 *         self.c_data[0].Position.x = <float>pos[0]             # <<<<<<<<<<<<<<
 *         self.c_data[0].Position.y = <float>pos[1]
 *         self.c_data[0].Position.z = <float>pos[2]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->c_data[0]).Position.x = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1140
 *         """
 *         self.c_data[0].Position.x = <float>pos[0]
 *         self.c_data[0].Position.y = <float>pos[1]             # <<<<<<<<<<<<<<
 *         self.c_data[0].Position.z = <float>pos[2]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->c_data[0]).Position.y = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1141
 *         self.c_data[0].Position.x = <float>pos[0]
 *         self.c_data[0].Position.y = <float>pos[1]
 *         self.c_data[0].Position.z = <float>pos[2]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pos, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->c_data[0]).Position.z = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1130
 *         return toReturn
 * 
 *     def setPos(self, object pos):             # <<<<<<<<<<<<<<
 *         """Set the position of the pose in a scene.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.setPos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1144
 * 
 *     @property
 *     def ori(self):             # <<<<<<<<<<<<<<
 *         """ndarray : Orientation quaternion [X, Y, Z, W].
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":1147
 *         """ndarray : Orientation quaternion [X, Y, Z, W].
 *         """
 *         return self._ori             # <<<<<<<<<<<<<<
 * 
 *     @ori.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_ori));
  __pyx_r = ((PyObject *)__pyx_v_self->_ori);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1144
 * 
 *     @property
 *     def ori(self):             # <<<<<<<<<<<<<<
 *         """ndarray : Orientation quaternion [X, Y, Z, W].
 *         """
 */

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

/* "psychxr/libovr/_libovr.pyx":1150
 * 
 *     @ori.setter
 *     def ori(self, object value):             # <<<<<<<<<<<<<<
 *         self._ori[:] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":1151
 *     @ori.setter
 *     def ori(self, object value):
 *         self._ori[:] = value             # <<<<<<<<<<<<<<
 * 
 *     def getOri(self, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_ori), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 1151, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":1150
 * 
 *     @ori.setter
 *     def ori(self, object value):             # <<<<<<<<<<<<<<
 *         self._ori[:] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.ori.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1153
 *         self._ori[:] = value
 * 
 *     def getOri(self, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Orientation quaternion X, Y, Z, W. Components X, Y, Z are imaginary
 *         and W is real.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_31getOri(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_30getOri[] = "LibOVRPose.getOri(self, ndarray out=None)\nOrientation quaternion X, Y, Z, W. Components X, Y, Z are imaginary\n        and W is real.\n\n        The returned object is a NumPy array which references data stored in an\n        internal structure (ovrPosef). The array is conformal with the internal\n        data's type (float32) and size (length 4).\n\n        Parameters\n        ----------\n        out : ndarray  or None\n            Optional array to write values to. Must have a float32 data type.\n\n        Returns\n        -------\n        ndarray\n            Orientation quaternion of this pose.\n\n        Notes\n        -----\n\n        * The orientation quaternion should be normalized.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_31getOri(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOri (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getOri") < 0)) __PYX_ERR(0, 1153, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_out = ((PyArrayObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getOri", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1153, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getOri", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1153, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_30getOri(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_30getOri(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __Pyx_RefNannySetupContext("getOri", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1153, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1178
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((4,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1179
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((4,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1179, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1179, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1178
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((4,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1181
 *             toReturn = np.zeros((4,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = self.c_data[0].Orientation.x
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1183
 *             toReturn = out
 * 
 *         toReturn[0] = self.c_data[0].Orientation.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = self.c_data[0].Orientation.y
 *         toReturn[2] = self.c_data[0].Orientation.z
 */
  __pyx_t_12 = (__pyx_v_self->c_data[0]).Orientation.x;
  __pyx_t_13 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_13 < 0) {
    __pyx_t_13 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1183, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_12;

  /* "psychxr/libovr/_libovr.pyx":1184
 * 
 *         toReturn[0] = self.c_data[0].Orientation.x
 *         toReturn[1] = self.c_data[0].Orientation.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = self.c_data[0].Orientation.z
 *         toReturn[3] = self.c_data[0].Orientation.w
 */
  __pyx_t_12 = (__pyx_v_self->c_data[0]).Orientation.y;
  __pyx_t_14 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_14 < 0) {
    __pyx_t_14 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1184, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_12;

  /* "psychxr/libovr/_libovr.pyx":1185
 *         toReturn[0] = self.c_data[0].Orientation.x
 *         toReturn[1] = self.c_data[0].Orientation.y
 *         toReturn[2] = self.c_data[0].Orientation.z             # <<<<<<<<<<<<<<
 *         toReturn[3] = self.c_data[0].Orientation.w
 * 
 */
  __pyx_t_12 = (__pyx_v_self->c_data[0]).Orientation.z;
  __pyx_t_15 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_15 < 0) {
    __pyx_t_15 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1185, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_12;

  /* "psychxr/libovr/_libovr.pyx":1186
 *         toReturn[1] = self.c_data[0].Orientation.y
 *         toReturn[2] = self.c_data[0].Orientation.z
 *         toReturn[3] = self.c_data[0].Orientation.w             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_12 = (__pyx_v_self->c_data[0]).Orientation.w;
  __pyx_t_16 = 3;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1186, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_12;

  /* "psychxr/libovr/_libovr.pyx":1188
 *         toReturn[3] = self.c_data[0].Orientation.w
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def setOri(self, object ori):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1153
 *         self._ori[:] = value
 * 
 *     def getOri(self, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Orientation quaternion X, Y, Z, W. Components X, Y, Z are imaginary
 *         and W is real.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getOri", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1190
 *         return toReturn
 * 
 *     def setOri(self, object ori):             # <<<<<<<<<<<<<<
 *         """Set the orientation of the pose in a scene.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_33setOri(PyObject *__pyx_v_self, PyObject *__pyx_v_ori); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_32setOri[] = "LibOVRPose.setOri(self, ori)\nSet the orientation of the pose in a scene.\n\n        Parameters\n        ----------\n        ori : array_like\n            Orientation quaternion [X, Y, Z, W].\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_33setOri(PyObject *__pyx_v_self, PyObject *__pyx_v_ori) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOri (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_32setOri(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v_ori));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_32setOri(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_ori) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  __Pyx_RefNannySetupContext("setOri", 0);

  /* "psychxr/libovr/_libovr.pyx":1199
 * 
 *         """
 *         self.c_data[0].Orientation.x = <float>ori[0]             # <<<<<<<<<<<<<<
 *         self.c_data[0].Orientation.y = <float>ori[1]
 *         self.c_data[0].Orientation.z = <float>ori[2]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ori, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->c_data[0]).Orientation.x = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1200
 *         """
 *         self.c_data[0].Orientation.x = <float>ori[0]
 *         self.c_data[0].Orientation.y = <float>ori[1]             # <<<<<<<<<<<<<<
 *         self.c_data[0].Orientation.z = <float>ori[2]
 *         self.c_data[0].Orientation.w = <float>ori[3]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ori, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->c_data[0]).Orientation.y = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1201
 *         self.c_data[0].Orientation.x = <float>ori[0]
 *         self.c_data[0].Orientation.y = <float>ori[1]
 *         self.c_data[0].Orientation.z = <float>ori[2]             # <<<<<<<<<<<<<<
 *         self.c_data[0].Orientation.w = <float>ori[3]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ori, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->c_data[0]).Orientation.z = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1202
 *         self.c_data[0].Orientation.y = <float>ori[1]
 *         self.c_data[0].Orientation.z = <float>ori[2]
 *         self.c_data[0].Orientation.w = <float>ori[3]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ori, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->c_data[0]).Orientation.w = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1190
 *         return toReturn
 * 
 *     def setOri(self, object ori):             # <<<<<<<<<<<<<<
 *         """Set the orientation of the pose in a scene.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.setOri", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1205
 * 
 *     @property
 *     def posOri(self):             # <<<<<<<<<<<<<<
 *         """tuple (ndarray, ndarray) : Position vector and
 *         orientation quaternion.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":1209
 *         orientation quaternion.
 *         """
 *         return self.pos, self.ori             # <<<<<<<<<<<<<<
 * 
 *     @posOri.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ori); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1205
 * 
 *     @property
 *     def posOri(self):             # <<<<<<<<<<<<<<
 *         """tuple (ndarray, ndarray) : Position vector and
 *         orientation quaternion.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.posOri.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1212
 * 
 *     @posOri.setter
 *     def posOri(self, object value):             # <<<<<<<<<<<<<<
 *         self.pos = value[0]
 *         self.ori = value[1]
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":1213
 *     @posOri.setter
 *     def posOri(self, object value):
 *         self.pos = value[0]             # <<<<<<<<<<<<<<
 *         self.ori = value[1]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pos, __pyx_t_1) < 0) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":1214
 *     def posOri(self, object value):
 *         self.pos = value[0]
 *         self.ori = value[1]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ori, __pyx_t_1) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":1212
 * 
 *     @posOri.setter
 *     def posOri(self, object value):             # <<<<<<<<<<<<<<
 *         self.pos = value[0]
 *         self.ori = value[1]
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.posOri.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1217
 * 
 *     @property
 *     def at(self):             # <<<<<<<<<<<<<<
 *         """ndarray : Forward vector of this pose (-Z is forward)
 *         (read-only).
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_2at_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_2at_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_2at___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_2at___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":1221
 *         (read-only).
 *         """
 *         return self.getAt()             # <<<<<<<<<<<<<<
 * 
 *     def getAt(self, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getAt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1217
 * 
 *     @property
 *     def at(self):             # <<<<<<<<<<<<<<
 *         """ndarray : Forward vector of this pose (-Z is forward)
 *         (read-only).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.at.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1223
 *         return self.getAt()
 * 
 *     def getAt(self, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Get the `at` vector for this pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_35getAt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_34getAt[] = "LibOVRPose.getAt(self, ndarray out=None)\nGet the `at` vector for this pose.\n\n        Parameters\n        ----------\n        out : ndarray or None\n            Optional array to write values to. Must have shape (3,) and a float32\n            data type.\n\n        Returns\n        -------\n        ndarray\n            The vector for `at`.\n\n        Notes\n        -----\n        It's better to use the `at` property if you are not supplying an output\n        array.\n\n        Examples\n        --------\n\n        Setting the listener orientation for 3D positional audio (PyOpenAL)::\n\n            myListener.set_orientation((*myPose.getAt(), *myPose.getUp()))\n\n        See Also\n        --------\n        getUp : Get the `up` vector.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_35getAt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getAt") < 0)) __PYX_ERR(0, 1223, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_out = ((PyArrayObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getAt", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1223, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getAt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1223, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_34getAt(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_34getAt(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Vector3f __pyx_v_at;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  OVR::Vector3f __pyx_t_12;
  float __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __Pyx_RefNannySetupContext("getAt", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1223, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1255
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1256
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1256, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1256, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1255
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1258
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Vector3f at = \
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1258, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1262
 *         cdef libovr_math.Vector3f at = \
 *             (<libovr_math.Posef>self.c_data[0]).TransformNormal(
 *                 libovr_math.Vector3f(0.0, 0.0, -1.0))             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = at.x
 */
  try {
    __pyx_t_12 = OVR::Vector3f(0.0, 0.0, -1.0);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1262, __pyx_L1_error)
  }

  /* "psychxr/libovr/_libovr.pyx":1261
 * 
 *         cdef libovr_math.Vector3f at = \
 *             (<libovr_math.Posef>self.c_data[0]).TransformNormal(             # <<<<<<<<<<<<<<
 *                 libovr_math.Vector3f(0.0, 0.0, -1.0))
 * 
 */
  __pyx_v_at = ((OVR::Posef)(__pyx_v_self->c_data[0])).TransformNormal(__pyx_t_12);

  /* "psychxr/libovr/_libovr.pyx":1264
 *                 libovr_math.Vector3f(0.0, 0.0, -1.0))
 * 
 *         toReturn[0] = at.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = at.y
 *         toReturn[2] = at.z
 */
  __pyx_t_13 = __pyx_v_at.x;
  __pyx_t_14 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_14 < 0) {
    __pyx_t_14 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1264, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_13;

  /* "psychxr/libovr/_libovr.pyx":1265
 * 
 *         toReturn[0] = at.x
 *         toReturn[1] = at.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = at.z
 * 
 */
  __pyx_t_13 = __pyx_v_at.y;
  __pyx_t_15 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_15 < 0) {
    __pyx_t_15 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1265, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_13;

  /* "psychxr/libovr/_libovr.pyx":1266
 *         toReturn[0] = at.x
 *         toReturn[1] = at.y
 *         toReturn[2] = at.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_13 = __pyx_v_at.z;
  __pyx_t_16 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1266, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_13;

  /* "psychxr/libovr/_libovr.pyx":1268
 *         toReturn[2] = at.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1223
 *         return self.getAt()
 * 
 *     def getAt(self, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Get the `at` vector for this pose.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getAt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1271
 * 
 *     @property
 *     def up(self):             # <<<<<<<<<<<<<<
 *         """ndarray : Up vector of this pose (+Y is up) (read-only)."""
 *         return self.getUp()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_2up_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_2up_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_2up___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_2up___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":1273
 *     def up(self):
 *         """ndarray : Up vector of this pose (+Y is up) (read-only)."""
 *         return self.getUp()             # <<<<<<<<<<<<<<
 * 
 *     def getUp(self, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getUp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1271
 * 
 *     @property
 *     def up(self):             # <<<<<<<<<<<<<<
 *         """ndarray : Up vector of this pose (+Y is up) (read-only)."""
 *         return self.getUp()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.up.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1275
 *         return self.getUp()
 * 
 *     def getUp(self, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Get the 'up' vector for this pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_37getUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_36getUp[] = "LibOVRPose.getUp(self, ndarray out=None)\nGet the 'up' vector for this pose.\n\n        Parameters\n        ----------\n        out : ndarray, optional\n            Optional array to write values to. Must have shape (3,) and a float32\n            data type.\n\n        Returns\n        -------\n        ndarray\n            The vector for `up`.\n\n        Notes\n        -----\n        It's better to use the `up` property if you are not supplying an output\n        array. However, `getUp` will have the same effect as the `up` property\n        if `out`=None.\n\n        Examples\n        --------\n\n        Using the `up` vector with gluLookAt::\n\n            up = myPose.getUp()  # myPose.up also works\n            center = myPose.pos\n            target = targetPose.pos  # some target pose\n            gluLookAt(*(*up, *center, *target))\n\n        See Also\n        --------\n        getAt : Get the `up` vector.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_37getUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getUp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_out,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getUp") < 0)) __PYX_ERR(0, 1275, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_out = ((PyArrayObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getUp", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1275, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getUp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1275, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_36getUp(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_36getUp(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Vector3f __pyx_v_up;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  OVR::Vector3f __pyx_t_12;
  float __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __Pyx_RefNannySetupContext("getUp", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1275, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1311
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1312
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1312, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1312, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1311
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1314
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Vector3f up = \
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1314, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1318
 *         cdef libovr_math.Vector3f up = \
 *             (<libovr_math.Posef>self.c_data[0]).TransformNormal(
 *                 libovr_math.Vector3f(0.0, 1.0, 0.0))             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = up.x
 */
  try {
    __pyx_t_12 = OVR::Vector3f(0.0, 1.0, 0.0);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1318, __pyx_L1_error)
  }

  /* "psychxr/libovr/_libovr.pyx":1317
 * 
 *         cdef libovr_math.Vector3f up = \
 *             (<libovr_math.Posef>self.c_data[0]).TransformNormal(             # <<<<<<<<<<<<<<
 *                 libovr_math.Vector3f(0.0, 1.0, 0.0))
 * 
 */
  __pyx_v_up = ((OVR::Posef)(__pyx_v_self->c_data[0])).TransformNormal(__pyx_t_12);

  /* "psychxr/libovr/_libovr.pyx":1320
 *                 libovr_math.Vector3f(0.0, 1.0, 0.0))
 * 
 *         toReturn[0] = up.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = up.y
 *         toReturn[2] = up.z
 */
  __pyx_t_13 = __pyx_v_up.x;
  __pyx_t_14 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_14 < 0) {
    __pyx_t_14 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1320, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_13;

  /* "psychxr/libovr/_libovr.pyx":1321
 * 
 *         toReturn[0] = up.x
 *         toReturn[1] = up.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = up.z
 * 
 */
  __pyx_t_13 = __pyx_v_up.y;
  __pyx_t_15 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_15 < 0) {
    __pyx_t_15 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1321, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_13;

  /* "psychxr/libovr/_libovr.pyx":1322
 *         toReturn[0] = up.x
 *         toReturn[1] = up.y
 *         toReturn[2] = up.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_13 = __pyx_v_up.z;
  __pyx_t_16 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1322, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_13;

  /* "psychxr/libovr/_libovr.pyx":1324
 *         toReturn[2] = up.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def getOriAxisAngle(self, degrees=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1275
 *         return self.getUp()
 * 
 *     def getUp(self, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Get the 'up' vector for this pose.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getUp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1326
 *         return toReturn
 * 
 *     def getOriAxisAngle(self, degrees=True):             # <<<<<<<<<<<<<<
 *         """The axis and angle of rotation for this pose's orientation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_39getOriAxisAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_38getOriAxisAngle[] = "LibOVRPose.getOriAxisAngle(self, degrees=True)\nThe axis and angle of rotation for this pose's orientation.\n\n        Parameters\n        ----------\n        degrees : bool, optional\n            Return angle in degrees. Default is ``True``.\n\n        Returns\n        -------\n        tuple (ndarray, float)\n            Axis and angle.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_39getOriAxisAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_degrees = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOriAxisAngle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_degrees,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_True);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_degrees);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getOriAxisAngle") < 0)) __PYX_ERR(0, 1326, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_degrees = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getOriAxisAngle", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1326, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getOriAxisAngle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_38getOriAxisAngle(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_degrees);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_38getOriAxisAngle(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_degrees) {
  OVR::Vector3f __pyx_v_axis;
  float __pyx_v_angle;
  PyArrayObject *__pyx_v_ret_axis = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ret_axis;
  __Pyx_Buffer __pyx_pybuffer_ret_axis;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  float __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("getOriAxisAngle", 0);
  __pyx_pybuffer_ret_axis.pybuffer.buf = NULL;
  __pyx_pybuffer_ret_axis.refcount = 0;
  __pyx_pybuffernd_ret_axis.data = NULL;
  __pyx_pybuffernd_ret_axis.rcbuffer = &__pyx_pybuffer_ret_axis;

  /* "psychxr/libovr/_libovr.pyx":1343
 *         cdef float angle
 *         cdef np.ndarray[np.float32_t, ndim=1] ret_axis = \
 *             np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         (<libovr_math.Quatf>self.c_data.Orientation).GetAxisAngle(&axis, &angle)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1343, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ret_axis.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_ret_axis = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_ret_axis.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 1342, __pyx_L1_error)
    } else {__pyx_pybuffernd_ret_axis.diminfo[0].strides = __pyx_pybuffernd_ret_axis.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ret_axis.diminfo[0].shape = __pyx_pybuffernd_ret_axis.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_5 = 0;
  __pyx_v_ret_axis = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "psychxr/libovr/_libovr.pyx":1345
 *             np.zeros((3,), dtype=np.float32)
 * 
 *         (<libovr_math.Quatf>self.c_data.Orientation).GetAxisAngle(&axis, &angle)             # <<<<<<<<<<<<<<
 *         ret_axis[0] = axis.x
 *         ret_axis[1] = axis.y
 */
  ((OVR::Quatf)__pyx_v_self->c_data->Orientation).GetAxisAngle((&__pyx_v_axis), (&__pyx_v_angle));

  /* "psychxr/libovr/_libovr.pyx":1346
 * 
 *         (<libovr_math.Quatf>self.c_data.Orientation).GetAxisAngle(&axis, &angle)
 *         ret_axis[0] = axis.x             # <<<<<<<<<<<<<<
 *         ret_axis[1] = axis.y
 *         ret_axis[2] = axis.z
 */
  __pyx_t_6 = __pyx_v_axis.x;
  __pyx_t_7 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_pybuffernd_ret_axis.diminfo[0].shape;
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_ret_axis.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1346, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_ret_axis.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_ret_axis.diminfo[0].strides) = __pyx_t_6;

  /* "psychxr/libovr/_libovr.pyx":1347
 *         (<libovr_math.Quatf>self.c_data.Orientation).GetAxisAngle(&axis, &angle)
 *         ret_axis[0] = axis.x
 *         ret_axis[1] = axis.y             # <<<<<<<<<<<<<<
 *         ret_axis[2] = axis.z
 * 
 */
  __pyx_t_6 = __pyx_v_axis.y;
  __pyx_t_9 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_9 < 0) {
    __pyx_t_9 += __pyx_pybuffernd_ret_axis.diminfo[0].shape;
    if (unlikely(__pyx_t_9 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_ret_axis.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1347, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_ret_axis.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_ret_axis.diminfo[0].strides) = __pyx_t_6;

  /* "psychxr/libovr/_libovr.pyx":1348
 *         ret_axis[0] = axis.x
 *         ret_axis[1] = axis.y
 *         ret_axis[2] = axis.z             # <<<<<<<<<<<<<<
 * 
 *         if degrees:
 */
  __pyx_t_6 = __pyx_v_axis.z;
  __pyx_t_10 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_pybuffernd_ret_axis.diminfo[0].shape;
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_ret_axis.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1348, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_ret_axis.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_ret_axis.diminfo[0].strides) = __pyx_t_6;

  /* "psychxr/libovr/_libovr.pyx":1350
 *         ret_axis[2] = axis.z
 * 
 *         if degrees:             # <<<<<<<<<<<<<<
 *             angle *= RAD_TO_DEGF
 * 
 */
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_degrees); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1350, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "psychxr/libovr/_libovr.pyx":1351
 * 
 *         if degrees:
 *             angle *= RAD_TO_DEGF             # <<<<<<<<<<<<<<
 * 
 *         return angle, ret_axis
 */
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_angle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RAD_TO_DEGF); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_angle = __pyx_t_6;

    /* "psychxr/libovr/_libovr.pyx":1350
 *         ret_axis[2] = axis.z
 * 
 *         if degrees:             # <<<<<<<<<<<<<<
 *             angle *= RAD_TO_DEGF
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":1353
 *             angle *= RAD_TO_DEGF
 * 
 *         return angle, ret_axis             # <<<<<<<<<<<<<<
 * 
 *     def setOriAxisAngle(self, object axis, float angle, bint degrees=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_angle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_ret_axis));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_ret_axis));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_ret_axis));
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1326
 *         return toReturn
 * 
 *     def getOriAxisAngle(self, degrees=True):             # <<<<<<<<<<<<<<
 *         """The axis and angle of rotation for this pose's orientation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ret_axis.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getOriAxisAngle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ret_axis.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ret_axis);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1355
 *         return angle, ret_axis
 * 
 *     def setOriAxisAngle(self, object axis, float angle, bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Set the orientation of this pose using an axis and angle.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_41setOriAxisAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_40setOriAxisAngle[] = "LibOVRPose.setOriAxisAngle(self, axis, float angle, bool degrees=True)\nSet the orientation of this pose using an axis and angle.\n\n        Parameters\n        ----------\n        axis : array_like\n            Axis of rotation [rx, ry, rz].\n        angle : float\n            Angle of rotation.\n        degrees : bool, optional\n            Specify ``True`` if `angle` is in degrees, or else it will be\n            treated as radians. Default is ``True``.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_41setOriAxisAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_axis = 0;
  float __pyx_v_angle;
  int __pyx_v_degrees;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOriAxisAngle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_axis,&__pyx_n_s_angle,&__pyx_n_s_degrees,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_angle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setOriAxisAngle", 0, 2, 3, 1); __PYX_ERR(0, 1355, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_degrees);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOriAxisAngle") < 0)) __PYX_ERR(0, 1355, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_axis = values[0];
    __pyx_v_angle = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_angle == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1355, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_degrees = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_degrees == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1355, __pyx_L3_error)
    } else {
      __pyx_v_degrees = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOriAxisAngle", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1355, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.setOriAxisAngle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_40setOriAxisAngle(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_axis, __pyx_v_angle, __pyx_v_degrees);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_40setOriAxisAngle(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_axis, float __pyx_v_angle, int __pyx_v_degrees) {
  OVR::Vector3f __pyx_v_axis3f;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  float __pyx_t_3;
  float __pyx_t_4;
  OVR::Vector3f __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  OVR::Quatf __pyx_t_9;
  __Pyx_RefNannySetupContext("setOriAxisAngle", 0);

  /* "psychxr/libovr/_libovr.pyx":1370
 *         """
 *         cdef libovr_math.Vector3f axis3f = \
 *             libovr_math.Vector3f(<float>axis[0], <float>axis[1], <float>axis[2])             # <<<<<<<<<<<<<<
 * 
 *         if degrees:
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_axis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_axis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_axis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = OVR::Vector3f(((float)__pyx_t_2), ((float)__pyx_t_3), ((float)__pyx_t_4));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1370, __pyx_L1_error)
  }
  __pyx_v_axis3f = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":1372
 *             libovr_math.Vector3f(<float>axis[0], <float>axis[1], <float>axis[2])
 * 
 *         if degrees:             # <<<<<<<<<<<<<<
 *             angle *= DEG_TO_RADF
 * 
 */
  __pyx_t_6 = (__pyx_v_degrees != 0);
  if (__pyx_t_6) {

    /* "psychxr/libovr/_libovr.pyx":1373
 * 
 *         if degrees:
 *             angle *= DEG_TO_RADF             # <<<<<<<<<<<<<<
 * 
 *         self.c_data.Orientation = \
 */
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_angle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DEG_TO_RADF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_8); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_angle = __pyx_t_4;

    /* "psychxr/libovr/_libovr.pyx":1372
 *             libovr_math.Vector3f(<float>axis[0], <float>axis[1], <float>axis[2])
 * 
 *         if degrees:             # <<<<<<<<<<<<<<
 *             angle *= DEG_TO_RADF
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":1376
 * 
 *         self.c_data.Orientation = \
 *             <capi.ovrQuatf>libovr_math.Quatf(axis3f, angle)             # <<<<<<<<<<<<<<
 * 
 *     def getYawPitchRoll(self, LibOVRPose refPose=None, bint degrees=True, np.ndarray[np.float32_t] out=None):
 */
  try {
    __pyx_t_9 = OVR::Quatf(__pyx_v_axis3f, __pyx_v_angle);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1376, __pyx_L1_error)
  }

  /* "psychxr/libovr/_libovr.pyx":1375
 *             angle *= DEG_TO_RADF
 * 
 *         self.c_data.Orientation = \             # <<<<<<<<<<<<<<
 *             <capi.ovrQuatf>libovr_math.Quatf(axis3f, angle)
 * 
 */
  __pyx_v_self->c_data->Orientation = __pyx_t_9;

  /* "psychxr/libovr/_libovr.pyx":1355
 *         return angle, ret_axis
 * 
 *     def setOriAxisAngle(self, object axis, float angle, bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Set the orientation of this pose using an axis and angle.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.setOriAxisAngle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1378
 *             <capi.ovrQuatf>libovr_math.Quatf(axis3f, angle)
 * 
 *     def getYawPitchRoll(self, LibOVRPose refPose=None, bint degrees=True, np.ndarray[np.float32_t] out=None):             # <<<<<<<<<<<<<<
 *         """Get the yaw, pitch, and roll of the orientation quaternion.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_43getYawPitchRoll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_42getYawPitchRoll[] = "LibOVRPose.getYawPitchRoll(self, LibOVRPose refPose=None, bool degrees=True, ndarray out=None)\nGet the yaw, pitch, and roll of the orientation quaternion.\n\n        Parameters\n        ----------\n        refPose : LibOVRPose, optional\n            Reference pose to compute angles relative to. If `None` is\n            specified, computed values are referenced relative to the world\n            axes.\n        degrees : bool, optional\n            Return angle in degrees. Default is ``True``.\n        out : ndarray\n            Alternative place to write yaw, pitch, and roll values. Must have\n            shape (3,) and a float32 data type.\n\n        Returns\n        -------\n        ndarray\n            Yaw, pitch, and roll of the pose in degrees.\n\n        Notes\n        -----\n\n        * Uses ``OVR::Quatf.GetYawPitchRoll`` which is part of the Oculus PC\n          SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_43getYawPitchRoll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_refPose = 0;
  int __pyx_v_degrees;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getYawPitchRoll (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_refPose,&__pyx_n_s_degrees,&__pyx_n_s_out,0};
    PyObject* values[3] = {0,0,0};
    values[0] = (PyObject *)((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None);
    values[2] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_refPose);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_degrees);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getYawPitchRoll") < 0)) __PYX_ERR(0, 1378, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_refPose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)values[0]);
    if (values[1]) {
      __pyx_v_degrees = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_degrees == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1378, __pyx_L3_error)
    } else {
      __pyx_v_degrees = ((int)1);
    }
    __pyx_v_out = ((PyArrayObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getYawPitchRoll", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1378, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getYawPitchRoll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_refPose), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "refPose", 0))) __PYX_ERR(0, 1378, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1378, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_42getYawPitchRoll(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_refPose, __pyx_v_degrees, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_42getYawPitchRoll(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_refPose, int __pyx_v_degrees, PyArrayObject *__pyx_v_out) {
  float __pyx_v_yaw;
  float __pyx_v_pitch;
  float __pyx_v_roll;
  OVR::Posef __pyx_v_inPose;
  OVR::Posef __pyx_v_invRef;
  PyArrayObject *__pyx_v_toReturn = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __Pyx_RefNannySetupContext("getYawPitchRoll", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1378, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1406
 *         """
 *         cdef float yaw, pitch, roll
 *         cdef libovr_math.Posef inPose = <libovr_math.Posef>self.c_data[0]             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Posef invRef
 * 
 */
  __pyx_v_inPose = ((OVR::Posef)(__pyx_v_self->c_data[0]));

  /* "psychxr/libovr/_libovr.pyx":1410
 * 
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1411
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1411, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1411, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1411, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1410
 * 
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1413
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         if refPose is not None:
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1413, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1415
 *             toReturn = out
 * 
 *         if refPose is not None:             # <<<<<<<<<<<<<<
 *             invRef = (<libovr_math.Posef>refPose.c_data[0]).Inverted()
 *             inPose = invRef * inPose
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_refPose) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":1416
 * 
 *         if refPose is not None:
 *             invRef = (<libovr_math.Posef>refPose.c_data[0]).Inverted()             # <<<<<<<<<<<<<<
 *             inPose = invRef * inPose
 * 
 */
    __pyx_v_invRef = ((OVR::Posef)(__pyx_v_refPose->c_data[0])).Inverted();

    /* "psychxr/libovr/_libovr.pyx":1417
 *         if refPose is not None:
 *             invRef = (<libovr_math.Posef>refPose.c_data[0]).Inverted()
 *             inPose = invRef * inPose             # <<<<<<<<<<<<<<
 * 
 *         inPose.Rotation.GetYawPitchRoll(&yaw, &pitch, &roll)
 */
    __pyx_v_inPose = (__pyx_v_invRef * __pyx_v_inPose);

    /* "psychxr/libovr/_libovr.pyx":1415
 *             toReturn = out
 * 
 *         if refPose is not None:             # <<<<<<<<<<<<<<
 *             invRef = (<libovr_math.Posef>refPose.c_data[0]).Inverted()
 *             inPose = invRef * inPose
 */
  }

  /* "psychxr/libovr/_libovr.pyx":1419
 *             inPose = invRef * inPose
 * 
 *         inPose.Rotation.GetYawPitchRoll(&yaw, &pitch, &roll)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = yaw
 */
  __pyx_v_inPose.Rotation.GetYawPitchRoll((&__pyx_v_yaw), (&__pyx_v_pitch), (&__pyx_v_roll));

  /* "psychxr/libovr/_libovr.pyx":1421
 *         inPose.Rotation.GetYawPitchRoll(&yaw, &pitch, &roll)
 * 
 *         toReturn[0] = yaw             # <<<<<<<<<<<<<<
 *         toReturn[1] = pitch
 *         toReturn[2] = roll
 */
  __pyx_t_12 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1421, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_v_yaw;

  /* "psychxr/libovr/_libovr.pyx":1422
 * 
 *         toReturn[0] = yaw
 *         toReturn[1] = pitch             # <<<<<<<<<<<<<<
 *         toReturn[2] = roll
 * 
 */
  __pyx_t_13 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_13 < 0) {
    __pyx_t_13 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1422, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_v_pitch;

  /* "psychxr/libovr/_libovr.pyx":1423
 *         toReturn[0] = yaw
 *         toReturn[1] = pitch
 *         toReturn[2] = roll             # <<<<<<<<<<<<<<
 * 
 *         return np.degrees(toReturn) if degrees else toReturn
 */
  __pyx_t_14 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_14 < 0) {
    __pyx_t_14 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1423, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_v_roll;

  /* "psychxr/libovr/_libovr.pyx":1425
 *         toReturn[2] = roll
 * 
 *         return np.degrees(toReturn) if degrees else toReturn             # <<<<<<<<<<<<<<
 * 
 *     def getOriAngle(self, bint degrees=True):
 */
  __Pyx_XDECREF(__pyx_r);
  if ((__pyx_v_degrees != 0)) {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_degrees); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_toReturn)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_toReturn));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
    __pyx_t_6 = ((PyObject *)__pyx_v_toReturn);
  }
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1378
 *             <capi.ovrQuatf>libovr_math.Quatf(axis3f, angle)
 * 
 *     def getYawPitchRoll(self, LibOVRPose refPose=None, bint degrees=True, np.ndarray[np.float32_t] out=None):             # <<<<<<<<<<<<<<
 *         """Get the yaw, pitch, and roll of the orientation quaternion.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getYawPitchRoll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1427
 *         return np.degrees(toReturn) if degrees else toReturn
 * 
 *     def getOriAngle(self, bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Get the angle of this pose's orientation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_45getOriAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_44getOriAngle[] = "LibOVRPose.getOriAngle(self, bool degrees=True)\nGet the angle of this pose's orientation.\n\n        Parameters\n        ----------\n        degrees : bool, optional\n            Return angle in degrees. Default is ``True``.\n\n        Returns\n        -------\n        float\n            Angle of quaternion `ori`.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_45getOriAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_degrees;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOriAngle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_degrees,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_degrees);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getOriAngle") < 0)) __PYX_ERR(0, 1427, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_degrees = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_degrees == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1427, __pyx_L3_error)
    } else {
      __pyx_v_degrees = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getOriAngle", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1427, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getOriAngle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_44getOriAngle(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_degrees);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_44getOriAngle(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, int __pyx_v_degrees) {
  float __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getOriAngle", 0);

  /* "psychxr/libovr/_libovr.pyx":1442
 *         """
 *         cdef float to_return = \
 *             (<libovr_math.Quatf>self.c_data.Orientation).Angle()             # <<<<<<<<<<<<<<
 * 
 *         return to_return * RAD_TO_DEGF if degrees else to_return
 */
  __pyx_v_to_return = ((OVR::Quatf)__pyx_v_self->c_data->Orientation).Angle();

  /* "psychxr/libovr/_libovr.pyx":1444
 *             (<libovr_math.Quatf>self.c_data.Orientation).Angle()
 * 
 *         return to_return * RAD_TO_DEGF if degrees else to_return             # <<<<<<<<<<<<<<
 * 
 *     def alignTo(self, object alignTo):
 */
  __Pyx_XDECREF(__pyx_r);
  if ((__pyx_v_degrees != 0)) {
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_to_return); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RAD_TO_DEGF); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_to_return); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1427
 *         return np.degrees(toReturn) if degrees else toReturn
 * 
 *     def getOriAngle(self, bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Get the angle of this pose's orientation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getOriAngle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1446
 *         return to_return * RAD_TO_DEGF if degrees else to_return
 * 
 *     def alignTo(self, object alignTo):             # <<<<<<<<<<<<<<
 *         """Align this pose to another point or pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_47alignTo(PyObject *__pyx_v_self, PyObject *__pyx_v_alignTo); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_46alignTo[] = "LibOVRPose.alignTo(self, alignTo)\nAlign this pose to another point or pose.\n\n        This sets the orientation of this pose to one which orients the forward\n        axis towards `alignTo`.\n\n        Parameters\n        ----------\n        alignTo : array_like or LibOVRPose\n            Position vector [x, y, z] or pose to align to.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_47alignTo(PyObject *__pyx_v_self, PyObject *__pyx_v_alignTo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("alignTo (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_46alignTo(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v_alignTo));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_46alignTo(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_alignTo) {
  OVR::Vector3f __pyx_v_targ;
  OVR::Posef *__pyx_v_pose;
  OVR::Vector3f __pyx_v_fwd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  float __pyx_t_4;
  float __pyx_t_5;
  float __pyx_t_6;
  OVR::Vector3f __pyx_t_7;
  __Pyx_RefNannySetupContext("alignTo", 0);

  /* "psychxr/libovr/_libovr.pyx":1459
 *         """
 *         cdef libovr_math.Vector3f targ
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(alignTo, LibOVRPose):
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":1461
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 * 
 *         if isinstance(alignTo, LibOVRPose):             # <<<<<<<<<<<<<<
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>alignTo).c_data[0].Position
 *         else:
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_alignTo, __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1462
 * 
 *         if isinstance(alignTo, LibOVRPose):
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>alignTo).c_data[0].Position             # <<<<<<<<<<<<<<
 *         else:
 *             targ = libovr_math.Vector3f(
 */
    __pyx_v_targ = ((OVR::Vector3f)(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_alignTo)->c_data[0]).Position);

    /* "psychxr/libovr/_libovr.pyx":1461
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 * 
 *         if isinstance(alignTo, LibOVRPose):             # <<<<<<<<<<<<<<
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>alignTo).c_data[0].Position
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1464
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>alignTo).c_data[0].Position
 *         else:
 *             targ = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *                 <float>alignTo[0], <float>alignTo[1], <float>alignTo[2])
 * 
 */
  /*else*/ {

    /* "psychxr/libovr/_libovr.pyx":1465
 *         else:
 *             targ = libovr_math.Vector3f(
 *                 <float>alignTo[0], <float>alignTo[1], <float>alignTo[2])             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Vector3f fwd = libovr_math.Vector3f(0, 0, -1)
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_alignTo, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_alignTo, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_alignTo, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psychxr/libovr/_libovr.pyx":1464
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>alignTo).c_data[0].Position
 *         else:
 *             targ = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *                 <float>alignTo[0], <float>alignTo[1], <float>alignTo[2])
 * 
 */
    try {
      __pyx_t_7 = OVR::Vector3f(((float)__pyx_t_4), ((float)__pyx_t_5), ((float)__pyx_t_6));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 1464, __pyx_L1_error)
    }
    __pyx_v_targ = __pyx_t_7;
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1467
 *                 <float>alignTo[0], <float>alignTo[1], <float>alignTo[2])
 * 
 *         cdef libovr_math.Vector3f fwd = libovr_math.Vector3f(0, 0, -1)             # <<<<<<<<<<<<<<
 *         targ = pose.InverseTransform(targ)
 *         targ.Normalize()
 */
  try {
    __pyx_t_7 = OVR::Vector3f(0.0, 0.0, -1.0);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1467, __pyx_L1_error)
  }
  __pyx_v_fwd = __pyx_t_7;

  /* "psychxr/libovr/_libovr.pyx":1468
 * 
 *         cdef libovr_math.Vector3f fwd = libovr_math.Vector3f(0, 0, -1)
 *         targ = pose.InverseTransform(targ)             # <<<<<<<<<<<<<<
 *         targ.Normalize()
 * 
 */
  __pyx_v_targ = __pyx_v_pose->InverseTransform(__pyx_v_targ);

  /* "psychxr/libovr/_libovr.pyx":1469
 *         cdef libovr_math.Vector3f fwd = libovr_math.Vector3f(0, 0, -1)
 *         targ = pose.InverseTransform(targ)
 *         targ.Normalize()             # <<<<<<<<<<<<<<
 * 
 *         self.c_data.Orientation = \
 */
  __pyx_v_targ.Normalize();

  /* "psychxr/libovr/_libovr.pyx":1471
 *         targ.Normalize()
 * 
 *         self.c_data.Orientation = \             # <<<<<<<<<<<<<<
 *             <capi.ovrQuatf>(pose.Rotation * libovr_math.Quatf.Align(targ, fwd))
 * 
 */
  __pyx_v_self->c_data->Orientation = (__pyx_v_pose->Rotation * OVR::Quatf::Align(__pyx_v_targ, __pyx_v_fwd));

  /* "psychxr/libovr/_libovr.pyx":1446
 *         return to_return * RAD_TO_DEGF if degrees else to_return
 * 
 *     def alignTo(self, object alignTo):             # <<<<<<<<<<<<<<
 *         """Align this pose to another point or pose.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.alignTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1474
 *             <capi.ovrQuatf>(pose.Rotation * libovr_math.Quatf.Align(targ, fwd))
 * 
 *     def getSwingTwist(self, object twistAxis):             # <<<<<<<<<<<<<<
 *         """Swing and twist decomposition of this pose's rotation quaternion.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_49getSwingTwist(PyObject *__pyx_v_self, PyObject *__pyx_v_twistAxis); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_48getSwingTwist[] = "LibOVRPose.getSwingTwist(self, twistAxis)\nSwing and twist decomposition of this pose's rotation quaternion.\n\n        Where twist is a quaternion which rotates about `twistAxis` and swing is\n        perpendicular to that axis. When multiplied, the quaternions return the\n        original quaternion at `ori`.\n\n        Parameters\n        ----------\n        twistAxis : array_like\n            World referenced twist axis [ax, ay, az].\n\n        Returns\n        -------\n        tuple\n            Swing and twist quaternions [x, y, z, w].\n\n        Examples\n        --------\n        Get the swing and twist quaternions about the `up` direction of this\n        pose::\n\n            swing, twist = myPose.getSwingTwist(myPose.up)\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_49getSwingTwist(PyObject *__pyx_v_self, PyObject *__pyx_v_twistAxis) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSwingTwist (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_48getSwingTwist(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v_twistAxis));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_48getSwingTwist(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_twistAxis) {
  OVR::Vector3f __pyx_v_axis;
  OVR::Quatf __pyx_v_qtwist;
  OVR::Quatf __pyx_v_qswing;
  PyArrayObject *__pyx_v_rswing = 0;
  PyArrayObject *__pyx_v_rtwist = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rswing;
  __Pyx_Buffer __pyx_pybuffer_rswing;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rtwist;
  __Pyx_Buffer __pyx_pybuffer_rtwist;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  float __pyx_t_3;
  float __pyx_t_4;
  OVR::Vector3f __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyArrayObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyArrayObject *__pyx_t_15 = NULL;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __Pyx_RefNannySetupContext("getSwingTwist", 0);
  __pyx_pybuffer_rswing.pybuffer.buf = NULL;
  __pyx_pybuffer_rswing.refcount = 0;
  __pyx_pybuffernd_rswing.data = NULL;
  __pyx_pybuffernd_rswing.rcbuffer = &__pyx_pybuffer_rswing;
  __pyx_pybuffer_rtwist.pybuffer.buf = NULL;
  __pyx_pybuffer_rtwist.refcount = 0;
  __pyx_pybuffernd_rtwist.data = NULL;
  __pyx_pybuffernd_rtwist.rcbuffer = &__pyx_pybuffer_rtwist;

  /* "psychxr/libovr/_libovr.pyx":1500
 *         """
 *         cdef libovr_math.Vector3f axis = libovr_math.Vector3f(
 *             <float>twistAxis[0], <float>twistAxis[1], <float>twistAxis[2])             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Quatf qtwist
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_twistAxis, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_twistAxis, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_twistAxis, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":1499
 * 
 *         """
 *         cdef libovr_math.Vector3f axis = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>twistAxis[0], <float>twistAxis[1], <float>twistAxis[2])
 * 
 */
  try {
    __pyx_t_5 = OVR::Vector3f(((float)__pyx_t_2), ((float)__pyx_t_3), ((float)__pyx_t_4));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1499, __pyx_L1_error)
  }
  __pyx_v_axis = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":1504
 *         cdef libovr_math.Quatf qtwist
 *         cdef libovr_math.Quatf qswing = \
 *             (<libovr_math.Quatf>self.c_data.Orientation).GetSwingTwist(             # <<<<<<<<<<<<<<
 *                 axis, &qtwist)
 * 
 */
  __pyx_v_qswing = ((OVR::Quatf)__pyx_v_self->c_data->Orientation).GetSwingTwist(__pyx_v_axis, (&__pyx_v_qtwist));

  /* "psychxr/libovr/_libovr.pyx":1508
 * 
 *         cdef np.ndarray[np.float32_t, ndim=1] rswing = \
 *             np.zeros((4,), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         rswing[0] = qswing.x
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__8, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1508, __pyx_L1_error)
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rswing.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_rswing = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_rswing.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 1507, __pyx_L1_error)
    } else {__pyx_pybuffernd_rswing.diminfo[0].strides = __pyx_pybuffernd_rswing.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rswing.diminfo[0].shape = __pyx_pybuffernd_rswing.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_9 = 0;
  __pyx_v_rswing = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "psychxr/libovr/_libovr.pyx":1510
 *             np.zeros((4,), dtype=np.float32)
 * 
 *         rswing[0] = qswing.x             # <<<<<<<<<<<<<<
 *         rswing[1] = qswing.y
 *         rswing[2] = qswing.z
 */
  __pyx_t_4 = __pyx_v_qswing.x;
  __pyx_t_10 = 0;
  __pyx_t_11 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_pybuffernd_rswing.diminfo[0].shape;
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_rswing.diminfo[0].shape)) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 1510, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rswing.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_rswing.diminfo[0].strides) = __pyx_t_4;

  /* "psychxr/libovr/_libovr.pyx":1511
 * 
 *         rswing[0] = qswing.x
 *         rswing[1] = qswing.y             # <<<<<<<<<<<<<<
 *         rswing[2] = qswing.z
 *         rswing[3] = qswing.w
 */
  __pyx_t_4 = __pyx_v_qswing.y;
  __pyx_t_12 = 1;
  __pyx_t_11 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_pybuffernd_rswing.diminfo[0].shape;
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_rswing.diminfo[0].shape)) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 1511, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rswing.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_rswing.diminfo[0].strides) = __pyx_t_4;

  /* "psychxr/libovr/_libovr.pyx":1512
 *         rswing[0] = qswing.x
 *         rswing[1] = qswing.y
 *         rswing[2] = qswing.z             # <<<<<<<<<<<<<<
 *         rswing[3] = qswing.w
 * 
 */
  __pyx_t_4 = __pyx_v_qswing.z;
  __pyx_t_13 = 2;
  __pyx_t_11 = -1;
  if (__pyx_t_13 < 0) {
    __pyx_t_13 += __pyx_pybuffernd_rswing.diminfo[0].shape;
    if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_rswing.diminfo[0].shape)) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 1512, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rswing.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_rswing.diminfo[0].strides) = __pyx_t_4;

  /* "psychxr/libovr/_libovr.pyx":1513
 *         rswing[1] = qswing.y
 *         rswing[2] = qswing.z
 *         rswing[3] = qswing.w             # <<<<<<<<<<<<<<
 * 
 *         cdef np.ndarray[np.float32_t, ndim=1] rtwist = \
 */
  __pyx_t_4 = __pyx_v_qswing.w;
  __pyx_t_14 = 3;
  __pyx_t_11 = -1;
  if (__pyx_t_14 < 0) {
    __pyx_t_14 += __pyx_pybuffernd_rswing.diminfo[0].shape;
    if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_rswing.diminfo[0].shape)) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 1513, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rswing.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_rswing.diminfo[0].strides) = __pyx_t_4;

  /* "psychxr/libovr/_libovr.pyx":1516
 * 
 *         cdef np.ndarray[np.float32_t, ndim=1] rtwist = \
 *             np.zeros((4,), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         rtwist[0] = qtwist.x
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1516, __pyx_L1_error)
  __pyx_t_15 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rtwist.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_rtwist = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_rtwist.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 1515, __pyx_L1_error)
    } else {__pyx_pybuffernd_rtwist.diminfo[0].strides = __pyx_pybuffernd_rtwist.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rtwist.diminfo[0].shape = __pyx_pybuffernd_rtwist.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_15 = 0;
  __pyx_v_rtwist = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":1518
 *             np.zeros((4,), dtype=np.float32)
 * 
 *         rtwist[0] = qtwist.x             # <<<<<<<<<<<<<<
 *         rtwist[1] = qtwist.y
 *         rtwist[2] = qtwist.z
 */
  __pyx_t_4 = __pyx_v_qtwist.x;
  __pyx_t_16 = 0;
  __pyx_t_11 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_rtwist.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_rtwist.diminfo[0].shape)) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 1518, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rtwist.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_rtwist.diminfo[0].strides) = __pyx_t_4;

  /* "psychxr/libovr/_libovr.pyx":1519
 * 
 *         rtwist[0] = qtwist.x
 *         rtwist[1] = qtwist.y             # <<<<<<<<<<<<<<
 *         rtwist[2] = qtwist.z
 *         rtwist[3] = qtwist.w
 */
  __pyx_t_4 = __pyx_v_qtwist.y;
  __pyx_t_17 = 1;
  __pyx_t_11 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_rtwist.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_rtwist.diminfo[0].shape)) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 1519, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rtwist.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_rtwist.diminfo[0].strides) = __pyx_t_4;

  /* "psychxr/libovr/_libovr.pyx":1520
 *         rtwist[0] = qtwist.x
 *         rtwist[1] = qtwist.y
 *         rtwist[2] = qtwist.z             # <<<<<<<<<<<<<<
 *         rtwist[3] = qtwist.w
 * 
 */
  __pyx_t_4 = __pyx_v_qtwist.z;
  __pyx_t_18 = 2;
  __pyx_t_11 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_rtwist.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_rtwist.diminfo[0].shape)) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 1520, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rtwist.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_rtwist.diminfo[0].strides) = __pyx_t_4;

  /* "psychxr/libovr/_libovr.pyx":1521
 *         rtwist[1] = qtwist.y
 *         rtwist[2] = qtwist.z
 *         rtwist[3] = qtwist.w             # <<<<<<<<<<<<<<
 * 
 *         return rswing, rtwist
 */
  __pyx_t_4 = __pyx_v_qtwist.w;
  __pyx_t_19 = 3;
  __pyx_t_11 = -1;
  if (__pyx_t_19 < 0) {
    __pyx_t_19 += __pyx_pybuffernd_rtwist.diminfo[0].shape;
    if (unlikely(__pyx_t_19 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_rtwist.diminfo[0].shape)) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 1521, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_rtwist.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_rtwist.diminfo[0].strides) = __pyx_t_4;

  /* "psychxr/libovr/_libovr.pyx":1523
 *         rtwist[3] = qtwist.w
 * 
 *         return rswing, rtwist             # <<<<<<<<<<<<<<
 * 
 *     def getAngleTo(self, object target, object dir=(0., 0., -1.), bint degrees=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_rswing));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rswing));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_rswing));
  __Pyx_INCREF(((PyObject *)__pyx_v_rtwist));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rtwist));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_rtwist));
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1474
 *             <capi.ovrQuatf>(pose.Rotation * libovr_math.Quatf.Align(targ, fwd))
 * 
 *     def getSwingTwist(self, object twistAxis):             # <<<<<<<<<<<<<<
 *         """Swing and twist decomposition of this pose's rotation quaternion.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rswing.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rtwist.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getSwingTwist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rswing.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rtwist.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_rswing);
  __Pyx_XDECREF((PyObject *)__pyx_v_rtwist);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1525
 *         return rswing, rtwist
 * 
 *     def getAngleTo(self, object target, object dir=(0., 0., -1.), bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Get the relative angle to a point in world space from the `dir`
 *         vector in the local coordinate system of this pose.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_51getAngleTo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_50getAngleTo[] = "LibOVRPose.getAngleTo(self, target, dir=(0., 0., -1.), bool degrees=True)\nGet the relative angle to a point in world space from the `dir`\n        vector in the local coordinate system of this pose.\n\n        Parameters\n        ----------\n        target : LibOVRPose or array_like\n            Pose or point [x, y, z].\n        dir : array_like\n            Direction vector [x, y, z] within the reference frame of the pose to\n            compute angle from. Default is forward along the -Z axis\n            (0., 0., -1.).\n        degrees : bool, optional\n            Return angle in degrees if ``True``, else radians. Default is\n            ``True``.\n\n        Returns\n        -------\n        float\n            Angle between the forward vector of this pose and the target. Values\n            are always positive.\n\n        Examples\n        --------\n        Get the angle in degrees between the pose's -Z axis (default) and a\n        point::\n\n            point = [2, 0, -4]\n            angle = myPose.getAngleTo(point)\n\n        Get the angle from the `up` direction to the point in radians::\n\n            upAxis = (0., 1., 0.)\n            angle = myPose.getAngleTo(point, dir=upAxis, degrees=False)\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_51getAngleTo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_v_dir = 0;
  int __pyx_v_degrees;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAngleTo (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_target,&__pyx_n_s_dir,&__pyx_n_s_degrees,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_tuple__9);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dir);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_degrees);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getAngleTo") < 0)) __PYX_ERR(0, 1525, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_target = values[0];
    __pyx_v_dir = values[1];
    if (values[2]) {
      __pyx_v_degrees = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_degrees == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1525, __pyx_L3_error)
    } else {
      __pyx_v_degrees = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getAngleTo", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1525, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getAngleTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_50getAngleTo(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_target, __pyx_v_dir, __pyx_v_degrees);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_50getAngleTo(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_target, PyObject *__pyx_v_dir, int __pyx_v_degrees) {
  OVR::Vector3f __pyx_v_targ;
  OVR::Vector3f __pyx_v_direction;
  float __pyx_v_angle;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  float __pyx_t_4;
  float __pyx_t_5;
  float __pyx_t_6;
  OVR::Vector3f __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("getAngleTo", 0);

  /* "psychxr/libovr/_libovr.pyx":1563
 *         cdef libovr_math.Vector3f targ
 * 
 *         if isinstance(target, LibOVRPose):             # <<<<<<<<<<<<<<
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position
 *         else:
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_target, __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1564
 * 
 *         if isinstance(target, LibOVRPose):
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position             # <<<<<<<<<<<<<<
 *         else:
 *             targ = libovr_math.Vector3f(
 */
    __pyx_v_targ = ((OVR::Vector3f)(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_target)->c_data[0]).Position);

    /* "psychxr/libovr/_libovr.pyx":1563
 *         cdef libovr_math.Vector3f targ
 * 
 *         if isinstance(target, LibOVRPose):             # <<<<<<<<<<<<<<
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1566
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position
 *         else:
 *             targ = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *                 <float>target[0], <float>target[1], <float>target[2])
 * 
 */
  /*else*/ {

    /* "psychxr/libovr/_libovr.pyx":1567
 *         else:
 *             targ = libovr_math.Vector3f(
 *                 <float>target[0], <float>target[1], <float>target[2])             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Vector3f direction = libovr_math.Vector3f(
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_target, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psychxr/libovr/_libovr.pyx":1566
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position
 *         else:
 *             targ = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *                 <float>target[0], <float>target[1], <float>target[2])
 * 
 */
    try {
      __pyx_t_7 = OVR::Vector3f(((float)__pyx_t_4), ((float)__pyx_t_5), ((float)__pyx_t_6));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 1566, __pyx_L1_error)
    }
    __pyx_v_targ = __pyx_t_7;
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1570
 * 
 *         cdef libovr_math.Vector3f direction = libovr_math.Vector3f(
 *             <float>dir[0], <float>dir[1], <float>dir[2])             # <<<<<<<<<<<<<<
 * 
 *         targ = (<libovr_math.Posef>self.c_data[0]).InverseTransform(targ)
 */
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dir, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dir, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dir, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":1569
 *                 <float>target[0], <float>target[1], <float>target[2])
 * 
 *         cdef libovr_math.Vector3f direction = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>dir[0], <float>dir[1], <float>dir[2])
 * 
 */
  try {
    __pyx_t_7 = OVR::Vector3f(((float)__pyx_t_6), ((float)__pyx_t_5), ((float)__pyx_t_4));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1569, __pyx_L1_error)
  }
  __pyx_v_direction = __pyx_t_7;

  /* "psychxr/libovr/_libovr.pyx":1572
 *             <float>dir[0], <float>dir[1], <float>dir[2])
 * 
 *         targ = (<libovr_math.Posef>self.c_data[0]).InverseTransform(targ)             # <<<<<<<<<<<<<<
 *         cdef float angle = direction.Angle(targ)
 * 
 */
  __pyx_v_targ = ((OVR::Posef)(__pyx_v_self->c_data[0])).InverseTransform(__pyx_v_targ);

  /* "psychxr/libovr/_libovr.pyx":1573
 * 
 *         targ = (<libovr_math.Posef>self.c_data[0]).InverseTransform(targ)
 *         cdef float angle = direction.Angle(targ)             # <<<<<<<<<<<<<<
 * 
 *         return angle * RAD_TO_DEGF if degrees else angle
 */
  __pyx_v_angle = __pyx_v_direction.Angle(__pyx_v_targ);

  /* "psychxr/libovr/_libovr.pyx":1575
 *         cdef float angle = direction.Angle(targ)
 * 
 *         return angle * RAD_TO_DEGF if degrees else angle             # <<<<<<<<<<<<<<
 * 
 *     def getAzimuthElevation(self, object target, bint degrees=True):
 */
  __Pyx_XDECREF(__pyx_r);
  if ((__pyx_v_degrees != 0)) {
    __pyx_t_8 = PyFloat_FromDouble(__pyx_v_angle); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_RAD_TO_DEGF); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyNumber_Multiply(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_3 = __pyx_t_10;
    __pyx_t_10 = 0;
  } else {
    __pyx_t_10 = PyFloat_FromDouble(__pyx_v_angle); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __pyx_t_10;
    __pyx_t_10 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1525
 *         return rswing, rtwist
 * 
 *     def getAngleTo(self, object target, object dir=(0., 0., -1.), bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Get the relative angle to a point in world space from the `dir`
 *         vector in the local coordinate system of this pose.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getAngleTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1577
 *         return angle * RAD_TO_DEGF if degrees else angle
 * 
 *     def getAzimuthElevation(self, object target, bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Get the azimuth and elevation angles of a point relative to this
 *         pose's forward direction (0., 0., -1.).
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_53getAzimuthElevation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_52getAzimuthElevation[] = "LibOVRPose.getAzimuthElevation(self, target, bool degrees=True)\nGet the azimuth and elevation angles of a point relative to this\n        pose's forward direction (0., 0., -1.).\n\n        Parameters\n        ----------\n        target : LibOVRPose or array_like\n            Pose or point [x, y, z].\n        degrees : bool, optional\n            Return angles in degrees if ``True``, else radians. Default is\n            ``True``.\n\n        Returns\n        -------\n        tuple (float, float)\n            Azimuth and elevation angles of the target point. Values are\n            signed.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_53getAzimuthElevation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_target = 0;
  int __pyx_v_degrees;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAzimuthElevation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_target,&__pyx_n_s_degrees,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_degrees);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getAzimuthElevation") < 0)) __PYX_ERR(0, 1577, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_target = values[0];
    if (values[1]) {
      __pyx_v_degrees = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_degrees == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L3_error)
    } else {
      __pyx_v_degrees = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getAzimuthElevation", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1577, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getAzimuthElevation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_52getAzimuthElevation(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_target, __pyx_v_degrees);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_52getAzimuthElevation(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_target, int __pyx_v_degrees) {
  OVR::Vector3f __pyx_v_targ;
  float __pyx_v_az;
  float __pyx_v_el;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  OVR::Vector3f __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  float __pyx_t_5;
  float __pyx_t_6;
  float __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("getAzimuthElevation", 0);

  /* "psychxr/libovr/_libovr.pyx":1596
 * 
 *         """
 *         cdef libovr_math.Vector3f targ = libovr_math.Vector3f()             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(target, LibOVRPose):
 */
  try {
    __pyx_t_1 = OVR::Vector3f();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1596, __pyx_L1_error)
  }
  __pyx_v_targ = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":1598
 *         cdef libovr_math.Vector3f targ = libovr_math.Vector3f()
 * 
 *         if isinstance(target, LibOVRPose):             # <<<<<<<<<<<<<<
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position
 *         else:
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_target, __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "psychxr/libovr/_libovr.pyx":1599
 * 
 *         if isinstance(target, LibOVRPose):
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position             # <<<<<<<<<<<<<<
 *         else:
 *             targ = libovr_math.Vector3f(
 */
    __pyx_v_targ = ((OVR::Vector3f)(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_target)->c_data[0]).Position);

    /* "psychxr/libovr/_libovr.pyx":1598
 *         cdef libovr_math.Vector3f targ = libovr_math.Vector3f()
 * 
 *         if isinstance(target, LibOVRPose):             # <<<<<<<<<<<<<<
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1601
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position
 *         else:
 *             targ = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *                 <float>target[0], <float>target[1], <float>target[2])
 * 
 */
  /*else*/ {

    /* "psychxr/libovr/_libovr.pyx":1602
 *         else:
 *             targ = libovr_math.Vector3f(
 *                 <float>target[0], <float>target[1], <float>target[2])             # <<<<<<<<<<<<<<
 * 
 *         # put point into reference frame of pose
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_target, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "psychxr/libovr/_libovr.pyx":1601
 *             targ = <libovr_math.Vector3f>(<LibOVRPose>target).c_data[0].Position
 *         else:
 *             targ = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *                 <float>target[0], <float>target[1], <float>target[2])
 * 
 */
    try {
      __pyx_t_1 = OVR::Vector3f(((float)__pyx_t_5), ((float)__pyx_t_6), ((float)__pyx_t_7));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 1601, __pyx_L1_error)
    }
    __pyx_v_targ = __pyx_t_1;
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1605
 * 
 *         # put point into reference frame of pose
 *         targ = (<libovr_math.Posef>self.c_data[0]).InverseTransform(targ)             # <<<<<<<<<<<<<<
 * 
 *         cdef float az = atan2(targ.x, -targ.z)
 */
  __pyx_v_targ = ((OVR::Posef)(__pyx_v_self->c_data[0])).InverseTransform(__pyx_v_targ);

  /* "psychxr/libovr/_libovr.pyx":1607
 *         targ = (<libovr_math.Posef>self.c_data[0]).InverseTransform(targ)
 * 
 *         cdef float az = atan2(targ.x, -targ.z)             # <<<<<<<<<<<<<<
 *         cdef float el = atan2(targ.y, -targ.z)
 * 
 */
  __pyx_v_az = atan2(__pyx_v_targ.x, (-__pyx_v_targ.z));

  /* "psychxr/libovr/_libovr.pyx":1608
 * 
 *         cdef float az = atan2(targ.x, -targ.z)
 *         cdef float el = atan2(targ.y, -targ.z)             # <<<<<<<<<<<<<<
 * 
 *         az = az * RAD_TO_DEGF if degrees else az
 */
  __pyx_v_el = atan2(__pyx_v_targ.y, (-__pyx_v_targ.z));

  /* "psychxr/libovr/_libovr.pyx":1610
 *         cdef float el = atan2(targ.y, -targ.z)
 * 
 *         az = az * RAD_TO_DEGF if degrees else az             # <<<<<<<<<<<<<<
 *         el = el * RAD_TO_DEGF if degrees else el
 * 
 */
  if ((__pyx_v_degrees != 0)) {
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_az); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RAD_TO_DEGF); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyNumber_Multiply(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_9); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_v_az;
  }
  __pyx_v_az = __pyx_t_7;

  /* "psychxr/libovr/_libovr.pyx":1611
 * 
 *         az = az * RAD_TO_DEGF if degrees else az
 *         el = el * RAD_TO_DEGF if degrees else el             # <<<<<<<<<<<<<<
 * 
 *         return az, el
 */
  if ((__pyx_v_degrees != 0)) {
    __pyx_t_9 = PyFloat_FromDouble(__pyx_v_el); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RAD_TO_DEGF); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_v_el;
  }
  __pyx_v_el = __pyx_t_7;

  /* "psychxr/libovr/_libovr.pyx":1613
 *         el = el * RAD_TO_DEGF if degrees else el
 * 
 *         return az, el             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_az); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = PyFloat_FromDouble(__pyx_v_el); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
  __pyx_t_4 = 0;
  __pyx_t_8 = 0;
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1577
 *         return angle * RAD_TO_DEGF if degrees else angle
 * 
 *     def getAzimuthElevation(self, object target, bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Get the azimuth and elevation angles of a point relative to this
 *         pose's forward direction (0., 0., -1.).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getAzimuthElevation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1616
 * 
 *     @property
 *     def modelMatrix(self):             # <<<<<<<<<<<<<<
 *         """Pose as a 4x4 homogeneous transformation matrix."""
 *         cdef libovr_math.Matrix4f m_pose = libovr_math.Matrix4f(
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_11modelMatrix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_11modelMatrix_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_11modelMatrix___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_11modelMatrix___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  OVR::Matrix4f __pyx_v_m_pose;
  PyArrayObject *__pyx_v_toReturn = 0;
  __Pyx_memviewslice __pyx_v_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;

  /* "psychxr/libovr/_libovr.pyx":1618
 *     def modelMatrix(self):
 *         """Pose as a 4x4 homogeneous transformation matrix."""
 *         cdef libovr_math.Matrix4f m_pose = libovr_math.Matrix4f(             # <<<<<<<<<<<<<<
 *             <libovr_math.Posef>self.c_data[0])
 * 
 */
  __pyx_v_m_pose = OVR::Matrix4f(((OVR::Posef)(__pyx_v_self->c_data[0])));

  /* "psychxr/libovr/_libovr.pyx":1622
 * 
 *         cdef np.ndarray[np.float32_t, ndim=2] toReturn = \
 *             np.zeros((4, 4), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         # fast copy matrix to numpy array
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1622, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
      __pyx_v_toReturn = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 1621, __pyx_L1_error)
    } else {__pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_toReturn.diminfo[1].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_toReturn.diminfo[1].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_5 = 0;
  __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "psychxr/libovr/_libovr.pyx":1625
 * 
 *         # fast copy matrix to numpy array
 *         cdef float [:, :] mv = toReturn             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(((PyObject *)__pyx_v_toReturn), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1625, __pyx_L1_error)
  __pyx_v_mv = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "psychxr/libovr/_libovr.pyx":1627
 *         cdef float [:, :] mv = toReturn
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4             # <<<<<<<<<<<<<<
 *         i = j = 0
 *         for i in range(N):
 */
  __pyx_v_N = 4;

  /* "psychxr/libovr/_libovr.pyx":1628
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4
 *         i = j = 0             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             for j in range(N):
 */
  __pyx_v_i = 0;
  __pyx_v_j = 0;

  /* "psychxr/libovr/_libovr.pyx":1629
 *         cdef Py_ssize_t N = 4
 *         i = j = 0
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             for j in range(N):
 *                 mv[i, j] = m_pose.M[i][j]
 */
  __pyx_t_7 = __pyx_v_N;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "psychxr/libovr/_libovr.pyx":1630
 *         i = j = 0
 *         for i in range(N):
 *             for j in range(N):             # <<<<<<<<<<<<<<
 *                 mv[i, j] = m_pose.M[i][j]
 * 
 */
    __pyx_t_10 = __pyx_v_N;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_j = __pyx_t_12;

      /* "psychxr/libovr/_libovr.pyx":1631
 *         for i in range(N):
 *             for j in range(N):
 *                 mv[i, j] = m_pose.M[i][j]             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_15 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_mv.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_15 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_mv.shape[0])) __pyx_t_15 = 0;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_v_mv.shape[1];
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 1;
      } else if (unlikely(__pyx_t_14 >= __pyx_v_mv.shape[1])) __pyx_t_15 = 1;
      if (unlikely(__pyx_t_15 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_15);
        __PYX_ERR(0, 1631, __pyx_L1_error)
      }
      *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_mv.data + __pyx_t_13 * __pyx_v_mv.strides[0]) ) + __pyx_t_14 * __pyx_v_mv.strides[1]) )) = ((__pyx_v_m_pose.M[__pyx_v_i])[__pyx_v_j]);
    }
  }

  /* "psychxr/libovr/_libovr.pyx":1633
 *                 mv[i, j] = m_pose.M[i][j]
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1616
 * 
 *     @property
 *     def modelMatrix(self):             # <<<<<<<<<<<<<<
 *         """Pose as a 4x4 homogeneous transformation matrix."""
 *         cdef libovr_math.Matrix4f m_pose = libovr_math.Matrix4f(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.modelMatrix.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __PYX_XDEC_MEMVIEW(&__pyx_v_mv, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1636
 * 
 *     @property
 *     def inverseModelMatrix(self):             # <<<<<<<<<<<<<<
 *         """Pose as a 4x4 homogeneous inverse transformation matrix."""
 *         cdef libovr_math.Matrix4f m_pose = libovr_math.Matrix4f(
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_18inverseModelMatrix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_18inverseModelMatrix_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_18inverseModelMatrix___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_18inverseModelMatrix___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  OVR::Matrix4f __pyx_v_m_pose;
  PyArrayObject *__pyx_v_toReturn = 0;
  __Pyx_memviewslice __pyx_v_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;

  /* "psychxr/libovr/_libovr.pyx":1638
 *     def inverseModelMatrix(self):
 *         """Pose as a 4x4 homogeneous inverse transformation matrix."""
 *         cdef libovr_math.Matrix4f m_pose = libovr_math.Matrix4f(             # <<<<<<<<<<<<<<
 *             <libovr_math.Posef>self.c_data[0])
 *         m_pose.InvertHomogeneousTransform()  # rigid body transform inverse
 */
  __pyx_v_m_pose = OVR::Matrix4f(((OVR::Posef)(__pyx_v_self->c_data[0])));

  /* "psychxr/libovr/_libovr.pyx":1640
 *         cdef libovr_math.Matrix4f m_pose = libovr_math.Matrix4f(
 *             <libovr_math.Posef>self.c_data[0])
 *         m_pose.InvertHomogeneousTransform()  # rigid body transform inverse             # <<<<<<<<<<<<<<
 * 
 *         cdef np.ndarray[np.float32_t, ndim=2] toReturn = \
 */
  __pyx_v_m_pose.InvertHomogeneousTransform();

  /* "psychxr/libovr/_libovr.pyx":1643
 * 
 *         cdef np.ndarray[np.float32_t, ndim=2] toReturn = \
 *             np.zeros((4, 4), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         # fast copy matrix to numpy array
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1643, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
      __pyx_v_toReturn = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 1642, __pyx_L1_error)
    } else {__pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_toReturn.diminfo[1].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_toReturn.diminfo[1].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_5 = 0;
  __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "psychxr/libovr/_libovr.pyx":1646
 * 
 *         # fast copy matrix to numpy array
 *         cdef float [:, :] mv = toReturn             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4
 */
  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(((PyObject *)__pyx_v_toReturn), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __pyx_v_mv = __pyx_t_6;
  __pyx_t_6.memview = NULL;
  __pyx_t_6.data = NULL;

  /* "psychxr/libovr/_libovr.pyx":1648
 *         cdef float [:, :] mv = toReturn
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4             # <<<<<<<<<<<<<<
 *         i = j = 0
 *         for i in range(N):
 */
  __pyx_v_N = 4;

  /* "psychxr/libovr/_libovr.pyx":1649
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4
 *         i = j = 0             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             for j in range(N):
 */
  __pyx_v_i = 0;
  __pyx_v_j = 0;

  /* "psychxr/libovr/_libovr.pyx":1650
 *         cdef Py_ssize_t N = 4
 *         i = j = 0
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             for j in range(N):
 *                 mv[i, j] = m_pose.M[i][j]
 */
  __pyx_t_7 = __pyx_v_N;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "psychxr/libovr/_libovr.pyx":1651
 *         i = j = 0
 *         for i in range(N):
 *             for j in range(N):             # <<<<<<<<<<<<<<
 *                 mv[i, j] = m_pose.M[i][j]
 * 
 */
    __pyx_t_10 = __pyx_v_N;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_j = __pyx_t_12;

      /* "psychxr/libovr/_libovr.pyx":1652
 *         for i in range(N):
 *             for j in range(N):
 *                 mv[i, j] = m_pose.M[i][j]             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_15 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_v_mv.shape[0];
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_15 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_v_mv.shape[0])) __pyx_t_15 = 0;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_v_mv.shape[1];
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 1;
      } else if (unlikely(__pyx_t_14 >= __pyx_v_mv.shape[1])) __pyx_t_15 = 1;
      if (unlikely(__pyx_t_15 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_15);
        __PYX_ERR(0, 1652, __pyx_L1_error)
      }
      *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_mv.data + __pyx_t_13 * __pyx_v_mv.strides[0]) ) + __pyx_t_14 * __pyx_v_mv.strides[1]) )) = ((__pyx_v_m_pose.M[__pyx_v_i])[__pyx_v_j]);
    }
  }

  /* "psychxr/libovr/_libovr.pyx":1654
 *                 mv[i, j] = m_pose.M[i][j]
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def getModelMatrix(self, bint inverse=False, np.ndarray[np.float32_t, ndim=2] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1636
 * 
 *     @property
 *     def inverseModelMatrix(self):             # <<<<<<<<<<<<<<
 *         """Pose as a 4x4 homogeneous inverse transformation matrix."""
 *         cdef libovr_math.Matrix4f m_pose = libovr_math.Matrix4f(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.inverseModelMatrix.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __PYX_XDEC_MEMVIEW(&__pyx_v_mv, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1656
 *         return toReturn
 * 
 *     def getModelMatrix(self, bint inverse=False, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *         """Get this pose as a 4x4 transformation matrix.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_55getModelMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_54getModelMatrix[] = "LibOVRPose.getModelMatrix(self, bool inverse=False, ndarray out=None)\nGet this pose as a 4x4 transformation matrix.\n\n        Parameters\n        ----------\n        inverse : bool\n            If ``True``, return the inverse of the matrix.\n        out : ndarray, optional\n            Alternative place to write the matrix to values. Must be a `ndarray`\n            of shape (4, 4,) and have a data type of float32. Values are written\n            assuming row-major order.\n\n        Returns\n        -------\n        ndarray\n            4x4 transformation matrix.\n\n        Examples\n        --------\n        Using view matrices with PyOpenGL (fixed-function)::\n\n            M = myPose.getModelMatrix()\n            glMatrixMode(GL_MODELVIEW)\n            glPushMatrix()\n            glMultTransposeMatrixf(M)\n            # run draw commands ...\n            glPopMatrix()\n\n        For `Pyglet` (which is the standard GL interface for `PsychoPy`), you\n        need to convert the matrix to a C-types pointer before passing it to\n        `glLoadTransposeMatrixf`::\n\n            M = myPose.getModelMatrix()\n            M = M.ctypes.data_as(ctypes.POINTER(ctypes.c_float))\n            glMatrixMode(GL_MODELVIEW)\n            glPushMatrix()\n            glMultTransposeMatrixf(M)\n            # run draw commands ...\n            glPopMatrix()\n\n        If using fragment shaders, the matrix can be passed on to them as such::\n\n            M = myPose.getModelMatrix()\n            M = M.ctypes.data_as(ctypes.POINTER(ctypes.c_float))\n            # after the program was installed in the current rendering state via\n            # `glUseProgram` ...\n            loc = glGetUniformLocation(program, b\"m_Model\")\n            glUniformMatrix4fv(loc, 1, GL_TRUE, P)  # `transpose` must be `True`\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_55getModelMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_inverse;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getModelMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverse,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverse);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModelMatrix") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_inverse = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_inverse == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1656, __pyx_L3_error)
    } else {
      __pyx_v_inverse = ((int)0);
    }
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getModelMatrix", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getModelMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1656, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_54getModelMatrix(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_inverse, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_54getModelMatrix(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, int __pyx_v_inverse, PyArrayObject *__pyx_v_out) {
  OVR::Matrix4f __pyx_v_m_pose;
  PyArrayObject *__pyx_v_toReturn = 0;
  __Pyx_memviewslice __pyx_v_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  __Pyx_RefNannySetupContext("getModelMatrix", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1656, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];

  /* "psychxr/libovr/_libovr.pyx":1706
 * 
 *         """
 *         cdef libovr_math.Matrix4f m_pose = libovr_math.Matrix4f(             # <<<<<<<<<<<<<<
 *             <libovr_math.Posef>self.c_data[0])
 * 
 */
  __pyx_v_m_pose = OVR::Matrix4f(((OVR::Posef)(__pyx_v_self->c_data[0])));

  /* "psychxr/libovr/_libovr.pyx":1709
 *             <libovr_math.Posef>self.c_data[0])
 * 
 *         if inverse:             # <<<<<<<<<<<<<<
 *             m_pose.InvertHomogeneousTransform()  # faster than Invert() here
 * 
 */
  __pyx_t_1 = (__pyx_v_inverse != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":1710
 * 
 *         if inverse:
 *             m_pose.InvertHomogeneousTransform()  # faster than Invert() here             # <<<<<<<<<<<<<<
 * 
 *         cdef np.ndarray[np.float32_t, ndim=2] toReturn
 */
    __pyx_v_m_pose.InvertHomogeneousTransform();

    /* "psychxr/libovr/_libovr.pyx":1709
 *             <libovr_math.Posef>self.c_data[0])
 * 
 *         if inverse:             # <<<<<<<<<<<<<<
 *             m_pose.InvertHomogeneousTransform()  # faster than Invert() here
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":1713
 * 
 *         cdef np.ndarray[np.float32_t, ndim=2] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn =  np.zeros((4, 4), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1714
 *         cdef np.ndarray[np.float32_t, ndim=2] toReturn
 *         if out is None:
 *             toReturn =  np.zeros((4, 4), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1714, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_toReturn.diminfo[1].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_toReturn.diminfo[1].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1714, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1713
 * 
 *         cdef np.ndarray[np.float32_t, ndim=2] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn =  np.zeros((4, 4), dtype=np.float32)
 *         else:
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":1716
 *             toReturn =  np.zeros((4, 4), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         # fast copy matrix to numpy array
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_toReturn.diminfo[1].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_toReturn.diminfo[1].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1716, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L4:;

  /* "psychxr/libovr/_libovr.pyx":1719
 * 
 *         # fast copy matrix to numpy array
 *         cdef float [:, :] mv = toReturn             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4
 */
  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(((PyObject *)__pyx_v_toReturn), PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __pyx_v_mv = __pyx_t_12;
  __pyx_t_12.memview = NULL;
  __pyx_t_12.data = NULL;

  /* "psychxr/libovr/_libovr.pyx":1721
 *         cdef float [:, :] mv = toReturn
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4             # <<<<<<<<<<<<<<
 *         i = j = 0
 *         for i in range(N):
 */
  __pyx_v_N = 4;

  /* "psychxr/libovr/_libovr.pyx":1722
 *         cdef Py_ssize_t i, j
 *         cdef Py_ssize_t N = 4
 *         i = j = 0             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             for j in range(N):
 */
  __pyx_v_i = 0;
  __pyx_v_j = 0;

  /* "psychxr/libovr/_libovr.pyx":1723
 *         cdef Py_ssize_t N = 4
 *         i = j = 0
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             for j in range(N):
 *                 mv[i, j] = m_pose.M[i][j]
 */
  __pyx_t_13 = __pyx_v_N;
  __pyx_t_14 = __pyx_t_13;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "psychxr/libovr/_libovr.pyx":1724
 *         i = j = 0
 *         for i in range(N):
 *             for j in range(N):             # <<<<<<<<<<<<<<
 *                 mv[i, j] = m_pose.M[i][j]
 * 
 */
    __pyx_t_16 = __pyx_v_N;
    __pyx_t_17 = __pyx_t_16;
    for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
      __pyx_v_j = __pyx_t_18;

      /* "psychxr/libovr/_libovr.pyx":1725
 *         for i in range(N):
 *             for j in range(N):
 *                 mv[i, j] = m_pose.M[i][j]             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_20 = __pyx_v_j;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_v_mv.shape[0];
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_v_mv.shape[0])) __pyx_t_8 = 0;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_v_mv.shape[1];
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 1;
      } else if (unlikely(__pyx_t_20 >= __pyx_v_mv.shape[1])) __pyx_t_8 = 1;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        __PYX_ERR(0, 1725, __pyx_L1_error)
      }
      *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_mv.data + __pyx_t_19 * __pyx_v_mv.strides[0]) ) + __pyx_t_20 * __pyx_v_mv.strides[1]) )) = ((__pyx_v_m_pose.M[__pyx_v_i])[__pyx_v_j]);
    }
  }

  /* "psychxr/libovr/_libovr.pyx":1727
 *                 mv[i, j] = m_pose.M[i][j]
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def getViewMatrix(self, bint inverse=False, np.ndarray[np.float32_t, ndim=2] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1656
 *         return toReturn
 * 
 *     def getModelMatrix(self, bint inverse=False, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *         """Get this pose as a 4x4 transformation matrix.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getModelMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __PYX_XDEC_MEMVIEW(&__pyx_v_mv, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1729
 *         return toReturn
 * 
 *     def getViewMatrix(self, bint inverse=False, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *         """Convert this pose into a view matrix.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_57getViewMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_56getViewMatrix[] = "LibOVRPose.getViewMatrix(self, bool inverse=False, ndarray out=None)\nConvert this pose into a view matrix.\n\n        Creates a view matrix which transforms points into eye space using the\n        current pose as the eye position in the scene. Furthermore, you can use\n        view matrices for rendering shadows if light positions are defined\n        as `LibOVRPose` objects. Using :func:`calcEyePoses` and\n        :func:`getEyeViewMatrix` are preferred when rendering VR scenes since\n        features like visibility culling are not available otherwise.\n\n        Parameters\n        ----------\n        inverse : bool, optional\n            Return the inverse of the view matrix. Default it ``False``.\n        out : ndarray, optional\n            Alternative place to write the matrix to values. Must be a `ndarray`\n            of shape (4, 4,) and have a data type of float32. Values are written\n            assuming row-major order.\n\n        Returns\n        -------\n        ndarray\n            4x4 view matrix derived from the pose.\n\n        Examples\n        --------\n        Compute eye poses from a head pose and compute view matrices::\n\n            iod = 0.062  # 63 mm\n            headPose = LibOVRPose((0., 1.5, 0.))  # 1.5 meters up from origin\n            leftEyePose = LibOVRPose((-(iod / 2.), 0., 0.))\n            rightEyePose = LibOVRPose((iod / 2., 0., 0.))\n\n            # transform eye poses relative to head poses\n            leftEyeRenderPose = headPose * leftEyePose\n            rightEyeRenderPose = headPose * rightEyePose\n\n            # compute view matrices\n            eyeViewMatrix = [leftEyeRenderPose.getViewMatrix(),\n                             rightEyeRenderPose.getViewMatrix()]\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_57getViewMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_inverse;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getViewMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inverse,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inverse);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getViewMatrix") < 0)) __PYX_ERR(0, 1729, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_inverse = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_inverse == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1729, __pyx_L3_error)
    } else {
      __pyx_v_inverse = ((int)0);
    }
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getViewMatrix", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1729, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getViewMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1729, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_56getViewMatrix(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_inverse, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_56getViewMatrix(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, int __pyx_v_inverse, PyArrayObject *__pyx_v_out) {
  OVR::Vector3f __pyx_v_pos;
  OVR::Quatf __pyx_v_ori;
  OVR::Vector3f __pyx_v_up;
  OVR::Vector3f __pyx_v_forward;
  OVR::Matrix4f __pyx_v_rm;
  OVR::Matrix4f __pyx_v_m_view;
  PyArrayObject *__pyx_v_to_return = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_to_return;
  __Pyx_Buffer __pyx_pybuffer_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  OVR::Vector3f __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  __Pyx_RefNannySetupContext("getViewMatrix", 0);
  __pyx_pybuffer_to_return.pybuffer.buf = NULL;
  __pyx_pybuffer_to_return.refcount = 0;
  __pyx_pybuffernd_to_return.data = NULL;
  __pyx_pybuffernd_to_return.rcbuffer = &__pyx_pybuffer_to_return;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1729, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];

  /* "psychxr/libovr/_libovr.pyx":1779
 *         cdef libovr_math.Matrix4f m_view
 * 
 *         pos = <libovr_math.Vector3f>self.c_data.Position             # <<<<<<<<<<<<<<
 *         ori = <libovr_math.Quatf>self.c_data.Orientation
 * 
 */
  __pyx_v_pos = ((OVR::Vector3f)__pyx_v_self->c_data->Position);

  /* "psychxr/libovr/_libovr.pyx":1780
 * 
 *         pos = <libovr_math.Vector3f>self.c_data.Position
 *         ori = <libovr_math.Quatf>self.c_data.Orientation             # <<<<<<<<<<<<<<
 * 
 *         if not ori.IsNormalized():  # make sure orientation is normalized
 */
  __pyx_v_ori = ((OVR::Quatf)__pyx_v_self->c_data->Orientation);

  /* "psychxr/libovr/_libovr.pyx":1782
 *         ori = <libovr_math.Quatf>self.c_data.Orientation
 * 
 *         if not ori.IsNormalized():  # make sure orientation is normalized             # <<<<<<<<<<<<<<
 *             ori.Normalize()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_ori.IsNormalized() != 0)) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":1783
 * 
 *         if not ori.IsNormalized():  # make sure orientation is normalized
 *             ori.Normalize()             # <<<<<<<<<<<<<<
 * 
 *         rm = libovr_math.Matrix4f(ori)
 */
    __pyx_v_ori.Normalize();

    /* "psychxr/libovr/_libovr.pyx":1782
 *         ori = <libovr_math.Quatf>self.c_data.Orientation
 * 
 *         if not ori.IsNormalized():  # make sure orientation is normalized             # <<<<<<<<<<<<<<
 *             ori.Normalize()
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":1785
 *             ori.Normalize()
 * 
 *         rm = libovr_math.Matrix4f(ori)             # <<<<<<<<<<<<<<
 *         up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *         forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 */
  __pyx_v_rm = OVR::Matrix4f(__pyx_v_ori);

  /* "psychxr/libovr/_libovr.pyx":1786
 * 
 *         rm = libovr_math.Matrix4f(ori)
 *         up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))             # <<<<<<<<<<<<<<
 *         forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 *         m_view = libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 */
  try {
    __pyx_t_2 = OVR::Vector3f(0., 1., 0.);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1786, __pyx_L1_error)
  }
  __pyx_v_up = __pyx_v_rm.Transform(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1787
 *         rm = libovr_math.Matrix4f(ori)
 *         up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *         forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))             # <<<<<<<<<<<<<<
 *         m_view = libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 * 
 */
  try {
    __pyx_t_2 = OVR::Vector3f(0., 0., -1.);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1787, __pyx_L1_error)
  }
  __pyx_v_forward = __pyx_v_rm.Transform(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":1788
 *         up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *         forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 *         m_view = libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)             # <<<<<<<<<<<<<<
 * 
 *         if inverse:
 */
  __pyx_v_m_view = OVR::Matrix4f::LookAtRH(__pyx_v_pos, (__pyx_v_pos + __pyx_v_forward), __pyx_v_up);

  /* "psychxr/libovr/_libovr.pyx":1790
 *         m_view = libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 * 
 *         if inverse:             # <<<<<<<<<<<<<<
 *             m_view.InvertHomogeneousTransform()
 * 
 */
  __pyx_t_1 = (__pyx_v_inverse != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":1791
 * 
 *         if inverse:
 *             m_view.InvertHomogeneousTransform()             # <<<<<<<<<<<<<<
 * 
 *         # prepare return array
 */
    __pyx_v_m_view.InvertHomogeneousTransform();

    /* "psychxr/libovr/_libovr.pyx":1790
 *         m_view = libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 * 
 *         if inverse:             # <<<<<<<<<<<<<<
 *             m_view.InvertHomogeneousTransform()
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":1796
 *         cdef np.ndarray[np.float32_t, ndim=2] to_return
 * 
 *         if out is None:             # <<<<<<<<<<<<<<
 *             to_return = np.zeros((4, 4), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (__pyx_t_3) {

    /* "psychxr/libovr/_libovr.pyx":1797
 * 
 *         if out is None:
 *             to_return = np.zeros((4, 4), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             to_return = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__11, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1797, __pyx_L1_error)
    __pyx_t_8 = ((PyArrayObject *)__pyx_t_7);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_v_to_return, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        }
        __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
      }
      __pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_to_return.diminfo[1].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_to_return.diminfo[1].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1797, __pyx_L1_error)
    }
    __pyx_t_8 = 0;
    __pyx_v_to_return = ((PyArrayObject *)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "psychxr/libovr/_libovr.pyx":1796
 *         cdef np.ndarray[np.float32_t, ndim=2] to_return
 * 
 *         if out is None:             # <<<<<<<<<<<<<<
 *             to_return = np.zeros((4, 4), dtype=np.float32)
 *         else:
 */
    goto __pyx_L5;
  }

  /* "psychxr/libovr/_libovr.pyx":1799
 *             to_return = np.zeros((4, 4), dtype=np.float32)
 *         else:
 *             to_return = out             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t i, j, N
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_v_to_return, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
        }
        __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
      }
      __pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_to_return.diminfo[1].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_to_return.diminfo[1].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1799, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_to_return = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L5:;

  /* "psychxr/libovr/_libovr.pyx":1802
 * 
 *         cdef Py_ssize_t i, j, N
 *         i = j = 0             # <<<<<<<<<<<<<<
 *         N = 4
 *         for i in range(N):
 */
  __pyx_v_i = 0;
  __pyx_v_j = 0;

  /* "psychxr/libovr/_libovr.pyx":1803
 *         cdef Py_ssize_t i, j, N
 *         i = j = 0
 *         N = 4             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             for j in range(N):
 */
  __pyx_v_N = 4;

  /* "psychxr/libovr/_libovr.pyx":1804
 *         i = j = 0
 *         N = 4
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             for j in range(N):
 *                 to_return[i, j] = m_view.M[i][j]
 */
  __pyx_t_13 = __pyx_v_N;
  __pyx_t_14 = __pyx_t_13;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "psychxr/libovr/_libovr.pyx":1805
 *         N = 4
 *         for i in range(N):
 *             for j in range(N):             # <<<<<<<<<<<<<<
 *                 to_return[i, j] = m_view.M[i][j]
 * 
 */
    __pyx_t_16 = __pyx_v_N;
    __pyx_t_17 = __pyx_t_16;
    for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
      __pyx_v_j = __pyx_t_18;

      /* "psychxr/libovr/_libovr.pyx":1806
 *         for i in range(N):
 *             for j in range(N):
 *                 to_return[i, j] = m_view.M[i][j]             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_20 = __pyx_v_j;
      __pyx_t_9 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_to_return.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_to_return.diminfo[0].shape)) __pyx_t_9 = 0;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_to_return.diminfo[1].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_9 = 1;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_to_return.diminfo[1].shape)) __pyx_t_9 = 1;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        __PYX_ERR(0, 1806, __pyx_L1_error)
      }
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_to_return.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_to_return.diminfo[1].strides) = ((__pyx_v_m_view.M[__pyx_v_i])[__pyx_v_j]);
    }
  }

  /* "psychxr/libovr/_libovr.pyx":1808
 *                 to_return[i, j] = m_view.M[i][j]
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 *     def normalize(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1729
 *         return toReturn
 * 
 *     def getViewMatrix(self, bint inverse=False, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *         """Convert this pose into a view matrix.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.getViewMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1810
 *         return to_return
 * 
 *     def normalize(self):             # <<<<<<<<<<<<<<
 *         """Normalize this pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_59normalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_58normalize[] = "LibOVRPose.normalize(self)\nNormalize this pose.\n\n        Notes\n        -----\n        Uses ``OVR::Posef.Normalize`` which is part of the Oculus PC SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_59normalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalize (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_58normalize(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_58normalize(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalize", 0);

  /* "psychxr/libovr/_libovr.pyx":1818
 * 
 *         """
 *         (<libovr_math.Posef>self.c_data[0]).Normalize()             # <<<<<<<<<<<<<<
 * 
 *     def invert(self):
 */
  ((OVR::Posef)(__pyx_v_self->c_data[0])).Normalize();

  /* "psychxr/libovr/_libovr.pyx":1810
 *         return to_return
 * 
 *     def normalize(self):             # <<<<<<<<<<<<<<
 *         """Normalize this pose.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1820
 *         (<libovr_math.Posef>self.c_data[0]).Normalize()
 * 
 *     def invert(self):             # <<<<<<<<<<<<<<
 *         """Invert this pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_61invert(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_60invert[] = "LibOVRPose.invert(self)\nInvert this pose.\n\n        Notes\n        -----\n        * Uses ``OVR::Posef.Inverted`` which is part of the Oculus PC SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_61invert(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invert (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_60invert(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_60invert(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invert", 0);

  /* "psychxr/libovr/_libovr.pyx":1828
 * 
 *         """
 *         self.c_data[0] = \             # <<<<<<<<<<<<<<
 *             <capi.ovrPosef>((<libovr_math.Posef>self.c_data[0]).Inverted())
 * 
 */
  (__pyx_v_self->c_data[0]) = ((OVR::Posef)(__pyx_v_self->c_data[0])).Inverted();

  /* "psychxr/libovr/_libovr.pyx":1820
 *         (<libovr_math.Posef>self.c_data[0]).Normalize()
 * 
 *     def invert(self):             # <<<<<<<<<<<<<<
 *         """Invert this pose.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1831
 *             <capi.ovrPosef>((<libovr_math.Posef>self.c_data[0]).Inverted())
 * 
 *     def inverted(self):             # <<<<<<<<<<<<<<
 *         """Get the inverse of the pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_63inverted(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_62inverted[] = "LibOVRPose.inverted(self)\nGet the inverse of the pose.\n\n        Returns\n        -------\n        LibOVRPose\n            Inverted pose.\n\n        Notes\n        -----\n        * Uses ``OVR::Posef.Inverted`` which is part of the Oculus PC SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_63inverted(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inverted (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_62inverted(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_62inverted(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  ovrPosef *__pyx_v_ptr;
  OVR::Posef *__pyx_v_pose;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr __pyx_t_3;
  __Pyx_RefNannySetupContext("inverted", 0);

  /* "psychxr/libovr/_libovr.pyx":1844
 * 
 *         """
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(             # <<<<<<<<<<<<<<
 *             sizeof(capi.ovrPosef))
 * 
 */
  __pyx_v_ptr = ((ovrPosef *)PyMem_Malloc((sizeof(ovrPosef))));

  /* "psychxr/libovr/_libovr.pyx":1847
 *             sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":1848
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 */
    PyErr_NoMemory(); __PYX_ERR(0, 1848, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":1847
 *             sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":1850
 *             raise MemoryError
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 *         ptr[0] = <capi.ovrPosef>(pose.Inverted())
 * 
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":1851
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         ptr[0] = <capi.ovrPosef>(pose.Inverted())             # <<<<<<<<<<<<<<
 * 
 *         return LibOVRPose.fromPtr(ptr, True)
 */
  (__pyx_v_ptr[0]) = __pyx_v_pose->Inverted();

  /* "psychxr/libovr/_libovr.pyx":1853
 *         ptr[0] = <capi.ovrPosef>(pose.Inverted())
 * 
 *         return LibOVRPose.fromPtr(ptr, True)             # <<<<<<<<<<<<<<
 * 
 *     def rotate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.owner = 1;
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr(__pyx_v_ptr, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1831
 *             <capi.ovrPosef>((<libovr_math.Posef>self.c_data[0]).Inverted())
 * 
 *     def inverted(self):             # <<<<<<<<<<<<<<
 *         """Get the inverse of the pose.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.inverted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1855
 *         return LibOVRPose.fromPtr(ptr, True)
 * 
 *     def rotate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Rotate a position vector.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_65rotate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_64rotate[] = "LibOVRPose.rotate(self, v, ndarray out=None)\nRotate a position vector.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to rotate.\n        out : ndarray, optional\n            Optional output array. Must have `dtype=float32` and `shape=(3,)`.\n\n        Returns\n        -------\n        ndarray\n            Vector rotated by the pose's orientation.\n\n        Notes\n        -----\n        * Uses ``OVR::Posef.Rotate`` which is part of the Oculus PC SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_65rotate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rotate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rotate") < 0)) __PYX_ERR(0, 1855, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_v = values[0];
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rotate", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1855, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.rotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1855, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_64rotate(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_v, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_64rotate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Posef *__pyx_v_pose;
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Vector3f __pyx_v_rotated_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  OVR::Vector3f __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("rotate", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1855, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1876
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1877
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1877, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1877, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1876
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1879
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1879, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1881
 *             toReturn = out
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":1883
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f rotated_pos = pose.Rotate(pos_in)
 * 
 */
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":1882
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f rotated_pos = pose.Rotate(pos_in)
 */
  try {
    __pyx_t_15 = OVR::Vector3f(((float)__pyx_t_12), ((float)__pyx_t_13), ((float)__pyx_t_14));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1882, __pyx_L1_error)
  }
  __pyx_v_pos_in = __pyx_t_15;

  /* "psychxr/libovr/_libovr.pyx":1884
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f rotated_pos = pose.Rotate(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = rotated_pos.x
 */
  __pyx_v_rotated_pos = __pyx_v_pose->Rotate(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":1886
 *         cdef libovr_math.Vector3f rotated_pos = pose.Rotate(pos_in)
 * 
 *         toReturn[0] = rotated_pos.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = rotated_pos.y
 *         toReturn[2] = rotated_pos.z
 */
  __pyx_t_14 = __pyx_v_rotated_pos.x;
  __pyx_t_16 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1886, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1887
 * 
 *         toReturn[0] = rotated_pos.x
 *         toReturn[1] = rotated_pos.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = rotated_pos.z
 * 
 */
  __pyx_t_14 = __pyx_v_rotated_pos.y;
  __pyx_t_17 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1887, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1888
 *         toReturn[0] = rotated_pos.x
 *         toReturn[1] = rotated_pos.y
 *         toReturn[2] = rotated_pos.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_14 = __pyx_v_rotated_pos.z;
  __pyx_t_18 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1888, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1890
 *         toReturn[2] = rotated_pos.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def inverseRotate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1855
 *         return LibOVRPose.fromPtr(ptr, True)
 * 
 *     def rotate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Rotate a position vector.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.rotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1892
 *         return toReturn
 * 
 *     def inverseRotate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Inverse rotate a position vector.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_67inverseRotate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_66inverseRotate[] = "LibOVRPose.inverseRotate(self, v, ndarray out=None)\nInverse rotate a position vector.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to inverse rotate (x, y, z).\n        out : ndarray, optional\n            Optional output array. Must have `dtype=float32` and `shape=(3,)`.\n\n        Returns\n        -------\n        ndarray\n            Vector rotated by the pose's inverse orientation.\n\n        Notes\n        -----\n        * Uses ``OVR::Vector3f.InverseRotate`` which is part of the Oculus PC\n          SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_67inverseRotate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inverseRotate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inverseRotate") < 0)) __PYX_ERR(0, 1892, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_v = values[0];
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inverseRotate", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1892, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.inverseRotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1892, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_66inverseRotate(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_v, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_66inverseRotate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Posef *__pyx_v_pose;
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Vector3f __pyx_v_invRotatedPos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  OVR::Vector3f __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("inverseRotate", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1892, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1914
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1915
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1915, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1915, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1914
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1917
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1917, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1919
 *             toReturn = out
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":1921
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f invRotatedPos = pose.InverseRotate(pos_in)
 * 
 */
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":1920
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f invRotatedPos = pose.InverseRotate(pos_in)
 */
  try {
    __pyx_t_15 = OVR::Vector3f(((float)__pyx_t_12), ((float)__pyx_t_13), ((float)__pyx_t_14));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1920, __pyx_L1_error)
  }
  __pyx_v_pos_in = __pyx_t_15;

  /* "psychxr/libovr/_libovr.pyx":1922
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f invRotatedPos = pose.InverseRotate(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = invRotatedPos.x
 */
  __pyx_v_invRotatedPos = __pyx_v_pose->InverseRotate(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":1924
 *         cdef libovr_math.Vector3f invRotatedPos = pose.InverseRotate(pos_in)
 * 
 *         toReturn[0] = invRotatedPos.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = invRotatedPos.y
 *         toReturn[2] = invRotatedPos.z
 */
  __pyx_t_14 = __pyx_v_invRotatedPos.x;
  __pyx_t_16 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1924, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1925
 * 
 *         toReturn[0] = invRotatedPos.x
 *         toReturn[1] = invRotatedPos.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = invRotatedPos.z
 * 
 */
  __pyx_t_14 = __pyx_v_invRotatedPos.y;
  __pyx_t_17 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1925, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1926
 *         toReturn[0] = invRotatedPos.x
 *         toReturn[1] = invRotatedPos.y
 *         toReturn[2] = invRotatedPos.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_14 = __pyx_v_invRotatedPos.z;
  __pyx_t_18 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1926, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1928
 *         toReturn[2] = invRotatedPos.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def translate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1892
 *         return toReturn
 * 
 *     def inverseRotate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Inverse rotate a position vector.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.inverseRotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1930
 *         return toReturn
 * 
 *     def translate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Translate a position vector.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_69translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_68translate[] = "LibOVRPose.translate(self, v, ndarray out=None)\nTranslate a position vector.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to translate [x, y, z].\n        out : ndarray, optional\n            Optional output array. Must have `dtype=float32` and `shape=(3,)`.\n\n        Returns\n        -------\n        ndarray\n            Vector translated by the pose's position.\n\n        Notes\n        -----\n        * Uses ``OVR::Vector3f.Translate`` which is part of the Oculus PC SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_69translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("translate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "translate") < 0)) __PYX_ERR(0, 1930, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_v = values[0];
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translate", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1930, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.translate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1930, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_68translate(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_v, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_68translate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Posef *__pyx_v_pose;
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Vector3f __pyx_v_translated_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  OVR::Vector3f __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("translate", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1930, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1951
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1952
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1952, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1952, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1951
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1954
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1954, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1956
 *             toReturn = out
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":1958
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f translated_pos = pose.Translate(pos_in)
 * 
 */
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":1957
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f translated_pos = pose.Translate(pos_in)
 */
  try {
    __pyx_t_15 = OVR::Vector3f(((float)__pyx_t_12), ((float)__pyx_t_13), ((float)__pyx_t_14));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1957, __pyx_L1_error)
  }
  __pyx_v_pos_in = __pyx_t_15;

  /* "psychxr/libovr/_libovr.pyx":1959
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f translated_pos = pose.Translate(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = translated_pos.x
 */
  __pyx_v_translated_pos = __pyx_v_pose->Translate(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":1961
 *         cdef libovr_math.Vector3f translated_pos = pose.Translate(pos_in)
 * 
 *         toReturn[0] = translated_pos.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = translated_pos.y
 *         toReturn[2] = translated_pos.z
 */
  __pyx_t_14 = __pyx_v_translated_pos.x;
  __pyx_t_16 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1961, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1962
 * 
 *         toReturn[0] = translated_pos.x
 *         toReturn[1] = translated_pos.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = translated_pos.z
 * 
 */
  __pyx_t_14 = __pyx_v_translated_pos.y;
  __pyx_t_17 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1962, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1963
 *         toReturn[0] = translated_pos.x
 *         toReturn[1] = translated_pos.y
 *         toReturn[2] = translated_pos.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_14 = __pyx_v_translated_pos.z;
  __pyx_t_18 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1963, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1965
 *         toReturn[2] = translated_pos.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def transform(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1930
 *         return toReturn
 * 
 *     def translate(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Translate a position vector.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.translate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":1967
 *         return toReturn
 * 
 *     def transform(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Transform a position vector.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_71transform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_70transform[] = "LibOVRPose.transform(self, v, ndarray out=None)\nTransform a position vector.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to transform [x, y, z].\n        out : ndarray, optional\n            Optional output array. Must have `dtype=float32` and `shape=(3,)`.\n\n        Returns\n        -------\n        ndarray\n            Vector transformed by the pose's position and orientation.\n\n        Notes\n        -----\n        * Uses ``OVR::Vector3f.Transform`` which is part of the Oculus PC SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_71transform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transform (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transform") < 0)) __PYX_ERR(0, 1967, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_v = values[0];
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transform", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1967, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 1967, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_70transform(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_v, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_70transform(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Posef *__pyx_v_pose;
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Vector3f __pyx_v_transformed_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  OVR::Vector3f __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("transform", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1967, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":1988
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":1989
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1989, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1989, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":1988
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":1991
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1991, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":1993
 *             toReturn = out
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":1995
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f transformed_pos = pose.Transform(pos_in)
 * 
 */
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":1994
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = pose.Transform(pos_in)
 */
  try {
    __pyx_t_15 = OVR::Vector3f(((float)__pyx_t_12), ((float)__pyx_t_13), ((float)__pyx_t_14));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1994, __pyx_L1_error)
  }
  __pyx_v_pos_in = __pyx_t_15;

  /* "psychxr/libovr/_libovr.pyx":1996
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = pose.Transform(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = transformed_pos.x
 */
  __pyx_v_transformed_pos = __pyx_v_pose->Transform(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":1998
 *         cdef libovr_math.Vector3f transformed_pos = pose.Transform(pos_in)
 * 
 *         toReturn[0] = transformed_pos.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z
 */
  __pyx_t_14 = __pyx_v_transformed_pos.x;
  __pyx_t_16 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1998, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":1999
 * 
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = transformed_pos.z
 * 
 */
  __pyx_t_14 = __pyx_v_transformed_pos.y;
  __pyx_t_17 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 1999, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2000
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_14 = __pyx_v_transformed_pos.z;
  __pyx_t_18 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2000, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2002
 *         toReturn[2] = transformed_pos.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def inverseTransform(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":1967
 *         return toReturn
 * 
 *     def transform(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Transform a position vector.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2004
 *         return toReturn
 * 
 *     def inverseTransform(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Inverse transform a position vector.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_73inverseTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_72inverseTransform[] = "LibOVRPose.inverseTransform(self, v, ndarray out=None)\nInverse transform a position vector.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to transform (x, y, z).\n        out : ndarray, optional\n            Optional output array. Must have `dtype=float32` and `shape=(3,)`.\n\n        Returns\n        -------\n        ndarray\n            Vector transformed by the inverse of the pose's position and\n            orientation.\n\n        Notes\n        -----\n        * Uses ``OVR::Vector3f.InverseTransform`` which is part of the Oculus PC\n          SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_73inverseTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inverseTransform (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inverseTransform") < 0)) __PYX_ERR(0, 2004, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_v = values[0];
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inverseTransform", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2004, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.inverseTransform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 2004, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_72inverseTransform(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_v, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_72inverseTransform(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Posef *__pyx_v_pose;
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Vector3f __pyx_v_transformed_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  OVR::Vector3f __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("inverseTransform", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2004, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":2027
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":2028
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 2028, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2028, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2028, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":2027
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":2030
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2030, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":2032
 *             toReturn = out
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":2034
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f transformed_pos = pose.InverseTransform(pos_in)
 * 
 */
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":2033
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = pose.InverseTransform(pos_in)
 */
  try {
    __pyx_t_15 = OVR::Vector3f(((float)__pyx_t_12), ((float)__pyx_t_13), ((float)__pyx_t_14));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2033, __pyx_L1_error)
  }
  __pyx_v_pos_in = __pyx_t_15;

  /* "psychxr/libovr/_libovr.pyx":2035
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = pose.InverseTransform(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = transformed_pos.x
 */
  __pyx_v_transformed_pos = __pyx_v_pose->InverseTransform(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":2037
 *         cdef libovr_math.Vector3f transformed_pos = pose.InverseTransform(pos_in)
 * 
 *         toReturn[0] = transformed_pos.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z
 */
  __pyx_t_14 = __pyx_v_transformed_pos.x;
  __pyx_t_16 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2037, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2038
 * 
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = transformed_pos.z
 * 
 */
  __pyx_t_14 = __pyx_v_transformed_pos.y;
  __pyx_t_17 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2038, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2039
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_14 = __pyx_v_transformed_pos.z;
  __pyx_t_18 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2039, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2041
 *         toReturn[2] = transformed_pos.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def transformNormal(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2004
 *         return toReturn
 * 
 *     def inverseTransform(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Inverse transform a position vector.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.inverseTransform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2043
 *         return toReturn
 * 
 *     def transformNormal(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Transform a normal vector.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_75transformNormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_74transformNormal[] = "LibOVRPose.transformNormal(self, v, ndarray out=None)\nTransform a normal vector.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to transform (x, y, z).\n        out : ndarray, optional\n            Optional output array. Must have `dtype=float32` and `shape=(3,)`.\n\n        Returns\n        -------\n        ndarray\n            Vector transformed by the pose's position and orientation.\n\n        Notes\n        -----\n        * Uses ``OVR::Vector3f.TransformNormal`` which is part of the Oculus PC\n          SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_75transformNormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transformNormal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transformNormal") < 0)) __PYX_ERR(0, 2043, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_v = values[0];
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transformNormal", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2043, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.transformNormal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 2043, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_74transformNormal(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_v, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_74transformNormal(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Posef *__pyx_v_pose;
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Vector3f __pyx_v_transformed_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  OVR::Vector3f __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("transformNormal", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2043, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":2065
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":2066
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2066, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2066, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":2065
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":2068
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2068, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":2070
 *             toReturn = out
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":2072
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f transformed_pos = pose.TransformNormal(pos_in)
 * 
 */
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":2071
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = pose.TransformNormal(pos_in)
 */
  try {
    __pyx_t_15 = OVR::Vector3f(((float)__pyx_t_12), ((float)__pyx_t_13), ((float)__pyx_t_14));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2071, __pyx_L1_error)
  }
  __pyx_v_pos_in = __pyx_t_15;

  /* "psychxr/libovr/_libovr.pyx":2073
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = pose.TransformNormal(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = transformed_pos.x
 */
  __pyx_v_transformed_pos = __pyx_v_pose->TransformNormal(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":2075
 *         cdef libovr_math.Vector3f transformed_pos = pose.TransformNormal(pos_in)
 * 
 *         toReturn[0] = transformed_pos.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z
 */
  __pyx_t_14 = __pyx_v_transformed_pos.x;
  __pyx_t_16 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2075, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2076
 * 
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = transformed_pos.z
 * 
 */
  __pyx_t_14 = __pyx_v_transformed_pos.y;
  __pyx_t_17 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2076, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2077
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_14 = __pyx_v_transformed_pos.z;
  __pyx_t_18 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2077, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2079
 *         toReturn[2] = transformed_pos.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def inverseTransformNormal(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2043
 *         return toReturn
 * 
 *     def transformNormal(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Transform a normal vector.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.transformNormal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2081
 *         return toReturn
 * 
 *     def inverseTransformNormal(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Inverse transform a normal vector.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_77inverseTransformNormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_76inverseTransformNormal[] = "LibOVRPose.inverseTransformNormal(self, v, ndarray out=None)\nInverse transform a normal vector.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to transform (x, y, z).\n        out : ndarray, optional\n            Optional output array. Must have `dtype=float32` and `shape=(3,)`.\n\n        Returns\n        -------\n        ndarray\n            Vector transformed by the pose's position and orientation.\n\n        Notes\n        -----\n        * Uses ``OVR::Vector3f.InverseTransformNormal`` which is part of the\n          Oculus PC SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_77inverseTransformNormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inverseTransformNormal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inverseTransformNormal") < 0)) __PYX_ERR(0, 2081, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_v = values[0];
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inverseTransformNormal", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2081, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.inverseTransformNormal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 2081, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_76inverseTransformNormal(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_v, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_76inverseTransformNormal(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Posef *__pyx_v_pose;
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Vector3f __pyx_v_transformed_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  OVR::Vector3f __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("inverseTransformNormal", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2081, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":2103
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":2104
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 2104, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2104, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2104, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":2103
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":2106
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2106, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":2108
 *             toReturn = out
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":2110
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f transformed_pos = \
 *             pose.InverseTransformNormal(pos_in)
 */
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":2109
 * 
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = \
 */
  try {
    __pyx_t_15 = OVR::Vector3f(((float)__pyx_t_12), ((float)__pyx_t_13), ((float)__pyx_t_14));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2109, __pyx_L1_error)
  }
  __pyx_v_pos_in = __pyx_t_15;

  /* "psychxr/libovr/_libovr.pyx":2112
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = \
 *             pose.InverseTransformNormal(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = transformed_pos.x
 */
  __pyx_v_transformed_pos = __pyx_v_pose->InverseTransformNormal(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":2114
 *             pose.InverseTransformNormal(pos_in)
 * 
 *         toReturn[0] = transformed_pos.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z
 */
  __pyx_t_14 = __pyx_v_transformed_pos.x;
  __pyx_t_16 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2114, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2115
 * 
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = transformed_pos.z
 * 
 */
  __pyx_t_14 = __pyx_v_transformed_pos.y;
  __pyx_t_17 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2115, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2116
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_14 = __pyx_v_transformed_pos.z;
  __pyx_t_18 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2116, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2118
 *         toReturn[2] = transformed_pos.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def apply(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2081
 *         return toReturn
 * 
 *     def inverseTransformNormal(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Inverse transform a normal vector.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.inverseTransformNormal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2120
 *         return toReturn
 * 
 *     def apply(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Apply a transform to a position vector.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_79apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_78apply[] = "LibOVRPose.apply(self, v, ndarray out=None)\nApply a transform to a position vector.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to transform (x, y, z).\n        out : ndarray, optional\n            Optional output array. Must have `dtype=float32` and `shape=(3,)`.\n\n        Returns\n        -------\n        ndarray\n            Vector transformed by the pose's position and orientation.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_79apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply") < 0)) __PYX_ERR(0, 2120, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_v = values[0];
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2120, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 2120, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_78apply(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_v, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_78apply(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_toReturn = 0;
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Vector3f __pyx_v_transformed_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_toReturn;
  __Pyx_Buffer __pyx_pybuffer_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  float __pyx_t_12;
  float __pyx_t_13;
  float __pyx_t_14;
  OVR::Vector3f __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __Pyx_RefNannySetupContext("apply", 0);
  __pyx_pybuffer_toReturn.pybuffer.buf = NULL;
  __pyx_pybuffer_toReturn.refcount = 0;
  __pyx_pybuffernd_toReturn.data = NULL;
  __pyx_pybuffernd_toReturn.rcbuffer = &__pyx_pybuffer_toReturn;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2120, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":2137
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":2138
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2138, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2138, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":2137
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:             # <<<<<<<<<<<<<<
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":2140
 *             toReturn = np.zeros((3,), dtype=np.float32)
 *         else:
 *             toReturn = out             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer, (PyObject*)__pyx_v_toReturn, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_toReturn.diminfo[0].strides = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_toReturn.diminfo[0].shape = __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2140, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_toReturn = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":2143
 * 
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(
 *             <float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f transformed_pos = \
 *             (<libovr_math.Posef>self.c_data[0]).Apply(pos_in)
 */
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":2142
 *             toReturn = out
 * 
 *         cdef libovr_math.Vector3f pos_in = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = \
 */
  try {
    __pyx_t_15 = OVR::Vector3f(((float)__pyx_t_12), ((float)__pyx_t_13), ((float)__pyx_t_14));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2142, __pyx_L1_error)
  }
  __pyx_v_pos_in = __pyx_t_15;

  /* "psychxr/libovr/_libovr.pyx":2145
 *             <float>v[0], <float>v[1], <float>v[2])
 *         cdef libovr_math.Vector3f transformed_pos = \
 *             (<libovr_math.Posef>self.c_data[0]).Apply(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         toReturn[0] = transformed_pos.x
 */
  __pyx_v_transformed_pos = ((OVR::Posef)(__pyx_v_self->c_data[0])).Apply(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":2147
 *             (<libovr_math.Posef>self.c_data[0]).Apply(pos_in)
 * 
 *         toReturn[0] = transformed_pos.x             # <<<<<<<<<<<<<<
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z
 */
  __pyx_t_14 = __pyx_v_transformed_pos.x;
  __pyx_t_16 = 0;
  __pyx_t_8 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2147, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2148
 * 
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y             # <<<<<<<<<<<<<<
 *         toReturn[2] = transformed_pos.z
 * 
 */
  __pyx_t_14 = __pyx_v_transformed_pos.y;
  __pyx_t_17 = 1;
  __pyx_t_8 = -1;
  if (__pyx_t_17 < 0) {
    __pyx_t_17 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2148, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2149
 *         toReturn[0] = transformed_pos.x
 *         toReturn[1] = transformed_pos.y
 *         toReturn[2] = transformed_pos.z             # <<<<<<<<<<<<<<
 * 
 *         return toReturn
 */
  __pyx_t_14 = __pyx_v_transformed_pos.z;
  __pyx_t_18 = 2;
  __pyx_t_8 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_toReturn.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_toReturn.diminfo[0].shape)) __pyx_t_8 = 0;
  if (unlikely(__pyx_t_8 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_8);
    __PYX_ERR(0, 2149, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_toReturn.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_toReturn.diminfo[0].strides) = __pyx_t_14;

  /* "psychxr/libovr/_libovr.pyx":2151
 *         toReturn[2] = transformed_pos.z
 * 
 *         return toReturn             # <<<<<<<<<<<<<<
 * 
 *     def distanceTo(self, object v):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2120
 *         return toReturn
 * 
 *     def apply(self, object v, np.ndarray[np.float32_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *         """Apply a transform to a position vector.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_toReturn.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2153
 *         return toReturn
 * 
 *     def distanceTo(self, object v):             # <<<<<<<<<<<<<<
 *         """Distance to a point or pose from this pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_81distanceTo(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_80distanceTo[] = "LibOVRPose.distanceTo(self, v)\nDistance to a point or pose from this pose.\n\n        Parameters\n        ----------\n        v : array_like\n            Vector to transform (x, y, z).\n\n        Returns\n        -------\n        float\n            Distance to a point or LibOVRPose.\n\n        Examples\n        --------\n\n        Get the distance between poses::\n\n            distance = thisPose.distanceTo(otherPose)\n\n        Get the distance to a point coordinate::\n\n            distance = thisPose.distanceTo([0.0, 0.0, 5.0])\n\n        Do something if the tracked right hand pose is within 0.5 meters of some\n        object::\n\n            # use 'getTrackingState' instead for hand poses, just an example\n            handPose = getDevicePoses(TRACKED_DEVICE_TYPE_RTOUCH,\n                                      absTime, latencyMarker=False)\n            # object pose\n            objPose = LibOVRPose((0.0, 1.0, -0.5))\n\n            if handPose.distanceTo(objPose) < 0.5:\n                # do something here ...\n\n        Vary the touch controller's vibration amplitude as a function of\n        distance to some pose. As the hand gets closer to the point, the\n        amplitude of the vibration increases::\n\n            dist = handPose.distanceTo(objPose)\n            vibrationRadius = 0.5\n\n            if dist < vibrationRadius:  # inside vibration radius\n                amplitude = 1.0 - dist / vibrationRadius\n                setControllerVibration(CONTROLLER_TYPE_RTOUCH,\n                    'low', amplitude)\n            else:\n                # turn off vibration\n                setControllerVibration(CONTROLLER_TYPE_RTOUCH, 'off')\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_81distanceTo(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("distanceTo (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_80distanceTo(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v_v));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_80distanceTo(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_v) {
  OVR::Vector3f __pyx_v_pos_in;
  OVR::Posef *__pyx_v_pose;
  float __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  float __pyx_t_4;
  float __pyx_t_5;
  float __pyx_t_6;
  OVR::Vector3f __pyx_t_7;
  __Pyx_RefNannySetupContext("distanceTo", 0);

  /* "psychxr/libovr/_libovr.pyx":2206
 *         """
 *         cdef libovr_math.Vector3f pos_in
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(v, LibOVRPose):
 */
  __pyx_v_pose = ((OVR::Posef *)__pyx_v_self->c_data);

  /* "psychxr/libovr/_libovr.pyx":2208
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 * 
 *         if isinstance(v, LibOVRPose):             # <<<<<<<<<<<<<<
 *             pos_in = <libovr_math.Vector3f>((<LibOVRPose>v).c_data[0]).Position
 *         else:
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_v, __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":2209
 * 
 *         if isinstance(v, LibOVRPose):
 *             pos_in = <libovr_math.Vector3f>((<LibOVRPose>v).c_data[0]).Position             # <<<<<<<<<<<<<<
 *         else:
 *             pos_in = libovr_math.Vector3f(<float>v[0], <float>v[1], <float>v[2])
 */
    __pyx_v_pos_in = ((OVR::Vector3f)(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_v)->c_data[0]).Position);

    /* "psychxr/libovr/_libovr.pyx":2208
 *         cdef libovr_math.Posef* pose = <libovr_math.Posef*>self.c_data
 * 
 *         if isinstance(v, LibOVRPose):             # <<<<<<<<<<<<<<
 *             pos_in = <libovr_math.Vector3f>((<LibOVRPose>v).c_data[0]).Position
 *         else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":2211
 *             pos_in = <libovr_math.Vector3f>((<LibOVRPose>v).c_data[0]).Position
 *         else:
 *             pos_in = libovr_math.Vector3f(<float>v[0], <float>v[1], <float>v[2])             # <<<<<<<<<<<<<<
 * 
 *         cdef float to_return = pose.Translation.Distance(pos_in)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    try {
      __pyx_t_7 = OVR::Vector3f(((float)__pyx_t_4), ((float)__pyx_t_5), ((float)__pyx_t_6));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 2211, __pyx_L1_error)
    }
    __pyx_v_pos_in = __pyx_t_7;
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":2213
 *             pos_in = libovr_math.Vector3f(<float>v[0], <float>v[1], <float>v[2])
 * 
 *         cdef float to_return = pose.Translation.Distance(pos_in)             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
  __pyx_v_to_return = __pyx_v_pose->Translation.Distance(__pyx_v_pos_in);

  /* "psychxr/libovr/_libovr.pyx":2215
 *         cdef float to_return = pose.Translation.Distance(pos_in)
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 *     def raycastSphere(self, object targetPose, float radius=0.5, object rayDir=(0., 0., -1.), float maxRange=0.0):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_to_return); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2153
 *         return toReturn
 * 
 *     def distanceTo(self, object v):             # <<<<<<<<<<<<<<
 *         """Distance to a point or pose from this pose.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.distanceTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2217
 *         return to_return
 * 
 *     def raycastSphere(self, object targetPose, float radius=0.5, object rayDir=(0., 0., -1.), float maxRange=0.0):             # <<<<<<<<<<<<<<
 *         """Raycast to a sphere.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_83raycastSphere(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_82raycastSphere[] = "LibOVRPose.raycastSphere(self, targetPose, float radius=0.5, rayDir=(0., 0., -1.), float maxRange=0.0)\nRaycast to a sphere.\n\n        Project an invisible ray of finite or infinite length from this pose in\n        `rayDir` and check if it intersects with the `targetPose` bounding\n        sphere.\n\n        This method allows for very basic interaction between objects\n        represented by poses in a scene, including tracked devices.\n\n        Specifying `maxRange` as >0.0 casts a ray of finite length in world\n        units. The distance between the target and ray origin position are\n        checked prior to casting the ray; automatically failing if the ray can\n        never reach the edge of the bounding sphere centered about `targetPose`.\n        This avoids having to do the costly transformations required for\n        picking.\n\n        This raycast implementation can only determine if contact is being made\n        with the object's bounding sphere, not where on the object the ray\n        intersects. This method might not work for irregular or elongated\n        objects since bounding spheres may not approximate those shapes well. In\n        such cases, one may use multiple spheres at different locations and\n        radii to pick the same object.\n\n        Parameters\n        ----------\n        targetPose : array_like\n            Coordinates of the center of the target sphere (x, y, z).\n        radius : float, optional\n            The radius of the target.\n        rayDir : array_like, optional\n            Vector indicating the direction for the ray (default is -Z).\n        maxRange : float, optional\n            The maximum range of the ray. Ray testing will fail automatically if\n            the target is out of range. Ray is infinite if `maxRange`=0.0.\n\n        Returns\n        -------\n        bool\n            True if the ray intersects anywhere on the bounding sphere, False in\n            every other condition.\n\n        Examples""\n        --------\n\n        Basic example to check if the HMD is aligned to some target::\n\n            targetPose = LibOVRPose((0.0, 1.5, -5.0))\n            targetRadius = 0.5  # 2.5 cm\n            isTouching = hmdPose.raycastSphere(targetPose,\n                                               radius=targetRadius)\n\n        Check if someone is touching a target with their finger when making a\n        pointing gesture while providing haptic feedback::\n\n            targetPose = LibOVRPose((0.0, 1.5, -0.25))\n            targetRadius = 0.025  # 2.5 cm\n            fingerLength = 0.1  # 10 cm\n\n            # check if making a pointing gesture with their right hand\n            isPointing = getTouch(CONTROLLER_TYPE_RTOUCH,\n                TOUCH_RINDEXPOINTING)\n\n            if isPointing:\n                # do raycasting operation\n                isTouching = handPose.raycastSphere(\n                    targetPose, radius=targetRadius, maxRange=fingerLength)\n                if isTouching:\n                    # do something here, like make the controller vibrate\n                    setControllerVibration(\n                        CONTROLLER_TYPE_RTOUCH, 'low', 0.5)\n                else:\n                    # stop vibration if no longer touching\n                    setControllerVibration(CONTROLLER_TYPE_RTOUCH, 'off')\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_83raycastSphere(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_targetPose = 0;
  float __pyx_v_radius;
  PyObject *__pyx_v_rayDir = 0;
  float __pyx_v_maxRange;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("raycastSphere (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_targetPose,&__pyx_n_s_radius,&__pyx_n_s_rayDir,&__pyx_n_s_maxRange,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_tuple__9);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_targetPose)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rayDir);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxRange);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "raycastSphere") < 0)) __PYX_ERR(0, 2217, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_targetPose = values[0];
    if (values[1]) {
      __pyx_v_radius = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_radius == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2217, __pyx_L3_error)
    } else {
      __pyx_v_radius = ((float)0.5);
    }
    __pyx_v_rayDir = values[2];
    if (values[3]) {
      __pyx_v_maxRange = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_maxRange == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2217, __pyx_L3_error)
    } else {
      __pyx_v_maxRange = ((float)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("raycastSphere", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2217, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.raycastSphere", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_82raycastSphere(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_targetPose, __pyx_v_radius, __pyx_v_rayDir, __pyx_v_maxRange);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_82raycastSphere(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, PyObject *__pyx_v_targetPose, float __pyx_v_radius, PyObject *__pyx_v_rayDir, float __pyx_v_maxRange) {
  OVR::Vector3f __pyx_v_targetPos;
  OVR::Vector3f __pyx_v__rayDir;
  OVR::Posef __pyx_v_originPos;
  float __pyx_v_targetDist;
  OVR::Vector3f __pyx_v_offset;
  float __pyx_v_desc;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  float __pyx_t_3;
  float __pyx_t_4;
  OVR::Vector3f __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("raycastSphere", 0);

  /* "psychxr/libovr/_libovr.pyx":2294
 *         """
 *         cdef libovr_math.Vector3f targetPos = libovr_math.Vector3f(
 *             <float>targetPose[0], <float>targetPose[1], <float>targetPose[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f _rayDir = libovr_math.Vector3f(
 *             <float>rayDir[0], <float>rayDir[1], <float>rayDir[2])
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_targetPose, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_targetPose, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_targetPose, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2293
 * 
 *         """
 *         cdef libovr_math.Vector3f targetPos = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>targetPose[0], <float>targetPose[1], <float>targetPose[2])
 *         cdef libovr_math.Vector3f _rayDir = libovr_math.Vector3f(
 */
  try {
    __pyx_t_5 = OVR::Vector3f(((float)__pyx_t_2), ((float)__pyx_t_3), ((float)__pyx_t_4));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2293, __pyx_L1_error)
  }
  __pyx_v_targetPos = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":2296
 *             <float>targetPose[0], <float>targetPose[1], <float>targetPose[2])
 *         cdef libovr_math.Vector3f _rayDir = libovr_math.Vector3f(
 *             <float>rayDir[0], <float>rayDir[1], <float>rayDir[2])             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Posef originPos = <libovr_math.Posef>self.c_data[0]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_rayDir, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_rayDir, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_rayDir, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2295
 *         cdef libovr_math.Vector3f targetPos = libovr_math.Vector3f(
 *             <float>targetPose[0], <float>targetPose[1], <float>targetPose[2])
 *         cdef libovr_math.Vector3f _rayDir = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>rayDir[0], <float>rayDir[1], <float>rayDir[2])
 *         cdef libovr_math.Posef originPos = <libovr_math.Posef>self.c_data[0]
 */
  try {
    __pyx_t_5 = OVR::Vector3f(((float)__pyx_t_4), ((float)__pyx_t_3), ((float)__pyx_t_2));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2295, __pyx_L1_error)
  }
  __pyx_v__rayDir = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":2297
 *         cdef libovr_math.Vector3f _rayDir = libovr_math.Vector3f(
 *             <float>rayDir[0], <float>rayDir[1], <float>rayDir[2])
 *         cdef libovr_math.Posef originPos = <libovr_math.Posef>self.c_data[0]             # <<<<<<<<<<<<<<
 * 
 *         # if the ray is finite, does it ever touch the edge of the sphere?
 */
  __pyx_v_originPos = ((OVR::Posef)(__pyx_v_self->c_data[0]));

  /* "psychxr/libovr/_libovr.pyx":2301
 *         # if the ray is finite, does it ever touch the edge of the sphere?
 *         cdef float targetDist
 *         if maxRange != 0.0:             # <<<<<<<<<<<<<<
 *             targetDist = targetPos.Distance(originPos.Translation) - radius
 *             if targetDist > maxRange:
 */
  __pyx_t_6 = ((__pyx_v_maxRange != 0.0) != 0);
  if (__pyx_t_6) {

    /* "psychxr/libovr/_libovr.pyx":2302
 *         cdef float targetDist
 *         if maxRange != 0.0:
 *             targetDist = targetPos.Distance(originPos.Translation) - radius             # <<<<<<<<<<<<<<
 *             if targetDist > maxRange:
 *                 return False
 */
    __pyx_v_targetDist = (__pyx_v_targetPos.Distance(__pyx_v_originPos.Translation) - __pyx_v_radius);

    /* "psychxr/libovr/_libovr.pyx":2303
 *         if maxRange != 0.0:
 *             targetDist = targetPos.Distance(originPos.Translation) - radius
 *             if targetDist > maxRange:             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    __pyx_t_6 = ((__pyx_v_targetDist > __pyx_v_maxRange) != 0);
    if (__pyx_t_6) {

      /* "psychxr/libovr/_libovr.pyx":2304
 *             targetDist = targetPos.Distance(originPos.Translation) - radius
 *             if targetDist > maxRange:
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         # put the target in the ray caster's local coordinate system
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

      /* "psychxr/libovr/_libovr.pyx":2303
 *         if maxRange != 0.0:
 *             targetDist = targetPos.Distance(originPos.Translation) - radius
 *             if targetDist > maxRange:             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    }

    /* "psychxr/libovr/_libovr.pyx":2301
 *         # if the ray is finite, does it ever touch the edge of the sphere?
 *         cdef float targetDist
 *         if maxRange != 0.0:             # <<<<<<<<<<<<<<
 *             targetDist = targetPos.Distance(originPos.Translation) - radius
 *             if targetDist > maxRange:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2307
 * 
 *         # put the target in the ray caster's local coordinate system
 *         cdef libovr_math.Vector3f offset = -originPos.InverseTransform(targetPos)             # <<<<<<<<<<<<<<
 * 
 *         # find the discriminant, this is based on the method described here:
 */
  __pyx_v_offset = (-__pyx_v_originPos.InverseTransform(__pyx_v_targetPos));

  /* "psychxr/libovr/_libovr.pyx":2311
 *         # find the discriminant, this is based on the method described here:
 *         # http://antongerdelan.net/opengl/raycasting.html
 *         cdef float desc = <float>pow(_rayDir.Dot(offset), 2.0) - \             # <<<<<<<<<<<<<<
 *                (offset.Dot(offset) - <float>pow(radius, 2.0))
 * 
 */
  __pyx_v_desc = (((float)pow(__pyx_v__rayDir.Dot(__pyx_v_offset), 2.0)) - (__pyx_v_offset.Dot(__pyx_v_offset) - ((float)pow(__pyx_v_radius, 2.0))));

  /* "psychxr/libovr/_libovr.pyx":2315
 * 
 *         # one or more roots? if so we are touching the sphere
 *         return desc >= 0.0             # <<<<<<<<<<<<<<
 * 
 *     def interp(self, LibOVRPose end, float s, bint fast=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_desc >= 0.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2217
 *         return to_return
 * 
 *     def raycastSphere(self, object targetPose, float radius=0.5, object rayDir=(0., 0., -1.), float maxRange=0.0):             # <<<<<<<<<<<<<<
 *         """Raycast to a sphere.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.raycastSphere", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2317
 *         return desc >= 0.0
 * 
 *     def interp(self, LibOVRPose end, float s, bint fast=False):             # <<<<<<<<<<<<<<
 *         """Interpolate between poses.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_85interp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_84interp[] = "LibOVRPose.interp(self, LibOVRPose end, float s, bool fast=False)\nInterpolate between poses.\n\n        Linear interpolation is used on position (Lerp) while the orientation\n        has spherical linear interpolation (Slerp) applied.\n\n        Parameters\n        ----------\n        end : LibOVRPose\n            End pose.\n        s : float\n            Interpolation factor between interval 0.0 and 1.0.\n        fast : bool, optional\n            If True, use fast interpolation which is quicker but less accurate\n            over larger distances.\n\n        Returns\n        -------\n        LibOVRPose\n            Interpolated pose at `s`.\n\n        Notes\n        -----\n        * Uses ``OVR::Posef.Lerp`` and ``OVR::Posef.FastLerp`` which is part of\n          the Oculus PC SDK.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_85interp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_end = 0;
  float __pyx_v_s;
  int __pyx_v_fast;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("interp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_end,&__pyx_n_s_s,&__pyx_n_s_fast,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("interp", 0, 2, 3, 1); __PYX_ERR(0, 2317, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fast);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "interp") < 0)) __PYX_ERR(0, 2317, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_end = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)values[0]);
    __pyx_v_s = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_s == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2317, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_fast = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_fast == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2317, __pyx_L3_error)
    } else {
      __pyx_v_fast = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("interp", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2317, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "end", 0))) __PYX_ERR(0, 2317, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_84interp(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), __pyx_v_end, __pyx_v_s, __pyx_v_fast);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_84interp(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_end, float __pyx_v_s, int __pyx_v_fast) {
  OVR::Posef __pyx_v_toPose;
  ovrPosef *__pyx_v_ptr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr __pyx_t_4;
  __Pyx_RefNannySetupContext("interp", 0);

  /* "psychxr/libovr/_libovr.pyx":2344
 * 
 *         """
 *         if 0.0 > s > 1.0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Interpolation factor must be between 0.0 and 1.0.")
 * 
 */
  __pyx_t_1 = (0.0 > __pyx_v_s);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_s > 1.0);
  }
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psychxr/libovr/_libovr.pyx":2345
 *         """
 *         if 0.0 > s > 1.0:
 *             raise ValueError("Interpolation factor must be between 0.0 and 1.0.")             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef toPose = <libovr_math.Posef>end.c_data[0]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2345, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":2344
 * 
 *         """
 *         if 0.0 > s > 1.0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Interpolation factor must be between 0.0 and 1.0.")
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2347
 *             raise ValueError("Interpolation factor must be between 0.0 and 1.0.")
 * 
 *         cdef libovr_math.Posef toPose = <libovr_math.Posef>end.c_data[0]             # <<<<<<<<<<<<<<
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 */
  __pyx_v_toPose = ((OVR::Posef)(__pyx_v_end->c_data[0]));

  /* "psychxr/libovr/_libovr.pyx":2348
 * 
 *         cdef libovr_math.Posef toPose = <libovr_math.Posef>end.c_data[0]
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))             # <<<<<<<<<<<<<<
 * 
 *         if ptr is NULL:
 */
  __pyx_v_ptr = ((ovrPosef *)PyMem_Malloc((sizeof(ovrPosef))));

  /* "psychxr/libovr/_libovr.pyx":2350
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_2 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psychxr/libovr/_libovr.pyx":2351
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         if not fast:
 */
    PyErr_NoMemory(); __PYX_ERR(0, 2351, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":2350
 *         cdef capi.ovrPosef* ptr = <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2353
 *             raise MemoryError
 * 
 *         if not fast:             # <<<<<<<<<<<<<<
 *             ptr[0] = <capi.ovrPosef>(
 *                 (<libovr_math.Posef>self.c_data[0]).Lerp(toPose, s))
 */
  __pyx_t_2 = ((!(__pyx_v_fast != 0)) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":2354
 * 
 *         if not fast:
 *             ptr[0] = <capi.ovrPosef>(             # <<<<<<<<<<<<<<
 *                 (<libovr_math.Posef>self.c_data[0]).Lerp(toPose, s))
 *         else:
 */
    (__pyx_v_ptr[0]) = ((OVR::Posef)(__pyx_v_self->c_data[0])).Lerp(__pyx_v_toPose, __pyx_v_s);

    /* "psychxr/libovr/_libovr.pyx":2353
 *             raise MemoryError
 * 
 *         if not fast:             # <<<<<<<<<<<<<<
 *             ptr[0] = <capi.ovrPosef>(
 *                 (<libovr_math.Posef>self.c_data[0]).Lerp(toPose, s))
 */
    goto __pyx_L5;
  }

  /* "psychxr/libovr/_libovr.pyx":2357
 *                 (<libovr_math.Posef>self.c_data[0]).Lerp(toPose, s))
 *         else:
 *             ptr[0] = <capi.ovrPosef>(             # <<<<<<<<<<<<<<
 *                 (<libovr_math.Posef>self.c_data[0]).FastLerp(toPose, s))
 * 
 */
  /*else*/ {

    /* "psychxr/libovr/_libovr.pyx":2358
 *         else:
 *             ptr[0] = <capi.ovrPosef>(
 *                 (<libovr_math.Posef>self.c_data[0]).FastLerp(toPose, s))             # <<<<<<<<<<<<<<
 * 
 *         return LibOVRPose.fromPtr(ptr, True)
 */
    (__pyx_v_ptr[0]) = ((OVR::Posef)(__pyx_v_self->c_data[0])).FastLerp(__pyx_v_toPose, __pyx_v_s);
  }
  __pyx_L5:;

  /* "psychxr/libovr/_libovr.pyx":2360
 *                 (<libovr_math.Posef>self.c_data[0]).FastLerp(toPose, s))
 * 
 *         return LibOVRPose.fromPtr(ptr, True)             # <<<<<<<<<<<<<<
 * 
 *     def isVisible(self, int eye):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.owner = 1;
  __pyx_t_3 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr(__pyx_v_ptr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2317
 *         return desc >= 0.0
 * 
 *     def interp(self, LibOVRPose end, float s, bint fast=False):             # <<<<<<<<<<<<<<
 *         """Interpolate between poses.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.interp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2362
 *         return LibOVRPose.fromPtr(ptr, True)
 * 
 *     def isVisible(self, int eye):             # <<<<<<<<<<<<<<
 *         """Check if this pose if visible to a given eye.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_87isVisible(PyObject *__pyx_v_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_86isVisible[] = "LibOVRPose.isVisible(self, int eye)\nCheck if this pose if visible to a given eye.\n\n        Visibility testing is done using the current eye render pose for `eye`.\n        This pose must have a valid bounding box assigned to `bounds`. If not,\n        this method will always return ``True``.\n\n        See :func:`cullPose` for more information about the implementation of\n        visibility culling.\n\n        Parameters\n        ----------\n        eye : int\n            Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n        Returns\n        -------\n        bool\n            ``True`` if this pose's bounding box intersects the FOV of the\n            specified `eye`.\n\n        Examples\n        --------\n        Check if a pose should be culled (needs to be done for each eye)::\n\n            if cullModel.isVisible():\n                # ... OpenGL calls to draw the model here ...\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_87isVisible(PyObject *__pyx_v_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isVisible (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2362, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.isVisible", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_86isVisible(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_86isVisible(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, int __pyx_v_eye) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("isVisible", 0);

  /* "psychxr/libovr/_libovr.pyx":2391
 * 
 *         """
 *         return not cullPose(eye, self)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cullPose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_eye); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_self));
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2362
 *         return LibOVRPose.fromPtr(ptr, True)
 * 
 *     def isVisible(self, int eye):             # <<<<<<<<<<<<<<
 *         """Check if this pose if visible to a given eye.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.isVisible", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_89__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_88__reduce_cython__[] = "LibOVRPose.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_89__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_7psychxr_6libovr_7_libovr_10LibOVRPose_88__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_88__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_10LibOVRPose_91__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_90__setstate_cython__[] = "LibOVRPose.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_91__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_7psychxr_6libovr_7_libovr_10LibOVRPose_90__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10LibOVRPose_90__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPose.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2438
 *     cdef np.ndarray _angularAcceleration
 * 
 *     def __init__(self,             # <<<<<<<<<<<<<<
 *                  object thePose=None,
 *                  object linearVelocity=(0., 0., 0.),
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__[] = "\n        Attributes\n        ----------\n        thePose : LibOVRPose\n        angularVelocity : ndarray\n        linearVelocity : ndarray\n        angularAcceleration : ndarray\n        linearAcceleration : ndarray\n        timeInSeconds : float\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_thePose = 0;
  PyObject *__pyx_v_linearVelocity = 0;
  PyObject *__pyx_v_angularVelocity = 0;
  PyObject *__pyx_v_linearAcceleration = 0;
  PyObject *__pyx_v_angularAcceleration = 0;
  double __pyx_v_timeInSeconds;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_thePose,&__pyx_n_s_linearVelocity,&__pyx_n_s_angularVelocity,&__pyx_n_s_linearAcceleration,&__pyx_n_s_angularAcceleration,&__pyx_n_s_timeInSeconds,0};
    PyObject* values[6] = {0,0,0,0,0,0};

    /* "psychxr/libovr/_libovr.pyx":2439
 * 
 *     def __init__(self,
 *                  object thePose=None,             # <<<<<<<<<<<<<<
 *                  object linearVelocity=(0., 0., 0.),
 *                  object angularVelocity=(0., 0., 0.),
 */
    values[0] = ((PyObject *)Py_None);

    /* "psychxr/libovr/_libovr.pyx":2440
 *     def __init__(self,
 *                  object thePose=None,
 *                  object linearVelocity=(0., 0., 0.),             # <<<<<<<<<<<<<<
 *                  object angularVelocity=(0., 0., 0.),
 *                  object linearAcceleration=(0., 0. ,0.),
 */
    values[1] = ((PyObject *)__pyx_tuple__2);

    /* "psychxr/libovr/_libovr.pyx":2441
 *                  object thePose=None,
 *                  object linearVelocity=(0., 0., 0.),
 *                  object angularVelocity=(0., 0., 0.),             # <<<<<<<<<<<<<<
 *                  object linearAcceleration=(0., 0. ,0.),
 *                  object angularAcceleration=(0., 0., 0.),
 */
    values[2] = ((PyObject *)__pyx_tuple__2);

    /* "psychxr/libovr/_libovr.pyx":2442
 *                  object linearVelocity=(0., 0., 0.),
 *                  object angularVelocity=(0., 0., 0.),
 *                  object linearAcceleration=(0., 0. ,0.),             # <<<<<<<<<<<<<<
 *                  object angularAcceleration=(0., 0., 0.),
 *                  double timeInSeconds=0.0):
 */
    values[3] = ((PyObject *)__pyx_tuple__2);

    /* "psychxr/libovr/_libovr.pyx":2443
 *                  object angularVelocity=(0., 0., 0.),
 *                  object linearAcceleration=(0., 0. ,0.),
 *                  object angularAcceleration=(0., 0., 0.),             # <<<<<<<<<<<<<<
 *                  double timeInSeconds=0.0):
 *         """
 */
    values[4] = ((PyObject *)__pyx_tuple__2);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_thePose);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_linearVelocity);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_angularVelocity);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_linearAcceleration);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_angularAcceleration);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeInSeconds);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2438, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_thePose = values[0];
    __pyx_v_linearVelocity = values[1];
    __pyx_v_angularVelocity = values[2];
    __pyx_v_linearAcceleration = values[3];
    __pyx_v_angularAcceleration = values[4];
    if (values[5]) {
      __pyx_v_timeInSeconds = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_timeInSeconds == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2444, __pyx_L3_error)
    } else {
      __pyx_v_timeInSeconds = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2438, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), __pyx_v_thePose, __pyx_v_linearVelocity, __pyx_v_angularVelocity, __pyx_v_linearAcceleration, __pyx_v_angularAcceleration, __pyx_v_timeInSeconds);

  /* "psychxr/libovr/_libovr.pyx":2438
 *     cdef np.ndarray _angularAcceleration
 * 
 *     def __init__(self,             # <<<<<<<<<<<<<<
 *                  object thePose=None,
 *                  object linearVelocity=(0., 0., 0.),
 */

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_thePose, PyObject *__pyx_v_linearVelocity, PyObject *__pyx_v_angularVelocity, PyObject *__pyx_v_linearAcceleration, PyObject *__pyx_v_angularAcceleration, double __pyx_v_timeInSeconds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psychxr/libovr/_libovr.pyx":2456
 * 
 *         """
 *         self._new_struct(             # <<<<<<<<<<<<<<
 *             thePose,
 *             linearVelocity,
 */
  ((struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self->__pyx_vtab)->_new_struct(__pyx_v_self, __pyx_v_thePose, __pyx_v_linearVelocity, __pyx_v_angularVelocity, __pyx_v_linearAcceleration, __pyx_v_angularAcceleration, __pyx_v_timeInSeconds);

  /* "psychxr/libovr/_libovr.pyx":2438
 *     cdef np.ndarray _angularAcceleration
 * 
 *     def __init__(self,             # <<<<<<<<<<<<<<
 *                  object thePose=None,
 *                  object linearVelocity=(0., 0., 0.),
 */

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

/* "psychxr/libovr/_libovr.pyx":2464
 *             timeInSeconds)
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/libovr/_libovr.pyx":2465
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.ptr_owner = False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_v_self->ptr_owner = 0;

  /* "psychxr/libovr/_libovr.pyx":2464
 *             timeInSeconds)
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":2468
 * 
 *     @staticmethod
 *     cdef LibOVRPoseState fromPtr(capi.ovrPoseStatef* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRPoseState wrapper = LibOVRPoseState.__new__(LibOVRPoseState)
 */

static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr(ovrPoseStatef *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr *__pyx_optional_args) {
  int __pyx_v_owner = ((int)0);
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_wrapper = 0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fromPtr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_owner = __pyx_optional_args->owner;
    }
  }

  /* "psychxr/libovr/_libovr.pyx":2470
 *     cdef LibOVRPoseState fromPtr(capi.ovrPoseStatef* ptr, bint owner=False):
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRPoseState wrapper = LibOVRPoseState.__new__(LibOVRPoseState)             # <<<<<<<<<<<<<<
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPoseState(((PyTypeObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPoseState), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2470, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_wrapper = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2471
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRPoseState wrapper = LibOVRPoseState.__new__(LibOVRPoseState)
 *         wrapper.c_data = ptr             # <<<<<<<<<<<<<<
 *         wrapper.ptr_owner = owner
 * 
 */
  __pyx_v_wrapper->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":2472
 *         cdef LibOVRPoseState wrapper = LibOVRPoseState.__new__(LibOVRPoseState)
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner             # <<<<<<<<<<<<<<
 * 
 *         wrapper._thePose = LibOVRPose.fromPtr(&wrapper.c_data.ThePose)
 */
  __pyx_v_wrapper->ptr_owner = __pyx_v_owner;

  /* "psychxr/libovr/_libovr.pyx":2474
 *         wrapper.ptr_owner = owner
 * 
 *         wrapper._thePose = LibOVRPose.fromPtr(&wrapper.c_data.ThePose)             # <<<<<<<<<<<<<<
 *         wrapper._linearVelocity = _wrap_ovrVector3f_as_ndarray(
 *                 &wrapper.c_data.LinearVelocity)
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr((&__pyx_v_wrapper->c_data->ThePose), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_thePose);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_thePose));
  __pyx_v_wrapper->_thePose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2475
 * 
 *         wrapper._thePose = LibOVRPose.fromPtr(&wrapper.c_data.ThePose)
 *         wrapper._linearVelocity = _wrap_ovrVector3f_as_ndarray(             # <<<<<<<<<<<<<<
 *                 &wrapper.c_data.LinearVelocity)
 *         wrapper._linearAcceleration = _wrap_ovrVector3f_as_ndarray(
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_wrapper->c_data->LinearVelocity))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_linearVelocity);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_linearVelocity));
  __pyx_v_wrapper->_linearVelocity = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2477
 *         wrapper._linearVelocity = _wrap_ovrVector3f_as_ndarray(
 *                 &wrapper.c_data.LinearVelocity)
 *         wrapper._linearAcceleration = _wrap_ovrVector3f_as_ndarray(             # <<<<<<<<<<<<<<
 *                 &wrapper.c_data.LinearAcceleration)
 *         wrapper._angularVelocity = _wrap_ovrVector3f_as_ndarray(
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_wrapper->c_data->LinearAcceleration))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_linearAcceleration);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_linearAcceleration));
  __pyx_v_wrapper->_linearAcceleration = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2479
 *         wrapper._linearAcceleration = _wrap_ovrVector3f_as_ndarray(
 *                 &wrapper.c_data.LinearAcceleration)
 *         wrapper._angularVelocity = _wrap_ovrVector3f_as_ndarray(             # <<<<<<<<<<<<<<
 *                 &wrapper.c_data.AngularVelocity)
 *         wrapper._angularAcceleration = _wrap_ovrVector3f_as_ndarray(
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_wrapper->c_data->AngularVelocity))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_angularVelocity);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_angularVelocity));
  __pyx_v_wrapper->_angularVelocity = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2481
 *         wrapper._angularVelocity = _wrap_ovrVector3f_as_ndarray(
 *                 &wrapper.c_data.AngularVelocity)
 *         wrapper._angularAcceleration = _wrap_ovrVector3f_as_ndarray(             # <<<<<<<<<<<<<<
 *                 &wrapper.c_data.AngularAcceleration)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_wrapper->c_data->AngularAcceleration))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_angularAcceleration);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_angularAcceleration));
  __pyx_v_wrapper->_angularAcceleration = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2484
 *                 &wrapper.c_data.AngularAcceleration)
 * 
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cdef void _new_struct(
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_wrapper));
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2468
 * 
 *     @staticmethod
 *     cdef LibOVRPoseState fromPtr(capi.ovrPoseStatef* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRPoseState wrapper = LibOVRPoseState.__new__(LibOVRPoseState)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.fromPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2486
 *         return wrapper
 * 
 *     cdef void _new_struct(             # <<<<<<<<<<<<<<
 *             self,
 *             object pose,
 */

static void __pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPoseState__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_pose, PyObject *__pyx_v_linearVelocity, PyObject *__pyx_v_angularVelocity, PyObject *__pyx_v_linearAcceleration, PyObject *__pyx_v_angularAcceleration, CYTHON_UNUSED double __pyx_v_timeInSeconds) {
  ovrPoseStatef *__pyx_v__ptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  ovrVector3f __pyx_t_4;
  ovrQuatf __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("_new_struct", 0);

  /* "psychxr/libovr/_libovr.pyx":2495
 *             double timeInSeconds):
 * 
 *         if self.c_data is not NULL:  # already allocated, __init__ called twice?             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":2496
 * 
 *         if self.c_data is not NULL:  # already allocated, __init__ called twice?
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef capi.ovrPoseStatef* _ptr = \
 */
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":2495
 *             double timeInSeconds):
 * 
 *         if self.c_data is not NULL:  # already allocated, __init__ called twice?             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2499
 * 
 *         cdef capi.ovrPoseStatef* _ptr = \
 *             <capi.ovrPoseStatef*>PyMem_Malloc(             # <<<<<<<<<<<<<<
 *                 sizeof(capi.ovrPoseStatef))
 * 
 */
  __pyx_v__ptr = ((ovrPoseStatef *)PyMem_Malloc((sizeof(ovrPoseStatef))));

  /* "psychxr/libovr/_libovr.pyx":2502
 *                 sizeof(capi.ovrPoseStatef))
 * 
 *         if _ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v__ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":2503
 * 
 *         if _ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         self.c_data = _ptr
 */
    PyErr_NoMemory(); __PYX_ERR(0, 2503, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":2502
 *                 sizeof(capi.ovrPoseStatef))
 * 
 *         if _ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2505
 *             raise MemoryError
 * 
 *         self.c_data = _ptr             # <<<<<<<<<<<<<<
 *         self.ptr_owner = True
 * 
 */
  __pyx_v_self->c_data = __pyx_v__ptr;

  /* "psychxr/libovr/_libovr.pyx":2506
 * 
 *         self.c_data = _ptr
 *         self.ptr_owner = True             # <<<<<<<<<<<<<<
 * 
 *         # setup property wrappers
 */
  __pyx_v_self->ptr_owner = 1;

  /* "psychxr/libovr/_libovr.pyx":2509
 * 
 *         # setup property wrappers
 *         self._thePose = LibOVRPose.fromPtr(&self.c_data.ThePose)             # <<<<<<<<<<<<<<
 *         self._linearVelocity = _wrap_ovrVector3f_as_ndarray(
 *             &self.c_data.LinearVelocity)
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr((&__pyx_v_self->c_data->ThePose), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_thePose);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_thePose));
  __pyx_v_self->_thePose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2510
 *         # setup property wrappers
 *         self._thePose = LibOVRPose.fromPtr(&self.c_data.ThePose)
 *         self._linearVelocity = _wrap_ovrVector3f_as_ndarray(             # <<<<<<<<<<<<<<
 *             &self.c_data.LinearVelocity)
 *         self._linearAcceleration = _wrap_ovrVector3f_as_ndarray(
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_self->c_data->LinearVelocity))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_linearVelocity);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_linearVelocity));
  __pyx_v_self->_linearVelocity = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2512
 *         self._linearVelocity = _wrap_ovrVector3f_as_ndarray(
 *             &self.c_data.LinearVelocity)
 *         self._linearAcceleration = _wrap_ovrVector3f_as_ndarray(             # <<<<<<<<<<<<<<
 *             &self.c_data.LinearAcceleration)
 *         self._angularVelocity = _wrap_ovrVector3f_as_ndarray(
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_self->c_data->LinearAcceleration))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_linearAcceleration);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_linearAcceleration));
  __pyx_v_self->_linearAcceleration = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2514
 *         self._linearAcceleration = _wrap_ovrVector3f_as_ndarray(
 *             &self.c_data.LinearAcceleration)
 *         self._angularVelocity = _wrap_ovrVector3f_as_ndarray(             # <<<<<<<<<<<<<<
 *             &self.c_data.AngularVelocity)
 *         self._angularAcceleration = _wrap_ovrVector3f_as_ndarray(
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_self->c_data->AngularVelocity))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_angularVelocity);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_angularVelocity));
  __pyx_v_self->_angularVelocity = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2516
 *         self._angularVelocity = _wrap_ovrVector3f_as_ndarray(
 *             &self.c_data.AngularVelocity)
 *         self._angularAcceleration = _wrap_ovrVector3f_as_ndarray(             # <<<<<<<<<<<<<<
 *             &self.c_data.AngularAcceleration)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray((&__pyx_v_self->c_data->AngularAcceleration))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_angularAcceleration);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_angularAcceleration));
  __pyx_v_self->_angularAcceleration = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2520
 * 
 *         # set values
 *         if pose is None:             # <<<<<<<<<<<<<<
 *             _ptr.ThePose.Position = [0., 0., 0.]
 *             _ptr.ThePose.Orientation = [0., 0., 0., 1.]
 */
  __pyx_t_1 = (__pyx_v_pose == Py_None);
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (__pyx_t_3) {

    /* "psychxr/libovr/_libovr.pyx":2521
 *         # set values
 *         if pose is None:
 *             _ptr.ThePose.Position = [0., 0., 0.]             # <<<<<<<<<<<<<<
 *             _ptr.ThePose.Orientation = [0., 0., 0., 1.]
 *         elif isinstance(pose, LibOVRPose):
 */
    __pyx_t_4.x = 0.;
    __pyx_t_4.y = 0.;
    __pyx_t_4.z = 0.;
    __pyx_v__ptr->ThePose.Position = __pyx_t_4;

    /* "psychxr/libovr/_libovr.pyx":2522
 *         if pose is None:
 *             _ptr.ThePose.Position = [0., 0., 0.]
 *             _ptr.ThePose.Orientation = [0., 0., 0., 1.]             # <<<<<<<<<<<<<<
 *         elif isinstance(pose, LibOVRPose):
 *             _ptr.ThePose.Position = (<LibOVRPose>pose).c_data.Position
 */
    __pyx_t_5.x = 0.;
    __pyx_t_5.y = 0.;
    __pyx_t_5.z = 0.;
    __pyx_t_5.w = 1.;
    __pyx_v__ptr->ThePose.Orientation = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":2520
 * 
 *         # set values
 *         if pose is None:             # <<<<<<<<<<<<<<
 *             _ptr.ThePose.Position = [0., 0., 0.]
 *             _ptr.ThePose.Orientation = [0., 0., 0., 1.]
 */
    goto __pyx_L5;
  }

  /* "psychxr/libovr/_libovr.pyx":2523
 *             _ptr.ThePose.Position = [0., 0., 0.]
 *             _ptr.ThePose.Orientation = [0., 0., 0., 1.]
 *         elif isinstance(pose, LibOVRPose):             # <<<<<<<<<<<<<<
 *             _ptr.ThePose.Position = (<LibOVRPose>pose).c_data.Position
 *             _ptr.ThePose.Orientation = (<LibOVRPose>pose).c_data.Orientation
 */
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_pose, __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose); 
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":2524
 *             _ptr.ThePose.Orientation = [0., 0., 0., 1.]
 *         elif isinstance(pose, LibOVRPose):
 *             _ptr.ThePose.Position = (<LibOVRPose>pose).c_data.Position             # <<<<<<<<<<<<<<
 *             _ptr.ThePose.Orientation = (<LibOVRPose>pose).c_data.Orientation
 *         elif isinstance(pose, (tuple, list,)):
 */
    __pyx_t_4 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_pose)->c_data->Position;
    __pyx_v__ptr->ThePose.Position = __pyx_t_4;

    /* "psychxr/libovr/_libovr.pyx":2525
 *         elif isinstance(pose, LibOVRPose):
 *             _ptr.ThePose.Position = (<LibOVRPose>pose).c_data.Position
 *             _ptr.ThePose.Orientation = (<LibOVRPose>pose).c_data.Orientation             # <<<<<<<<<<<<<<
 *         elif isinstance(pose, (tuple, list,)):
 *             self._thePose.posOri = pose
 */
    __pyx_t_5 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_pose)->c_data->Orientation;
    __pyx_v__ptr->ThePose.Orientation = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":2523
 *             _ptr.ThePose.Position = [0., 0., 0.]
 *             _ptr.ThePose.Orientation = [0., 0., 0., 1.]
 *         elif isinstance(pose, LibOVRPose):             # <<<<<<<<<<<<<<
 *             _ptr.ThePose.Position = (<LibOVRPose>pose).c_data.Position
 *             _ptr.ThePose.Orientation = (<LibOVRPose>pose).c_data.Orientation
 */
    goto __pyx_L5;
  }

  /* "psychxr/libovr/_libovr.pyx":2526
 *             _ptr.ThePose.Position = (<LibOVRPose>pose).c_data.Position
 *             _ptr.ThePose.Orientation = (<LibOVRPose>pose).c_data.Orientation
 *         elif isinstance(pose, (tuple, list,)):             # <<<<<<<<<<<<<<
 *             self._thePose.posOri = pose
 *         else:
 */
  __pyx_t_3 = PyTuple_Check(__pyx_v_pose); 
  __pyx_t_6 = (__pyx_t_3 != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_6 = PyList_Check(__pyx_v_pose); 
  __pyx_t_3 = (__pyx_t_6 != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L6_bool_binop_done:;
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_3)) {

    /* "psychxr/libovr/_libovr.pyx":2527
 *             _ptr.ThePose.Orientation = (<LibOVRPose>pose).c_data.Orientation
 *         elif isinstance(pose, (tuple, list,)):
 *             self._thePose.posOri = pose             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('Invalid value for `pose`, must be `LibOVRPose`'
 */
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->_thePose), __pyx_n_s_posOri, __pyx_v_pose) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":2526
 *             _ptr.ThePose.Position = (<LibOVRPose>pose).c_data.Position
 *             _ptr.ThePose.Orientation = (<LibOVRPose>pose).c_data.Orientation
 *         elif isinstance(pose, (tuple, list,)):             # <<<<<<<<<<<<<<
 *             self._thePose.posOri = pose
 *         else:
 */
    goto __pyx_L5;
  }

  /* "psychxr/libovr/_libovr.pyx":2529
 *             self._thePose.posOri = pose
 *         else:
 *             raise TypeError('Invalid value for `pose`, must be `LibOVRPose`'             # <<<<<<<<<<<<<<
 *                             ', `list` or `tuple`.')
 * 
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2529, __pyx_L1_error)
  }
  __pyx_L5:;

  /* "psychxr/libovr/_libovr.pyx":2532
 *                             ', `list` or `tuple`.')
 * 
 *         self._angularVelocity[:] = angularVelocity             # <<<<<<<<<<<<<<
 *         self._linearVelocity[:] = linearVelocity
 *         self._angularAcceleration[:] = angularAcceleration
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_angularVelocity), __pyx_v_angularVelocity, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 2532, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":2533
 * 
 *         self._angularVelocity[:] = angularVelocity
 *         self._linearVelocity[:] = linearVelocity             # <<<<<<<<<<<<<<
 *         self._angularAcceleration[:] = angularAcceleration
 *         self._linearAcceleration[:] = linearAcceleration
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_linearVelocity), __pyx_v_linearVelocity, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":2534
 *         self._angularVelocity[:] = angularVelocity
 *         self._linearVelocity[:] = linearVelocity
 *         self._angularAcceleration[:] = angularAcceleration             # <<<<<<<<<<<<<<
 *         self._linearAcceleration[:] = linearAcceleration
 * 
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_angularAcceleration), __pyx_v_angularAcceleration, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 2534, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":2535
 *         self._linearVelocity[:] = linearVelocity
 *         self._angularAcceleration[:] = angularAcceleration
 *         self._linearAcceleration[:] = linearAcceleration             # <<<<<<<<<<<<<<
 * 
 *         _ptr.TimeInSeconds = 0.0
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_linearAcceleration), __pyx_v_linearAcceleration, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 2535, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":2537
 *         self._linearAcceleration[:] = linearAcceleration
 * 
 *         _ptr.TimeInSeconds = 0.0             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v__ptr->TimeInSeconds = 0.0;

  /* "psychxr/libovr/_libovr.pyx":2486
 *         return wrapper
 * 
 *     cdef void _new_struct(             # <<<<<<<<<<<<<<
 *             self,
 *             object pose,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.LibOVRPoseState._new_struct", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "psychxr/libovr/_libovr.pyx":2539
 *         _ptr.TimeInSeconds = 0.0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 */

/* Python wrapper */
static void __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_4__dealloc__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static void __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "psychxr/libovr/_libovr.pyx":2541
 *     def __dealloc__(self):
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":2542
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 * 
 */
    __pyx_t_1 = ((__pyx_v_self->ptr_owner == 1) != 0);
    if (__pyx_t_1) {

      /* "psychxr/libovr/_libovr.pyx":2543
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)             # <<<<<<<<<<<<<<
 * 
 *     def __deepcopy__(self, memo=None):
 */
      PyMem_Free(__pyx_v_self->c_data);

      /* "psychxr/libovr/_libovr.pyx":2542
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 * 
 */
    }

    /* "psychxr/libovr/_libovr.pyx":2541
 *     def __dealloc__(self):
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2539
 *         _ptr.TimeInSeconds = 0.0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 */

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

/* "psychxr/libovr/_libovr.pyx":2545
 *                 PyMem_Free(self.c_data)
 * 
 *     def __deepcopy__(self, memo=None):             # <<<<<<<<<<<<<<
 *         """Deep copy returned by :py:func:`copy.deepcopy`.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_6__deepcopy__[] = "LibOVRPoseState.__deepcopy__(self, memo=None)\nDeep copy returned by :py:func:`copy.deepcopy`.\n\n        New :py:class:`LibOVRPoseState` instance with a copy of the data in a\n        separate memory location. Does not increase the reference count of the\n        object being copied.\n\n        Examples\n        --------\n\n        Deep copy::\n\n            import copy\n            a = LibOVRPoseState()\n            b = copy.deepcopy(a)  # create independent copy of 'a'\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7__deepcopy__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_memo = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memo,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memo);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(0, 2545, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_memo = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__deepcopy__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2545, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_6__deepcopy__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), __pyx_v_memo);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_6__deepcopy__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_memo) {
  ovrPoseStatef *__pyx_v_ptr;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__deepcopy__", 0);

  /* "psychxr/libovr/_libovr.pyx":2563
 *         """
 *         cdef capi.ovrPoseStatef* ptr = \
 *             <capi.ovrPoseStatef*>PyMem_Malloc(sizeof(capi.ovrPoseStatef))             # <<<<<<<<<<<<<<
 * 
 *         if ptr is NULL:
 */
  __pyx_v_ptr = ((ovrPoseStatef *)PyMem_Malloc((sizeof(ovrPoseStatef))));

  /* "psychxr/libovr/_libovr.pyx":2565
 *             <capi.ovrPoseStatef*>PyMem_Malloc(sizeof(capi.ovrPoseStatef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":2566
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         cdef LibOVRPoseState to_return = LibOVRPoseState.fromPtr(ptr, True)
 */
    PyErr_NoMemory(); __PYX_ERR(0, 2566, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":2565
 *             <capi.ovrPoseStatef*>PyMem_Malloc(sizeof(capi.ovrPoseStatef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2568
 *             raise MemoryError
 * 
 *         cdef LibOVRPoseState to_return = LibOVRPoseState.fromPtr(ptr, True)             # <<<<<<<<<<<<<<
 * 
 *         # copy over data
 */
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.owner = 1;
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState->fromPtr(__pyx_v_ptr, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2571
 * 
 *         # copy over data
 *         to_return.c_data[0] = self.c_data[0]             # <<<<<<<<<<<<<<
 * 
 *         if memo is not None:
 */
  (__pyx_v_to_return->c_data[0]) = (__pyx_v_self->c_data[0]);

  /* "psychxr/libovr/_libovr.pyx":2573
 *         to_return.c_data[0] = self.c_data[0]
 * 
 *         if memo is not None:             # <<<<<<<<<<<<<<
 *             memo[id(self)] = to_return
 * 
 */
  __pyx_t_1 = (__pyx_v_memo != Py_None);
  __pyx_t_4 = (__pyx_t_1 != 0);
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":2574
 * 
 *         if memo is not None:
 *             memo[id(self)] = to_return             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyObject_SetItem(__pyx_v_memo, __pyx_t_2, ((PyObject *)__pyx_v_to_return)) < 0)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "psychxr/libovr/_libovr.pyx":2573
 *         to_return.c_data[0] = self.c_data[0]
 * 
 *         if memo is not None:             # <<<<<<<<<<<<<<
 *             memo[id(self)] = to_return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2576
 *             memo[id(self)] = to_return
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 *     def duplicate(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2545
 *                 PyMem_Free(self.c_data)
 * 
 *     def __deepcopy__(self, memo=None):             # <<<<<<<<<<<<<<
 *         """Deep copy returned by :py:func:`copy.deepcopy`.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2578
 *         return to_return
 * 
 *     def duplicate(self):             # <<<<<<<<<<<<<<
 *         """Create a deep copy of this object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_9duplicate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_8duplicate[] = "LibOVRPoseState.duplicate(self)\nCreate a deep copy of this object.\n\n        Same as calling `copy.deepcopy` on an instance.\n\n        Returns\n        -------\n        LibOVRPoseState\n            An independent copy of this object.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_9duplicate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("duplicate (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_8duplicate(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_8duplicate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("duplicate", 0);

  /* "psychxr/libovr/_libovr.pyx":2589
 * 
 *         """
 *         return self.__deepcopy__()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2578
 *         return to_return
 * 
 *     def duplicate(self):             # <<<<<<<<<<<<<<
 *         """Create a deep copy of this object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.duplicate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2592
 * 
 *     @property
 *     def thePose(self):             # <<<<<<<<<<<<<<
 *         """Rigid body pose."""
 *         return self._thePose
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2594
 *     def thePose(self):
 *         """Rigid body pose."""
 *         return self._thePose             # <<<<<<<<<<<<<<
 * 
 *     @thePose.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_thePose));
  __pyx_r = ((PyObject *)__pyx_v_self->_thePose);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2592
 * 
 *     @property
 *     def thePose(self):             # <<<<<<<<<<<<<<
 *         """Rigid body pose."""
 *         return self._thePose
 */

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

/* "psychxr/libovr/_libovr.pyx":2597
 * 
 *     @thePose.setter
 *     def thePose(self, LibOVRPose value):             # <<<<<<<<<<<<<<
 *         self.c_data.ThePose = value.c_data[0]  # copy into
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "value", 0))) __PYX_ERR(0, 2597, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":2598
 *     @thePose.setter
 *     def thePose(self, LibOVRPose value):
 *         self.c_data.ThePose = value.c_data[0]  # copy into             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data->ThePose = (__pyx_v_value->c_data[0]);

  /* "psychxr/libovr/_libovr.pyx":2597
 * 
 *     @thePose.setter
 *     def thePose(self, LibOVRPose value):             # <<<<<<<<<<<<<<
 *         self.c_data.ThePose = value.c_data[0]  # copy into
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":2601
 * 
 *     @property
 *     def angularVelocity(self):             # <<<<<<<<<<<<<<
 *         """Angular velocity vector in radians/sec."""
 *         return self._angularVelocity
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2603
 *     def angularVelocity(self):
 *         """Angular velocity vector in radians/sec."""
 *         return self._angularVelocity             # <<<<<<<<<<<<<<
 * 
 *     @angularVelocity.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_angularVelocity));
  __pyx_r = ((PyObject *)__pyx_v_self->_angularVelocity);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2601
 * 
 *     @property
 *     def angularVelocity(self):             # <<<<<<<<<<<<<<
 *         """Angular velocity vector in radians/sec."""
 *         return self._angularVelocity
 */

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

/* "psychxr/libovr/_libovr.pyx":2606
 * 
 *     @angularVelocity.setter
 *     def angularVelocity(self, object value):             # <<<<<<<<<<<<<<
 *         self._angularVelocity[:] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":2607
 *     @angularVelocity.setter
 *     def angularVelocity(self, object value):
 *         self._angularVelocity[:] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_angularVelocity), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 2607, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":2606
 * 
 *     @angularVelocity.setter
 *     def angularVelocity(self, object value):             # <<<<<<<<<<<<<<
 *         self._angularVelocity[:] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.angularVelocity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2610
 * 
 *     @property
 *     def linearVelocity(self):             # <<<<<<<<<<<<<<
 *         """Linear velocity vector in meters/sec."""
 *         return self._linearVelocity
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2612
 *     def linearVelocity(self):
 *         """Linear velocity vector in meters/sec."""
 *         return self._linearVelocity             # <<<<<<<<<<<<<<
 * 
 *     @linearVelocity.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_linearVelocity));
  __pyx_r = ((PyObject *)__pyx_v_self->_linearVelocity);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2610
 * 
 *     @property
 *     def linearVelocity(self):             # <<<<<<<<<<<<<<
 *         """Linear velocity vector in meters/sec."""
 *         return self._linearVelocity
 */

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

/* "psychxr/libovr/_libovr.pyx":2615
 * 
 *     @linearVelocity.setter
 *     def linearVelocity(self, object value):             # <<<<<<<<<<<<<<
 *         self._linearVelocity[:] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":2616
 *     @linearVelocity.setter
 *     def linearVelocity(self, object value):
 *         self._linearVelocity[:] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_linearVelocity), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 2616, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":2615
 * 
 *     @linearVelocity.setter
 *     def linearVelocity(self, object value):             # <<<<<<<<<<<<<<
 *         self._linearVelocity[:] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.linearVelocity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2619
 * 
 *     @property
 *     def angularAcceleration(self):             # <<<<<<<<<<<<<<
 *         """Angular acceleration vector in radians/s^2."""
 *         return self._angularAcceleration
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2621
 *     def angularAcceleration(self):
 *         """Angular acceleration vector in radians/s^2."""
 *         return self._angularAcceleration             # <<<<<<<<<<<<<<
 * 
 *     @angularAcceleration.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_angularAcceleration));
  __pyx_r = ((PyObject *)__pyx_v_self->_angularAcceleration);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2619
 * 
 *     @property
 *     def angularAcceleration(self):             # <<<<<<<<<<<<<<
 *         """Angular acceleration vector in radians/s^2."""
 *         return self._angularAcceleration
 */

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

/* "psychxr/libovr/_libovr.pyx":2624
 * 
 *     @angularAcceleration.setter
 *     def angularAcceleration(self, object value):             # <<<<<<<<<<<<<<
 *         self._angularAcceleration[:] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":2625
 *     @angularAcceleration.setter
 *     def angularAcceleration(self, object value):
 *         self._angularAcceleration[:] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_angularAcceleration), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 2625, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":2624
 * 
 *     @angularAcceleration.setter
 *     def angularAcceleration(self, object value):             # <<<<<<<<<<<<<<
 *         self._angularAcceleration[:] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.angularAcceleration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2628
 * 
 *     @property
 *     def linearAcceleration(self):             # <<<<<<<<<<<<<<
 *         """Linear acceleration vector in meters/s^2."""
 *         return self._linearAcceleration
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2630
 *     def linearAcceleration(self):
 *         """Linear acceleration vector in meters/s^2."""
 *         return self._linearAcceleration             # <<<<<<<<<<<<<<
 * 
 *     @linearAcceleration.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_linearAcceleration));
  __pyx_r = ((PyObject *)__pyx_v_self->_linearAcceleration);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2628
 * 
 *     @property
 *     def linearAcceleration(self):             # <<<<<<<<<<<<<<
 *         """Linear acceleration vector in meters/s^2."""
 *         return self._linearAcceleration
 */

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

/* "psychxr/libovr/_libovr.pyx":2633
 * 
 *     @linearAcceleration.setter
 *     def linearAcceleration(self, object value):             # <<<<<<<<<<<<<<
 *         self._linearAcceleration[:] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":2634
 *     @linearAcceleration.setter
 *     def linearAcceleration(self, object value):
 *         self._linearAcceleration[:] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_linearAcceleration), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 2634, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":2633
 * 
 *     @linearAcceleration.setter
 *     def linearAcceleration(self, object value):             # <<<<<<<<<<<<<<
 *         self._linearAcceleration[:] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.linearAcceleration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2637
 * 
 *     @property
 *     def timeInSeconds(self):             # <<<<<<<<<<<<<<
 *         """Absolute time this data refers to in seconds."""
 *         return <double>self.c_data[0].TimeInSeconds
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2639
 *     def timeInSeconds(self):
 *         """Absolute time this data refers to in seconds."""
 *         return <double>self.c_data[0].TimeInSeconds             # <<<<<<<<<<<<<<
 * 
 *     @timeInSeconds.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((double)(__pyx_v_self->c_data[0]).TimeInSeconds)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2637
 * 
 *     @property
 *     def timeInSeconds(self):             # <<<<<<<<<<<<<<
 *         """Absolute time this data refers to in seconds."""
 *         return <double>self.c_data[0].TimeInSeconds
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.timeInSeconds.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2642
 * 
 *     @timeInSeconds.setter
 *     def timeInSeconds(self, double value):             # <<<<<<<<<<<<<<
 *         self.c_data[0].TimeInSeconds = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2642, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.timeInSeconds.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), ((double)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, double __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":2643
 *     @timeInSeconds.setter
 *     def timeInSeconds(self, double value):
 *         self.c_data[0].TimeInSeconds = value             # <<<<<<<<<<<<<<
 * 
 *     def timeIntegrate(self, float dt):
 */
  (__pyx_v_self->c_data[0]).TimeInSeconds = __pyx_v_value;

  /* "psychxr/libovr/_libovr.pyx":2642
 * 
 *     @timeInSeconds.setter
 *     def timeInSeconds(self, double value):             # <<<<<<<<<<<<<<
 *         self.c_data[0].TimeInSeconds = value
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":2645
 *         self.c_data[0].TimeInSeconds = value
 * 
 *     def timeIntegrate(self, float dt):             # <<<<<<<<<<<<<<
 *         """Time integrate rigid body motion derivatives referenced by the
 *         current pose.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_11timeIntegrate(PyObject *__pyx_v_self, PyObject *__pyx_arg_dt); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_10timeIntegrate[] = "LibOVRPoseState.timeIntegrate(self, float dt)\nTime integrate rigid body motion derivatives referenced by the\n        current pose.\n\n        Parameters\n        ----------\n        dt : float\n            Time delta in seconds.\n\n        Returns\n        -------\n        LibOVRPose\n            Pose at `dt`.\n\n        Examples\n        --------\n\n        Time integrate a pose for 20 milliseconds (note the returned object is a\n        :py:mod:`LibOVRPose`, not another :py:class:`LibOVRPoseState`)::\n\n            newPose = oldPose.timeIntegrate(0.02)\n            pos, ori = newPose.posOri  # extract components\n\n        Time integration can be used to predict the pose of an object at HMD\n        V-Sync if velocity and acceleration are known. Usually we would pass the\n        predicted time to `getDevicePoses` or `getTrackingState` for a more\n        robust estimate of HMD pose at predicted display time. However, in most\n        cases the following will yield the same position and orientation as\n        `LibOVR` within a few decimal places::\n\n            tsec = timeInSeconds()\n            ptime = getPredictedDisplayTime(frame_index)\n\n            _, headPoseState = getDevicePoses(\n                [TRACKED_DEVICE_TYPE_HMD],\n                absTime=tsec,  # not the predicted time!\n                latencyMarker=True)\n\n            dt = ptime - tsec  # time difference from now and v-sync\n            headPoseAtVsync = headPose.timeIntegrate(dt)\n            calcEyePoses(headPoseAtVsync)\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_11timeIntegrate(PyObject *__pyx_v_self, PyObject *__pyx_arg_dt) {
  float __pyx_v_dt;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timeIntegrate (wrapper)", 0);
  assert(__pyx_arg_dt); {
    __pyx_v_dt = __pyx_PyFloat_AsFloat(__pyx_arg_dt); if (unlikely((__pyx_v_dt == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2645, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.timeIntegrate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_10timeIntegrate(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), ((float)__pyx_v_dt));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_10timeIntegrate(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, float __pyx_v_dt) {
  OVR::Posef __pyx_v_res;
  ovrPosef *__pyx_v_ptr;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr __pyx_t_3;
  __Pyx_RefNannySetupContext("timeIntegrate", 0);

  /* "psychxr/libovr/_libovr.pyx":2689
 *         """
 *         cdef libovr_math.Posef res = \
 *             (<libovr_math.Posef>self.c_data[0].ThePose).TimeIntegrate(             # <<<<<<<<<<<<<<
 *                 <libovr_math.Vector3f>self.c_data[0].LinearVelocity,
 *                 <libovr_math.Vector3f>self.c_data[0].AngularVelocity,
 */
  __pyx_v_res = ((OVR::Posef)(__pyx_v_self->c_data[0]).ThePose).TimeIntegrate(((OVR::Vector3f)(__pyx_v_self->c_data[0]).LinearVelocity), ((OVR::Vector3f)(__pyx_v_self->c_data[0]).AngularVelocity), ((OVR::Vector3f)(__pyx_v_self->c_data[0]).LinearAcceleration), ((OVR::Vector3f)(__pyx_v_self->c_data[0]).AngularAcceleration), __pyx_v_dt);

  /* "psychxr/libovr/_libovr.pyx":2697
 * 
 *         cdef capi.ovrPosef* ptr = \
 *             <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))             # <<<<<<<<<<<<<<
 * 
 *         if ptr is NULL:
 */
  __pyx_v_ptr = ((ovrPosef *)PyMem_Malloc((sizeof(ovrPosef))));

  /* "psychxr/libovr/_libovr.pyx":2699
 *             <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(
 *                 "Failed to allocate 'ovrPosef' in 'timeIntegrate'.")
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":2700
 * 
 *         if ptr is NULL:
 *             raise MemoryError(             # <<<<<<<<<<<<<<
 *                 "Failed to allocate 'ovrPosef' in 'timeIntegrate'.")
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2700, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":2699
 *             <capi.ovrPosef*>PyMem_Malloc(sizeof(capi.ovrPosef))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError(
 *                 "Failed to allocate 'ovrPosef' in 'timeIntegrate'.")
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2703
 *                 "Failed to allocate 'ovrPosef' in 'timeIntegrate'.")
 * 
 *         cdef LibOVRPose to_return = LibOVRPose.fromPtr(ptr, True)             # <<<<<<<<<<<<<<
 * 
 *         # copy over data
 */
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.owner = 1;
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr(__pyx_v_ptr, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2706
 * 
 *         # copy over data
 *         to_return.c_data[0] = <capi.ovrPosef>res             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
  (__pyx_v_to_return->c_data[0]) = __pyx_v_res;

  /* "psychxr/libovr/_libovr.pyx":2708
 *         to_return.c_data[0] = <capi.ovrPosef>res
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2645
 *         self.c_data[0].TimeInSeconds = value
 * 
 *     def timeIntegrate(self, float dt):             # <<<<<<<<<<<<<<
 *         """Time integrate rigid body motion derivatives referenced by the
 *         current pose.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.timeIntegrate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_12__reduce_cython__[] = "LibOVRPoseState.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_12__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14__setstate_cython__[] = "LibOVRPoseState.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPoseState.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2744
 *     cdef LibOVRPose _calibratedOrigin
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__[] = "\n        Attributes\n        ----------\n        headPose : LibOVRPoseState\n        handPoses : tuple\n        statusFlags : int\n        positionValid : bool\n        orientationValid : bool\n        handStatusFlags : tuple\n        handPositionValid : tuple\n        handOrientationValid : tuple\n        calibratedOrigin : LibOVRPose\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psychxr/libovr/_libovr.pyx":2758
 *         calibratedOrigin : LibOVRPose
 *         """
 *         self._new_struct()             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  ((struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self->__pyx_vtab)->_new_struct(__pyx_v_self);

  /* "psychxr/libovr/_libovr.pyx":2744
 *     cdef LibOVRPose _calibratedOrigin
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

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

/* "psychxr/libovr/_libovr.pyx":2760
 *         self._new_struct()
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_3__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_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/libovr/_libovr.pyx":2761
 * 
 *     def __cinit__(self):
 *         self.ptr_owner = False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_v_self->ptr_owner = 0;

  /* "psychxr/libovr/_libovr.pyx":2760
 *         self._new_struct()
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":2764
 * 
 *     @staticmethod
 *     cdef LibOVRTrackingState fromPtr(capi.ovrTrackingState* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRTrackingState wrapper = \
 *             LibOVRTrackingState.__new__(LibOVRTrackingState)
 */

static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_f_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr(ovrTrackingState *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr *__pyx_optional_args) {
  int __pyx_v_owner = ((int)0);
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_wrapper = 0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fromPtr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_owner = __pyx_optional_args->owner;
    }
  }

  /* "psychxr/libovr/_libovr.pyx":2766
 *     cdef LibOVRTrackingState fromPtr(capi.ovrTrackingState* ptr, bint owner=False):
 *         cdef LibOVRTrackingState wrapper = \
 *             LibOVRTrackingState.__new__(LibOVRTrackingState)             # <<<<<<<<<<<<<<
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRTrackingState(((PyTypeObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRTrackingState), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_wrapper = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2767
 *         cdef LibOVRTrackingState wrapper = \
 *             LibOVRTrackingState.__new__(LibOVRTrackingState)
 *         wrapper.c_data = ptr             # <<<<<<<<<<<<<<
 *         wrapper.ptr_owner = owner
 * 
 */
  __pyx_v_wrapper->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":2768
 *             LibOVRTrackingState.__new__(LibOVRTrackingState)
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner             # <<<<<<<<<<<<<<
 * 
 *         wrapper._headPoseState = LibOVRPoseState.fromPtr(&ptr.HeadPose)
 */
  __pyx_v_wrapper->ptr_owner = __pyx_v_owner;

  /* "psychxr/libovr/_libovr.pyx":2770
 *         wrapper.ptr_owner = owner
 * 
 *         wrapper._headPoseState = LibOVRPoseState.fromPtr(&ptr.HeadPose)             # <<<<<<<<<<<<<<
 *         wrapper._leftHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[0])
 *         wrapper._rightHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[1])
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState->fromPtr((&__pyx_v_ptr->HeadPose), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_headPoseState);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_headPoseState));
  __pyx_v_wrapper->_headPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2771
 * 
 *         wrapper._headPoseState = LibOVRPoseState.fromPtr(&ptr.HeadPose)
 *         wrapper._leftHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[0])             # <<<<<<<<<<<<<<
 *         wrapper._rightHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[1])
 *         wrapper._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState->fromPtr((&(__pyx_v_ptr->HandPoses[0])), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_leftHandPoseState);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_leftHandPoseState));
  __pyx_v_wrapper->_leftHandPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2772
 *         wrapper._headPoseState = LibOVRPoseState.fromPtr(&ptr.HeadPose)
 *         wrapper._leftHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[0])
 *         wrapper._rightHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[1])             # <<<<<<<<<<<<<<
 *         wrapper._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState->fromPtr((&(__pyx_v_ptr->HandPoses[1])), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_rightHandPoseState);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_rightHandPoseState));
  __pyx_v_wrapper->_rightHandPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2773
 *         wrapper._leftHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[0])
 *         wrapper._rightHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[1])
 *         wrapper._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)             # <<<<<<<<<<<<<<
 * 
 *         return wrapper
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr((&__pyx_v_ptr->CalibratedOrigin), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_calibratedOrigin);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_calibratedOrigin));
  __pyx_v_wrapper->_calibratedOrigin = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2775
 *         wrapper._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)
 * 
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cdef void _new_struct(self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_wrapper));
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2764
 * 
 *     @staticmethod
 *     cdef LibOVRTrackingState fromPtr(capi.ovrTrackingState* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRTrackingState wrapper = \
 *             LibOVRTrackingState.__new__(LibOVRTrackingState)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.fromPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2777
 *         return wrapper
 * 
 *     cdef void _new_struct(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

static void __pyx_f_7psychxr_6libovr_7_libovr_19LibOVRTrackingState__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  ovrTrackingState *__pyx_v_ptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("_new_struct", 0);

  /* "psychxr/libovr/_libovr.pyx":2778
 * 
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":2779
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef capi.ovrTrackingState* ptr = \
 */
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":2778
 * 
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2782
 * 
 *         cdef capi.ovrTrackingState* ptr = \
 *             <capi.ovrTrackingState*>PyMem_Malloc(sizeof(capi.ovrTrackingState))             # <<<<<<<<<<<<<<
 * 
 *         if ptr is NULL:
 */
  __pyx_v_ptr = ((ovrTrackingState *)PyMem_Malloc((sizeof(ovrTrackingState))));

  /* "psychxr/libovr/_libovr.pyx":2784
 *             <capi.ovrTrackingState*>PyMem_Malloc(sizeof(capi.ovrTrackingState))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":2785
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         self.c_data = ptr
 */
    PyErr_NoMemory(); __PYX_ERR(0, 2785, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":2784
 *             <capi.ovrTrackingState*>PyMem_Malloc(sizeof(capi.ovrTrackingState))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2787
 *             raise MemoryError
 * 
 *         self.c_data = ptr             # <<<<<<<<<<<<<<
 *         self.ptr_owner = True
 * 
 */
  __pyx_v_self->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":2788
 * 
 *         self.c_data = ptr
 *         self.ptr_owner = True             # <<<<<<<<<<<<<<
 * 
 *         self._headPoseState = LibOVRPoseState.fromPtr(&ptr.HeadPose)
 */
  __pyx_v_self->ptr_owner = 1;

  /* "psychxr/libovr/_libovr.pyx":2790
 *         self.ptr_owner = True
 * 
 *         self._headPoseState = LibOVRPoseState.fromPtr(&ptr.HeadPose)             # <<<<<<<<<<<<<<
 *         self._leftHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[0])
 *         self._rightHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[1])
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState->fromPtr((&__pyx_v_ptr->HeadPose), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_headPoseState);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_headPoseState));
  __pyx_v_self->_headPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2791
 * 
 *         self._headPoseState = LibOVRPoseState.fromPtr(&ptr.HeadPose)
 *         self._leftHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[0])             # <<<<<<<<<<<<<<
 *         self._rightHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[1])
 *         self._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState->fromPtr((&(__pyx_v_ptr->HandPoses[0])), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_leftHandPoseState);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_leftHandPoseState));
  __pyx_v_self->_leftHandPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2792
 *         self._headPoseState = LibOVRPoseState.fromPtr(&ptr.HeadPose)
 *         self._leftHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[0])
 *         self._rightHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[1])             # <<<<<<<<<<<<<<
 *         self._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState->fromPtr((&(__pyx_v_ptr->HandPoses[1])), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_rightHandPoseState);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_rightHandPoseState));
  __pyx_v_self->_rightHandPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2793
 *         self._leftHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[0])
 *         self._rightHandPoseState = LibOVRPoseState.fromPtr(&ptr.HandPoses[1])
 *         self._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr((&__pyx_v_ptr->CalibratedOrigin), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_calibratedOrigin);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_calibratedOrigin));
  __pyx_v_self->_calibratedOrigin = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2777
 *         return wrapper
 * 
 *     cdef void _new_struct(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.LibOVRTrackingState._new_struct", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "psychxr/libovr/_libovr.pyx":2795
 *         self._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 */

/* Python wrapper */
static void __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_4__dealloc__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static void __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "psychxr/libovr/_libovr.pyx":2796
 * 
 *     def __dealloc__(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":2797
 *     def __dealloc__(self):
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    __pyx_t_1 = ((__pyx_v_self->ptr_owner == 1) != 0);
    if (__pyx_t_1) {

      /* "psychxr/libovr/_libovr.pyx":2798
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)             # <<<<<<<<<<<<<<
 *                 self.c_data = NULL
 * 
 */
      PyMem_Free(__pyx_v_self->c_data);

      /* "psychxr/libovr/_libovr.pyx":2799
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
      __pyx_v_self->c_data = NULL;

      /* "psychxr/libovr/_libovr.pyx":2797
 *     def __dealloc__(self):
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    }

    /* "psychxr/libovr/_libovr.pyx":2796
 * 
 *     def __dealloc__(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2795
 *         self._calibratedOrigin = LibOVRPose.fromPtr(&ptr.CalibratedOrigin)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 */

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

/* "psychxr/libovr/_libovr.pyx":2802
 * 
 *     @property
 *     def headPose(self):             # <<<<<<<<<<<<<<
 *         """Head pose state (`LibOVRPoseState`)."""
 *         return self._headPoseState
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8headPose_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8headPose_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8headPose___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8headPose___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2804
 *     def headPose(self):
 *         """Head pose state (`LibOVRPoseState`)."""
 *         return self._headPoseState             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_headPoseState));
  __pyx_r = ((PyObject *)__pyx_v_self->_headPoseState);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2802
 * 
 *     @property
 *     def headPose(self):             # <<<<<<<<<<<<<<
 *         """Head pose state (`LibOVRPoseState`)."""
 *         return self._headPoseState
 */

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

/* "psychxr/libovr/_libovr.pyx":2807
 * 
 *     @property
 *     def handPoses(self):             # <<<<<<<<<<<<<<
 *         """Hand pose states (`LibOVRPoseState`, `LibOVRPoseState`).
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9handPoses_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9handPoses_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9handPoses___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9handPoses___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2817
 * 
 *         """
 *         return self._leftHandPoseState, self._rightHandPoseState             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_leftHandPoseState));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_leftHandPoseState));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_leftHandPoseState));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_rightHandPoseState));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_rightHandPoseState));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->_rightHandPoseState));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2807
 * 
 *     @property
 *     def handPoses(self):             # <<<<<<<<<<<<<<
 *         """Hand pose states (`LibOVRPoseState`, `LibOVRPoseState`).
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.handPoses.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2820
 * 
 *     @property
 *     def statusFlags(self):             # <<<<<<<<<<<<<<
 *         """Head tracking status flags (`int`).
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_11statusFlags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_11statusFlags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_11statusFlags___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_11statusFlags___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2833
 * 
 *         """
 *         return self.c_data.StatusFlags             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->c_data->StatusFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2820
 * 
 *     @property
 *     def statusFlags(self):             # <<<<<<<<<<<<<<
 *         """Head tracking status flags (`int`).
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.statusFlags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2836
 * 
 *     @property
 *     def positionValid(self):             # <<<<<<<<<<<<<<
 *         """`True` if position tracking is valid."""
 *         return (self.c_data.StatusFlags & STATUS_POSITION_VALID) == \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_13positionValid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_13positionValid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_13positionValid___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_13positionValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2838
 *     def positionValid(self):
 *         """`True` if position tracking is valid."""
 *         return (self.c_data.StatusFlags & STATUS_POSITION_VALID) == \             # <<<<<<<<<<<<<<
 *                STATUS_POSITION_VALID
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->c_data->StatusFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_STATUS_POSITION_VALID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2839
 *         """`True` if position tracking is valid."""
 *         return (self.c_data.StatusFlags & STATUS_POSITION_VALID) == \
 *                STATUS_POSITION_VALID             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_STATUS_POSITION_VALID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2836
 * 
 *     @property
 *     def positionValid(self):             # <<<<<<<<<<<<<<
 *         """`True` if position tracking is valid."""
 *         return (self.c_data.StatusFlags & STATUS_POSITION_VALID) == \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.positionValid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2842
 * 
 *     @property
 *     def orientationValid(self):             # <<<<<<<<<<<<<<
 *         """`True` if orientation tracking is valid."""
 *         return (self.c_data.StatusFlags & STATUS_ORIENTATION_VALID) == \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16orientationValid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16orientationValid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16orientationValid___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16orientationValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2844
 *     def orientationValid(self):
 *         """`True` if orientation tracking is valid."""
 *         return (self.c_data.StatusFlags & STATUS_ORIENTATION_VALID) == \             # <<<<<<<<<<<<<<
 *                STATUS_ORIENTATION_VALID
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->c_data->StatusFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_STATUS_ORIENTATION_VALID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":2845
 *         """`True` if orientation tracking is valid."""
 *         return (self.c_data.StatusFlags & STATUS_ORIENTATION_VALID) == \
 *                STATUS_ORIENTATION_VALID             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_STATUS_ORIENTATION_VALID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2842
 * 
 *     @property
 *     def orientationValid(self):             # <<<<<<<<<<<<<<
 *         """`True` if orientation tracking is valid."""
 *         return (self.c_data.StatusFlags & STATUS_ORIENTATION_VALID) == \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.orientationValid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2848
 * 
 *     @property
 *     def handStatusFlags(self):             # <<<<<<<<<<<<<<
 *         """Hand tracking status flags (`int`, `int`)."""
 *         return self.c_data.HandStatusFlags[0], self.c_data.HandStatusFlags[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_15handStatusFlags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_15handStatusFlags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_15handStatusFlags___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_15handStatusFlags___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2850
 *     def handStatusFlags(self):
 *         """Hand tracking status flags (`int`, `int`)."""
 *         return self.c_data.HandStatusFlags[0], self.c_data.HandStatusFlags[1]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->c_data->HandStatusFlags[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->c_data->HandStatusFlags[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2848
 * 
 *     @property
 *     def handStatusFlags(self):             # <<<<<<<<<<<<<<
 *         """Hand tracking status flags (`int`, `int`)."""
 *         return self.c_data.HandStatusFlags[0], self.c_data.HandStatusFlags[1]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.handStatusFlags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2879
 * 
 *     @property
 *     def handPositionValid(self):             # <<<<<<<<<<<<<<
 *         """Hand position tracking is valid (`bool`, `bool`).
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_17handPositionValid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_17handPositionValid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_17handPositionValid___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_17handPositionValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  int __pyx_v_left_hand;
  int __pyx_v_right_hand;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2890
 *         """
 *         cdef bint left_hand = (
 *             self.c_data.HandStatusFlags[HAND_LEFT] &             # <<<<<<<<<<<<<<
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID
 *         cdef bint right_hand = (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HAND_LEFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->c_data->HandStatusFlags[__pyx_t_2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":2891
 *         cdef bint left_hand = (
 *             self.c_data.HandStatusFlags[HAND_LEFT] &
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID             # <<<<<<<<<<<<<<
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_STATUS_POSITION_VALID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":2890
 *         """
 *         cdef bint left_hand = (
 *             self.c_data.HandStatusFlags[HAND_LEFT] &             # <<<<<<<<<<<<<<
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID
 *         cdef bint right_hand = (
 */
  __pyx_t_4 = PyNumber_And(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":2891
 *         cdef bint left_hand = (
 *             self.c_data.HandStatusFlags[HAND_LEFT] &
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID             # <<<<<<<<<<<<<<
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_STATUS_POSITION_VALID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_left_hand = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":2893
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &             # <<<<<<<<<<<<<<
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HAND_RIGHT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->c_data->HandStatusFlags[__pyx_t_2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":2894
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID             # <<<<<<<<<<<<<<
 * 
 *         return left_hand, right_hand
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_STATUS_POSITION_VALID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":2893
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &             # <<<<<<<<<<<<<<
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID
 * 
 */
  __pyx_t_4 = PyNumber_And(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":2894
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID             # <<<<<<<<<<<<<<
 * 
 *         return left_hand, right_hand
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_STATUS_POSITION_VALID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_right_hand = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":2896
 *                 STATUS_POSITION_VALID) == STATUS_POSITION_VALID
 * 
 *         return left_hand, right_hand             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_left_hand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_right_hand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2879
 * 
 *     @property
 *     def handPositionValid(self):             # <<<<<<<<<<<<<<
 *         """Hand position tracking is valid (`bool`, `bool`).
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.handPositionValid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2859
 * 
 *     @property
 *     def handOrientationValid(self):             # <<<<<<<<<<<<<<
 *         """Hand orientation tracking is valid (`bool`, `bool`).
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_20handOrientationValid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_20handOrientationValid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_20handOrientationValid___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_20handOrientationValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  int __pyx_v_left_hand;
  int __pyx_v_right_hand;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2870
 *         """
 *         cdef bint left_hand = (
 *             self.c_data.HandStatusFlags[HAND_LEFT] &             # <<<<<<<<<<<<<<
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID
 *         cdef bint right_hand = (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HAND_LEFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->c_data->HandStatusFlags[__pyx_t_2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":2871
 *         cdef bint left_hand = (
 *             self.c_data.HandStatusFlags[HAND_LEFT] &
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID             # <<<<<<<<<<<<<<
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_STATUS_ORIENTATION_VALID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":2870
 *         """
 *         cdef bint left_hand = (
 *             self.c_data.HandStatusFlags[HAND_LEFT] &             # <<<<<<<<<<<<<<
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID
 *         cdef bint right_hand = (
 */
  __pyx_t_4 = PyNumber_And(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":2871
 *         cdef bint left_hand = (
 *             self.c_data.HandStatusFlags[HAND_LEFT] &
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID             # <<<<<<<<<<<<<<
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_STATUS_ORIENTATION_VALID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_left_hand = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":2873
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &             # <<<<<<<<<<<<<<
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HAND_RIGHT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->c_data->HandStatusFlags[__pyx_t_2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":2874
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID             # <<<<<<<<<<<<<<
 * 
 *         return left_hand, right_hand
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_STATUS_ORIENTATION_VALID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":2873
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &             # <<<<<<<<<<<<<<
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID
 * 
 */
  __pyx_t_4 = PyNumber_And(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":2874
 *         cdef bint right_hand = (
 *             self.c_data.HandStatusFlags[HAND_RIGHT] &
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID             # <<<<<<<<<<<<<<
 * 
 *         return left_hand, right_hand
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_STATUS_ORIENTATION_VALID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_right_hand = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":2876
 *                 STATUS_ORIENTATION_VALID) == STATUS_ORIENTATION_VALID
 * 
 *         return left_hand, right_hand             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_left_hand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_right_hand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2859
 * 
 *     @property
 *     def handOrientationValid(self):             # <<<<<<<<<<<<<<
 *         """Hand orientation tracking is valid (`bool`, `bool`).
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.handOrientationValid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2899
 * 
 *     @property
 *     def calibratedOrigin(self):             # <<<<<<<<<<<<<<
 *         """Pose of the calibrated origin.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16calibratedOrigin_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16calibratedOrigin_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16calibratedOrigin___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16calibratedOrigin___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":2908
 * 
 *         """
 *         return self._calibratedOrigin             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_calibratedOrigin));
  __pyx_r = ((PyObject *)__pyx_v_self->_calibratedOrigin);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2899
 * 
 *     @property
 *     def calibratedOrigin(self):             # <<<<<<<<<<<<<<
 *         """Pose of the calibrated origin.
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_6__reduce_cython__[] = "LibOVRTrackingState.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_7__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_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_6__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8__setstate_cython__[] = "LibOVRTrackingState.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9__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_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackingState.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2952
 *     cdef np.ndarray _maxs
 * 
 *     def __init__(self, object extents=None):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__[] = "\n        Attributes\n        ----------\n        isValid : bool\n        extents : tuple\n        mins : ndarray\n        maxs : ndarray\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_extents = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extents,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extents);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2952, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_extents = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2952, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self), __pyx_v_extents);

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_extents) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psychxr/libovr/_libovr.pyx":2961
 *         maxs : ndarray
 *         """
 *         self._new_struct(extents)             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, *args, **kwargs):
 */
  ((struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self->__pyx_vtab)->_new_struct(__pyx_v_self, __pyx_v_extents);

  /* "psychxr/libovr/_libovr.pyx":2952
 *     cdef np.ndarray _maxs
 * 
 *     def __init__(self, object extents=None):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

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

/* "psychxr/libovr/_libovr.pyx":2963
 *         self._new_struct(extents)
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/libovr/_libovr.pyx":2964
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.ptr_owner = False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_v_self->ptr_owner = 0;

  /* "psychxr/libovr/_libovr.pyx":2963
 *         self._new_struct(extents)
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":2967
 * 
 *     @staticmethod
 *     cdef LibOVRBounds fromPtr(libovr_math.Bounds3f* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRBounds wrapper = LibOVRBounds.__new__(LibOVRBounds)
 *         wrapper.c_data = ptr
 */

static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_f_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr(OVR::Bounds3f *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr *__pyx_optional_args) {
  int __pyx_v_owner = ((int)0);
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_wrapper = 0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fromPtr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_owner = __pyx_optional_args->owner;
    }
  }

  /* "psychxr/libovr/_libovr.pyx":2968
 *     @staticmethod
 *     cdef LibOVRBounds fromPtr(libovr_math.Bounds3f* ptr, bint owner=False):
 *         cdef LibOVRBounds wrapper = LibOVRBounds.__new__(LibOVRBounds)             # <<<<<<<<<<<<<<
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRBounds(((PyTypeObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRBounds), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2968, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_wrapper = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2969
 *     cdef LibOVRBounds fromPtr(libovr_math.Bounds3f* ptr, bint owner=False):
 *         cdef LibOVRBounds wrapper = LibOVRBounds.__new__(LibOVRBounds)
 *         wrapper.c_data = ptr             # <<<<<<<<<<<<<<
 *         wrapper.ptr_owner = owner
 * 
 */
  __pyx_v_wrapper->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":2970
 *         cdef LibOVRBounds wrapper = LibOVRBounds.__new__(LibOVRBounds)
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner             # <<<<<<<<<<<<<<
 * 
 *         wrapper._mins = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[0])
 */
  __pyx_v_wrapper->ptr_owner = __pyx_v_owner;

  /* "psychxr/libovr/_libovr.pyx":2972
 *         wrapper.ptr_owner = owner
 * 
 *         wrapper._mins = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[0])             # <<<<<<<<<<<<<<
 *         wrapper._maxs = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[1])
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray(((ovrVector3f *)(&(__pyx_v_ptr->b[0]))))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_mins);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_mins));
  __pyx_v_wrapper->_mins = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2973
 * 
 *         wrapper._mins = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[0])
 *         wrapper._maxs = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[1])             # <<<<<<<<<<<<<<
 * 
 *         return wrapper
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray(((ovrVector3f *)(&(__pyx_v_ptr->b[1]))))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->_maxs);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->_maxs));
  __pyx_v_wrapper->_maxs = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":2975
 *         wrapper._maxs = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[1])
 * 
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cdef void _new_struct(self, object extents):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_wrapper));
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":2967
 * 
 *     @staticmethod
 *     cdef LibOVRBounds fromPtr(libovr_math.Bounds3f* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRBounds wrapper = LibOVRBounds.__new__(LibOVRBounds)
 *         wrapper.c_data = ptr
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.fromPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":2977
 *         return wrapper
 * 
 *     cdef void _new_struct(self, object extents):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

static void __pyx_f_7psychxr_6libovr_7_libovr_12LibOVRBounds__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_extents) {
  OVR::Bounds3f *__pyx_v_ptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  float __pyx_t_5;
  __Pyx_RefNannySetupContext("_new_struct", 0);

  /* "psychxr/libovr/_libovr.pyx":2978
 * 
 *     cdef void _new_struct(self, object extents):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":2979
 *     cdef void _new_struct(self, object extents):
 *         if self.c_data is not NULL:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Bounds3f* ptr = \
 */
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":2978
 * 
 *     cdef void _new_struct(self, object extents):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2982
 * 
 *         cdef libovr_math.Bounds3f* ptr = \
 *             <libovr_math.Bounds3f*>PyMem_Malloc(sizeof(libovr_math.Bounds3f))             # <<<<<<<<<<<<<<
 * 
 *         if ptr is NULL:
 */
  __pyx_v_ptr = ((OVR::Bounds3f *)PyMem_Malloc((sizeof(OVR::Bounds3f))));

  /* "psychxr/libovr/_libovr.pyx":2984
 *             <libovr_math.Bounds3f*>PyMem_Malloc(sizeof(libovr_math.Bounds3f))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":2985
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         if extents is not None:
 */
    PyErr_NoMemory(); __PYX_ERR(0, 2985, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":2984
 *             <libovr_math.Bounds3f*>PyMem_Malloc(sizeof(libovr_math.Bounds3f))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":2987
 *             raise MemoryError
 * 
 *         if extents is not None:             # <<<<<<<<<<<<<<
 *             ptr.b[0].x = <float>extents[0][0]
 *             ptr.b[0].y = <float>extents[0][1]
 */
  __pyx_t_1 = (__pyx_v_extents != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":2988
 * 
 *         if extents is not None:
 *             ptr.b[0].x = <float>extents[0][0]             # <<<<<<<<<<<<<<
 *             ptr.b[0].y = <float>extents[0][1]
 *             ptr.b[0].z = <float>extents[0][2]
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_extents, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2988, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_ptr->b[0]).x = ((float)__pyx_t_5);

    /* "psychxr/libovr/_libovr.pyx":2989
 *         if extents is not None:
 *             ptr.b[0].x = <float>extents[0][0]
 *             ptr.b[0].y = <float>extents[0][1]             # <<<<<<<<<<<<<<
 *             ptr.b[0].z = <float>extents[0][2]
 *             ptr.b[1].x = <float>extents[1][0]
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_extents, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_ptr->b[0]).y = ((float)__pyx_t_5);

    /* "psychxr/libovr/_libovr.pyx":2990
 *             ptr.b[0].x = <float>extents[0][0]
 *             ptr.b[0].y = <float>extents[0][1]
 *             ptr.b[0].z = <float>extents[0][2]             # <<<<<<<<<<<<<<
 *             ptr.b[1].x = <float>extents[1][0]
 *             ptr.b[1].y = <float>extents[1][1]
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_extents, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2990, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_ptr->b[0]).z = ((float)__pyx_t_5);

    /* "psychxr/libovr/_libovr.pyx":2991
 *             ptr.b[0].y = <float>extents[0][1]
 *             ptr.b[0].z = <float>extents[0][2]
 *             ptr.b[1].x = <float>extents[1][0]             # <<<<<<<<<<<<<<
 *             ptr.b[1].y = <float>extents[1][1]
 *             ptr.b[1].z = <float>extents[1][2]
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_extents, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2991, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_ptr->b[1]).x = ((float)__pyx_t_5);

    /* "psychxr/libovr/_libovr.pyx":2992
 *             ptr.b[0].z = <float>extents[0][2]
 *             ptr.b[1].x = <float>extents[1][0]
 *             ptr.b[1].y = <float>extents[1][1]             # <<<<<<<<<<<<<<
 *             ptr.b[1].z = <float>extents[1][2]
 *         else:
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_extents, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2992, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_ptr->b[1]).y = ((float)__pyx_t_5);

    /* "psychxr/libovr/_libovr.pyx":2993
 *             ptr.b[1].x = <float>extents[1][0]
 *             ptr.b[1].y = <float>extents[1][1]
 *             ptr.b[1].z = <float>extents[1][2]             # <<<<<<<<<<<<<<
 *         else:
 *             ptr.Clear()
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_extents, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2993, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_ptr->b[1]).z = ((float)__pyx_t_5);

    /* "psychxr/libovr/_libovr.pyx":2987
 *             raise MemoryError
 * 
 *         if extents is not None:             # <<<<<<<<<<<<<<
 *             ptr.b[0].x = <float>extents[0][0]
 *             ptr.b[0].y = <float>extents[0][1]
 */
    goto __pyx_L5;
  }

  /* "psychxr/libovr/_libovr.pyx":2995
 *             ptr.b[1].z = <float>extents[1][2]
 *         else:
 *             ptr.Clear()             # <<<<<<<<<<<<<<
 * 
 *         self.c_data = ptr
 */
  /*else*/ {
    __pyx_v_ptr->Clear();
  }
  __pyx_L5:;

  /* "psychxr/libovr/_libovr.pyx":2997
 *             ptr.Clear()
 * 
 *         self.c_data = ptr             # <<<<<<<<<<<<<<
 *         self.ptr_owner = True
 * 
 */
  __pyx_v_self->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":2998
 * 
 *         self.c_data = ptr
 *         self.ptr_owner = True             # <<<<<<<<<<<<<<
 * 
 *         self._mins = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[0])
 */
  __pyx_v_self->ptr_owner = 1;

  /* "psychxr/libovr/_libovr.pyx":3000
 *         self.ptr_owner = True
 * 
 *         self._mins = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[0])             # <<<<<<<<<<<<<<
 *         self._maxs = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[1])
 * 
 */
  __pyx_t_3 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray(((ovrVector3f *)(&(__pyx_v_ptr->b[0]))))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_mins);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_mins));
  __pyx_v_self->_mins = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3001
 * 
 *         self._mins = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[0])
 *         self._maxs = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[1])             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_3 = ((PyObject *)__pyx_f_7psychxr_6libovr_7_libovr__wrap_ovrVector3f_as_ndarray(((ovrVector3f *)(&(__pyx_v_ptr->b[1]))))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_maxs);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_maxs));
  __pyx_v_self->_maxs = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":2977
 *         return wrapper
 * 
 *     cdef void _new_struct(self, object extents):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.LibOVRBounds._new_struct", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "psychxr/libovr/_libovr.pyx":3003
 *         self._maxs = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[1])
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 */

/* Python wrapper */
static void __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4__dealloc__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self));

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

static void __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "psychxr/libovr/_libovr.pyx":3004
 * 
 *     def __dealloc__(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":3005
 *     def __dealloc__(self):
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    __pyx_t_1 = ((__pyx_v_self->ptr_owner == 1) != 0);
    if (__pyx_t_1) {

      /* "psychxr/libovr/_libovr.pyx":3006
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)             # <<<<<<<<<<<<<<
 *                 self.c_data = NULL
 * 
 */
      PyMem_Free(__pyx_v_self->c_data);

      /* "psychxr/libovr/_libovr.pyx":3007
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL             # <<<<<<<<<<<<<<
 * 
 *     def clear(self):
 */
      __pyx_v_self->c_data = NULL;

      /* "psychxr/libovr/_libovr.pyx":3005
 *     def __dealloc__(self):
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    }

    /* "psychxr/libovr/_libovr.pyx":3004
 * 
 *     def __dealloc__(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3003
 *         self._maxs = _wrap_ovrVector3f_as_ndarray(<capi.ovrVector3f*>&ptr.b[1])
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 */

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

/* "psychxr/libovr/_libovr.pyx":3009
 *                 self.c_data = NULL
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         """Clear the bounding box."""
 *         self.c_data.Clear()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_6clear[] = "LibOVRBounds.clear(self)\nClear the bounding box.";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_6clear(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_6clear(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear", 0);

  /* "psychxr/libovr/_libovr.pyx":3011
 *     def clear(self):
 *         """Clear the bounding box."""
 *         self.c_data.Clear()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data->Clear();

  /* "psychxr/libovr/_libovr.pyx":3009
 *                 self.c_data = NULL
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         """Clear the bounding box."""
 *         self.c_data.Clear()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3014
 * 
 *     @property
 *     def isValid(self):             # <<<<<<<<<<<<<<
 *         """``True`` if a bounding box is valid. Bounding boxes are valid if all
 *         dimensions of `mins` are less than each of `maxs` which is the case
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7isValid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7isValid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7isValid___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7isValid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3023
 * 
 *         """
 *         if self.c_data.b[1].x <= self.c_data.b[0].x and \             # <<<<<<<<<<<<<<
 *                 self.c_data.b[1].y <= self.c_data.b[0].y and \
 *                 self.c_data.b[1].z <= self.c_data.b[0].z:
 */
  __pyx_t_2 = (((__pyx_v_self->c_data->b[1]).x <= (__pyx_v_self->c_data->b[0]).x) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3024
 *         """
 *         if self.c_data.b[1].x <= self.c_data.b[0].x and \
 *                 self.c_data.b[1].y <= self.c_data.b[0].y and \             # <<<<<<<<<<<<<<
 *                 self.c_data.b[1].z <= self.c_data.b[0].z:
 *             return False
 */
  __pyx_t_2 = (((__pyx_v_self->c_data->b[1]).y <= (__pyx_v_self->c_data->b[0]).y) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3025
 *         if self.c_data.b[1].x <= self.c_data.b[0].x and \
 *                 self.c_data.b[1].y <= self.c_data.b[0].y and \
 *                 self.c_data.b[1].z <= self.c_data.b[0].z:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_2 = (((__pyx_v_self->c_data->b[1]).z <= (__pyx_v_self->c_data->b[0]).z) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;

  /* "psychxr/libovr/_libovr.pyx":3023
 * 
 *         """
 *         if self.c_data.b[1].x <= self.c_data.b[0].x and \             # <<<<<<<<<<<<<<
 *                 self.c_data.b[1].y <= self.c_data.b[0].y and \
 *                 self.c_data.b[1].z <= self.c_data.b[0].z:
 */
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":3026
 *                 self.c_data.b[1].y <= self.c_data.b[0].y and \
 *                 self.c_data.b[1].z <= self.c_data.b[0].z:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":3023
 * 
 *         """
 *         if self.c_data.b[1].x <= self.c_data.b[0].x and \             # <<<<<<<<<<<<<<
 *                 self.c_data.b[1].y <= self.c_data.b[0].y and \
 *                 self.c_data.b[1].z <= self.c_data.b[0].z:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3028
 *             return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def fit(self, object points, bint clear=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3014
 * 
 *     @property
 *     def isValid(self):             # <<<<<<<<<<<<<<
 *         """``True`` if a bounding box is valid. Bounding boxes are valid if all
 *         dimensions of `mins` are less than each of `maxs` which is the case
 */

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

/* "psychxr/libovr/_libovr.pyx":3030
 *         return True
 * 
 *     def fit(self, object points, bint clear=True):             # <<<<<<<<<<<<<<
 *         """Fit an axis aligned bounding box to enclose specified points. The
 *         resulting bounding box is guaranteed to enclose all points, however
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_9fit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_8fit[] = "LibOVRBounds.fit(self, points, bool clear=True)\nFit an axis aligned bounding box to enclose specified points. The\n        resulting bounding box is guaranteed to enclose all points, however\n        volume is not necessarily minimized or optimal.\n\n        Parameters\n        ----------\n        points : array_like\n            2D array of points [x, y, z] to fit, can be a list of vertices from\n            a 3D model associated with the bounding box.\n        clear : bool, optional\n            Clear the bounding box prior to fitting. If ``False`` the current\n            bounding box will be re-sized to fit new points.\n\n        Examples\n        --------\n        Create a bounding box around vertices specified in a list::\n\n            # model vertices\n            vertices = [[-1.0, -1.0, 0.0],\n                        [-1.0, 1.0, 0.0],\n                        [1.0, 1.0, 0.0],\n                        [1.0, -1.0, 0.0]]\n\n            # create an empty bounding box\n            bbox = LibOVRBounds()\n            bbox.fit(vertices)\n\n            # associate the bounding box to a pose\n            modelPose = LibOVRPose()\n            modelPose.bounds = bbox\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_9fit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_points = 0;
  int __pyx_v_clear;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_points,&__pyx_n_s_clear,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_points)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_clear);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fit") < 0)) __PYX_ERR(0, 3030, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_points = values[0];
    if (values[1]) {
      __pyx_v_clear = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_clear == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3030, __pyx_L3_error)
    } else {
      __pyx_v_clear = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fit", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3030, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.fit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_8fit(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self), __pyx_v_points, __pyx_v_clear);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_8fit(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_points, int __pyx_v_clear) {
  PyArrayObject *__pyx_v_points_in = 0;
  OVR::Vector3f __pyx_v_new_point;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  __Pyx_memviewslice __pyx_v_mv_points = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_LocalBuf_ND __pyx_pybuffernd_points_in;
  __Pyx_Buffer __pyx_pybuffer_points_in;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  OVR::Vector3f __pyx_t_7;
  int __pyx_t_8;
  __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __Pyx_RefNannySetupContext("fit", 0);
  __pyx_pybuffer_points_in.pybuffer.buf = NULL;
  __pyx_pybuffer_points_in.refcount = 0;
  __pyx_pybuffernd_points_in.data = NULL;
  __pyx_pybuffernd_points_in.rcbuffer = &__pyx_pybuffer_points_in;

  /* "psychxr/libovr/_libovr.pyx":3063
 * 
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=2] points_in = np.asarray(             # <<<<<<<<<<<<<<
 *             points, dtype=np.float32)
 *         cdef libovr_math.Vector3f new_point = libovr_math.Vector3f()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3064
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=2] points_in = np.asarray(
 *             points, dtype=np.float32)             # <<<<<<<<<<<<<<
 *         cdef libovr_math.Vector3f new_point = libovr_math.Vector3f()
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_points);
  __Pyx_GIVEREF(__pyx_v_points);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_points);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 3064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3063
 * 
 *         """
 *         cdef np.ndarray[np.float32_t, ndim=2] points_in = np.asarray(             # <<<<<<<<<<<<<<
 *             points, dtype=np.float32)
 *         cdef libovr_math.Vector3f new_point = libovr_math.Vector3f()
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3063, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_points_in.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
      __pyx_v_points_in = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_points_in.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 3063, __pyx_L1_error)
    } else {__pyx_pybuffernd_points_in.diminfo[0].strides = __pyx_pybuffernd_points_in.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_points_in.diminfo[0].shape = __pyx_pybuffernd_points_in.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_points_in.diminfo[1].strides = __pyx_pybuffernd_points_in.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_points_in.diminfo[1].shape = __pyx_pybuffernd_points_in.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_points_in = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3065
 *         cdef np.ndarray[np.float32_t, ndim=2] points_in = np.asarray(
 *             points, dtype=np.float32)
 *         cdef libovr_math.Vector3f new_point = libovr_math.Vector3f()             # <<<<<<<<<<<<<<
 * 
 *         if clear:
 */
  try {
    __pyx_t_7 = OVR::Vector3f();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3065, __pyx_L1_error)
  }
  __pyx_v_new_point = __pyx_t_7;

  /* "psychxr/libovr/_libovr.pyx":3067
 *         cdef libovr_math.Vector3f new_point = libovr_math.Vector3f()
 * 
 *         if clear:             # <<<<<<<<<<<<<<
 *             self.c_data.Clear()
 * 
 */
  __pyx_t_8 = (__pyx_v_clear != 0);
  if (__pyx_t_8) {

    /* "psychxr/libovr/_libovr.pyx":3068
 * 
 *         if clear:
 *             self.c_data.Clear()             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t i, N
 */
    __pyx_v_self->c_data->Clear();

    /* "psychxr/libovr/_libovr.pyx":3067
 *         cdef libovr_math.Vector3f new_point = libovr_math.Vector3f()
 * 
 *         if clear:             # <<<<<<<<<<<<<<
 *             self.c_data.Clear()
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3071
 * 
 *         cdef Py_ssize_t i, N
 *         cdef float[:, :] mv_points = points_in  # memory view             # <<<<<<<<<<<<<<
 *         N = <Py_ssize_t>points_in.shape[0]
 *         for i in range(N):
 */
  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(((PyObject *)__pyx_v_points_in), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 3071, __pyx_L1_error)
  __pyx_v_mv_points = __pyx_t_9;
  __pyx_t_9.memview = NULL;
  __pyx_t_9.data = NULL;

  /* "psychxr/libovr/_libovr.pyx":3072
 *         cdef Py_ssize_t i, N
 *         cdef float[:, :] mv_points = points_in  # memory view
 *         N = <Py_ssize_t>points_in.shape[0]             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             new_point.x = mv_points[i, 0]
 */
  __pyx_v_N = ((Py_ssize_t)(__pyx_v_points_in->dimensions[0]));

  /* "psychxr/libovr/_libovr.pyx":3073
 *         cdef float[:, :] mv_points = points_in  # memory view
 *         N = <Py_ssize_t>points_in.shape[0]
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             new_point.x = mv_points[i, 0]
 *             new_point.y = mv_points[i, 1]
 */
  __pyx_t_10 = __pyx_v_N;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "psychxr/libovr/_libovr.pyx":3074
 *         N = <Py_ssize_t>points_in.shape[0]
 *         for i in range(N):
 *             new_point.x = mv_points[i, 0]             # <<<<<<<<<<<<<<
 *             new_point.y = mv_points[i, 1]
 *             new_point.z = mv_points[i, 2]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_14 = 0;
    __pyx_t_15 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_v_mv_points.shape[0];
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_15 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_v_mv_points.shape[0])) __pyx_t_15 = 0;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_v_mv_points.shape[1];
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 1;
    } else if (unlikely(__pyx_t_14 >= __pyx_v_mv_points.shape[1])) __pyx_t_15 = 1;
    if (unlikely(__pyx_t_15 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_15);
      __PYX_ERR(0, 3074, __pyx_L1_error)
    }
    __pyx_v_new_point.x = (*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_mv_points.data + __pyx_t_13 * __pyx_v_mv_points.strides[0]) ) + __pyx_t_14 * __pyx_v_mv_points.strides[1]) )));

    /* "psychxr/libovr/_libovr.pyx":3075
 *         for i in range(N):
 *             new_point.x = mv_points[i, 0]
 *             new_point.y = mv_points[i, 1]             # <<<<<<<<<<<<<<
 *             new_point.z = mv_points[i, 2]
 *             self.c_data.AddPoint(new_point)
 */
    __pyx_t_16 = __pyx_v_i;
    __pyx_t_17 = 1;
    __pyx_t_15 = -1;
    if (__pyx_t_16 < 0) {
      __pyx_t_16 += __pyx_v_mv_points.shape[0];
      if (unlikely(__pyx_t_16 < 0)) __pyx_t_15 = 0;
    } else if (unlikely(__pyx_t_16 >= __pyx_v_mv_points.shape[0])) __pyx_t_15 = 0;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_v_mv_points.shape[1];
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_15 = 1;
    } else if (unlikely(__pyx_t_17 >= __pyx_v_mv_points.shape[1])) __pyx_t_15 = 1;
    if (unlikely(__pyx_t_15 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_15);
      __PYX_ERR(0, 3075, __pyx_L1_error)
    }
    __pyx_v_new_point.y = (*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_mv_points.data + __pyx_t_16 * __pyx_v_mv_points.strides[0]) ) + __pyx_t_17 * __pyx_v_mv_points.strides[1]) )));

    /* "psychxr/libovr/_libovr.pyx":3076
 *             new_point.x = mv_points[i, 0]
 *             new_point.y = mv_points[i, 1]
 *             new_point.z = mv_points[i, 2]             # <<<<<<<<<<<<<<
 *             self.c_data.AddPoint(new_point)
 * 
 */
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_19 = 2;
    __pyx_t_15 = -1;
    if (__pyx_t_18 < 0) {
      __pyx_t_18 += __pyx_v_mv_points.shape[0];
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_15 = 0;
    } else if (unlikely(__pyx_t_18 >= __pyx_v_mv_points.shape[0])) __pyx_t_15 = 0;
    if (__pyx_t_19 < 0) {
      __pyx_t_19 += __pyx_v_mv_points.shape[1];
      if (unlikely(__pyx_t_19 < 0)) __pyx_t_15 = 1;
    } else if (unlikely(__pyx_t_19 >= __pyx_v_mv_points.shape[1])) __pyx_t_15 = 1;
    if (unlikely(__pyx_t_15 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_15);
      __PYX_ERR(0, 3076, __pyx_L1_error)
    }
    __pyx_v_new_point.z = (*((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_mv_points.data + __pyx_t_18 * __pyx_v_mv_points.strides[0]) ) + __pyx_t_19 * __pyx_v_mv_points.strides[1]) )));

    /* "psychxr/libovr/_libovr.pyx":3077
 *             new_point.y = mv_points[i, 1]
 *             new_point.z = mv_points[i, 2]
 *             self.c_data.AddPoint(new_point)             # <<<<<<<<<<<<<<
 * 
 *     def addPoint(self, object point):
 */
    __pyx_v_self->c_data->AddPoint(__pyx_v_new_point);
  }

  /* "psychxr/libovr/_libovr.pyx":3030
 *         return True
 * 
 *     def fit(self, object points, bint clear=True):             # <<<<<<<<<<<<<<
 *         """Fit an axis aligned bounding box to enclose specified points. The
 *         resulting bounding box is guaranteed to enclose all points, however
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_points_in.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.fit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_points_in.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_points_in);
  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_points, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3079
 *             self.c_data.AddPoint(new_point)
 * 
 *     def addPoint(self, object point):             # <<<<<<<<<<<<<<
 *         """Resize the bounding box to encompass a given point. Calling this
 *         function for each vertex of a model will create an optimal bounding box
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_11addPoint(PyObject *__pyx_v_self, PyObject *__pyx_v_point); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_10addPoint[] = "LibOVRBounds.addPoint(self, point)\nResize the bounding box to encompass a given point. Calling this\n        function for each vertex of a model will create an optimal bounding box\n        for it.\n\n        Parameters\n        ----------\n        point : array_like\n            Vector/coordinate to add [x, y, z].\n\n        See Also\n        --------\n        fit : Fit a bounding box to enclose a list of points.\n\n        ";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_11addPoint(PyObject *__pyx_v_self, PyObject *__pyx_v_point) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("addPoint (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_10addPoint(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self), ((PyObject *)__pyx_v_point));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_10addPoint(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_point) {
  OVR::Vector3f __pyx_v_new_point;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  float __pyx_t_3;
  float __pyx_t_4;
  OVR::Vector3f __pyx_t_5;
  __Pyx_RefNannySetupContext("addPoint", 0);

  /* "psychxr/libovr/_libovr.pyx":3095
 *         """
 *         cdef libovr_math.Vector3f new_point = libovr_math.Vector3f(
 *             <float>point[0], <float>point[1], <float>point[2])             # <<<<<<<<<<<<<<
 * 
 *         self.c_data.AddPoint(new_point)
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_point, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_point, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_point, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3094
 * 
 *         """
 *         cdef libovr_math.Vector3f new_point = libovr_math.Vector3f(             # <<<<<<<<<<<<<<
 *             <float>point[0], <float>point[1], <float>point[2])
 * 
 */
  try {
    __pyx_t_5 = OVR::Vector3f(((float)__pyx_t_2), ((float)__pyx_t_3), ((float)__pyx_t_4));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3094, __pyx_L1_error)
  }
  __pyx_v_new_point = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":3097
 *             <float>point[0], <float>point[1], <float>point[2])
 * 
 *         self.c_data.AddPoint(new_point)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data->AddPoint(__pyx_v_new_point);

  /* "psychxr/libovr/_libovr.pyx":3079
 *             self.c_data.AddPoint(new_point)
 * 
 *     def addPoint(self, object point):             # <<<<<<<<<<<<<<
 *         """Resize the bounding box to encompass a given point. Calling this
 *         function for each vertex of a model will create an optimal bounding box
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.addPoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3100
 * 
 *     @property
 *     def extents(self):             # <<<<<<<<<<<<<<
 *         """The extents of the bounding box (`mins`, `maxs`)."""
 *         return self._mins, self._maxs
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3102
 *     def extents(self):
 *         """The extents of the bounding box (`mins`, `maxs`)."""
 *         return self._mins, self._maxs             # <<<<<<<<<<<<<<
 * 
 *     @extents.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_mins));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_mins));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_mins));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_maxs));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_maxs));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->_maxs));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3100
 * 
 *     @property
 *     def extents(self):             # <<<<<<<<<<<<<<
 *         """The extents of the bounding box (`mins`, `maxs`)."""
 *         return self._mins, self._maxs
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.extents.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3105
 * 
 *     @extents.setter
 *     def extents(self, object value):             # <<<<<<<<<<<<<<
 *         self._mins[:] = value[0]
 *         self._maxs[:] = value[1]
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":3106
 *     @extents.setter
 *     def extents(self, object value):
 *         self._mins[:] = value[0]             # <<<<<<<<<<<<<<
 *         self._maxs[:] = value[1]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_mins), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 3106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3107
 *     def extents(self, object value):
 *         self._mins[:] = value[0]
 *         self._maxs[:] = value[1]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_maxs), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3105
 * 
 *     @extents.setter
 *     def extents(self, object value):             # <<<<<<<<<<<<<<
 *         self._mins[:] = value[0]
 *         self._maxs[:] = value[1]
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.extents.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3110
 * 
 *     @property
 *     def mins(self):             # <<<<<<<<<<<<<<
 *         """Point defining the minimum extent of the bounding box."""
 *         return self._mins
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3112
 *     def mins(self):
 *         """Point defining the minimum extent of the bounding box."""
 *         return self._mins             # <<<<<<<<<<<<<<
 * 
 *     @mins.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_mins));
  __pyx_r = ((PyObject *)__pyx_v_self->_mins);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3110
 * 
 *     @property
 *     def mins(self):             # <<<<<<<<<<<<<<
 *         """Point defining the minimum extent of the bounding box."""
 *         return self._mins
 */

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

/* "psychxr/libovr/_libovr.pyx":3115
 * 
 *     @mins.setter
 *     def mins(self, object value):             # <<<<<<<<<<<<<<
 *         self._mins[:] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":3116
 *     @mins.setter
 *     def mins(self, object value):
 *         self._mins[:] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_mins), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 3116, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":3115
 * 
 *     @mins.setter
 *     def mins(self, object value):             # <<<<<<<<<<<<<<
 *         self._mins[:] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.mins.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3119
 * 
 *     @property
 *     def maxs(self):             # <<<<<<<<<<<<<<
 *         """Point defining the maximum extent of the bounding box."""
 *         return self._maxs
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3121
 *     def maxs(self):
 *         """Point defining the maximum extent of the bounding box."""
 *         return self._maxs             # <<<<<<<<<<<<<<
 * 
 *     @maxs.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_maxs));
  __pyx_r = ((PyObject *)__pyx_v_self->_maxs);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3119
 * 
 *     @property
 *     def maxs(self):             # <<<<<<<<<<<<<<
 *         """Point defining the maximum extent of the bounding box."""
 *         return self._maxs
 */

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

/* "psychxr/libovr/_libovr.pyx":3124
 * 
 *     @maxs.setter
 *     def maxs(self, object value):             # <<<<<<<<<<<<<<
 *         self._mins[:] = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/libovr/_libovr.pyx":3125
 *     @maxs.setter
 *     def maxs(self, object value):
 *         self._mins[:] = value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_mins), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1) < 0) __PYX_ERR(0, 3125, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":3124
 * 
 *     @maxs.setter
 *     def maxs(self, object value):             # <<<<<<<<<<<<<<
 *         self._mins[:] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.maxs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_12__reduce_cython__[] = "LibOVRBounds.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_12__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_12LibOVRBounds_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_14__setstate_cython__[] = "LibOVRBounds.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_14__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12LibOVRBounds_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBounds.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3143
 *     cdef unsigned int _trackerIndex
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__[] = "\n        Attributes\n        ----------\n        trackerIndex : int\n            Tracker index this objects refers to (read-only).\n        pose : LibOVRPose\n            The pose of the sensor (read-only).\n        leveledPose : LibOVRPose\n            Gravity aligned pose of the sensor (read-only).\n        isConnected : bool\n            True if the sensor is connected and available (read-only).\n        isPoseTracked : bool\n            True if the sensor has a valid pose (read-only).\n        horizontalFov : float\n            Horizontal FOV of the sensor in radians (read-only).\n        verticalFov : float\n            Vertical FOV of the sensor in radians (read-only).\n        nearZ : float\n            Near clipping plane of the sensor frustum in meters (read-only).\n        farZ : float\n            Far clipping plane of the sensor frustum in meters (read-only).\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

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

/* "psychxr/libovr/_libovr.pyx":3169
 *         pass
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._pose = LibOVRPose.fromPtr(&self.c_ovrTrackerPose.Pose)
 *         self._leveledPose = LibOVRPose.fromPtr(&self.c_ovrTrackerPose.LeveledPose)
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_3__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_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/libovr/_libovr.pyx":3170
 * 
 *     def __cinit__(self):
 *         self._pose = LibOVRPose.fromPtr(&self.c_ovrTrackerPose.Pose)             # <<<<<<<<<<<<<<
 *         self._leveledPose = LibOVRPose.fromPtr(&self.c_ovrTrackerPose.LeveledPose)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr((&__pyx_v_self->c_ovrTrackerPose.Pose), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_pose);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pose));
  __pyx_v_self->_pose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3171
 *     def __cinit__(self):
 *         self._pose = LibOVRPose.fromPtr(&self.c_ovrTrackerPose.Pose)
 *         self._leveledPose = LibOVRPose.fromPtr(&self.c_ovrTrackerPose.LeveledPose)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr((&__pyx_v_self->c_ovrTrackerPose.LeveledPose), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_leveledPose);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_leveledPose));
  __pyx_v_self->_leveledPose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3169
 *         pass
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._pose = LibOVRPose.fromPtr(&self.c_ovrTrackerPose.Pose)
 *         self._leveledPose = LibOVRPose.fromPtr(&self.c_ovrTrackerPose.LeveledPose)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3174
 * 
 *     @property
 *     def trackerIndex(self):             # <<<<<<<<<<<<<<
 *         """Tracker index this objects refers to (read-only)."""
 *         return self._trackerIndex
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_12trackerIndex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_12trackerIndex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_12trackerIndex___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_12trackerIndex___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3176
 *     def trackerIndex(self):
 *         """Tracker index this objects refers to (read-only)."""
 *         return self._trackerIndex             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_trackerIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3174
 * 
 *     @property
 *     def trackerIndex(self):             # <<<<<<<<<<<<<<
 *         """Tracker index this objects refers to (read-only)."""
 *         return self._trackerIndex
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.trackerIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3179
 * 
 *     @property
 *     def pose(self):             # <<<<<<<<<<<<<<
 *         """The pose of the sensor (read-only)."""
 *         return self._pose
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4pose_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4pose_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4pose___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4pose___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3181
 *     def pose(self):
 *         """The pose of the sensor (read-only)."""
 *         return self._pose             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_pose));
  __pyx_r = ((PyObject *)__pyx_v_self->_pose);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3179
 * 
 *     @property
 *     def pose(self):             # <<<<<<<<<<<<<<
 *         """The pose of the sensor (read-only)."""
 *         return self._pose
 */

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

/* "psychxr/libovr/_libovr.pyx":3184
 * 
 *     @property
 *     def leveledPose(self):             # <<<<<<<<<<<<<<
 *         """Gravity aligned pose of the sensor (read-only)."""
 *         return self._leveledPose
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11leveledPose_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11leveledPose_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11leveledPose___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11leveledPose___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3186
 *     def leveledPose(self):
 *         """Gravity aligned pose of the sensor (read-only)."""
 *         return self._leveledPose             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_leveledPose));
  __pyx_r = ((PyObject *)__pyx_v_self->_leveledPose);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3184
 * 
 *     @property
 *     def leveledPose(self):             # <<<<<<<<<<<<<<
 *         """Gravity aligned pose of the sensor (read-only)."""
 *         return self._leveledPose
 */

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

/* "psychxr/libovr/_libovr.pyx":3189
 * 
 *     @property
 *     def isConnected(self):             # <<<<<<<<<<<<<<
 *         """True if the sensor is connected and available (read-only)."""
 *         return <bint>((capi.ovrTracker_Connected &
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11isConnected_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11isConnected_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11isConnected___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11isConnected___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3191
 *     def isConnected(self):
 *         """True if the sensor is connected and available (read-only)."""
 *         return <bint>((capi.ovrTracker_Connected &             # <<<<<<<<<<<<<<
 *              self.c_ovrTrackerPose.TrackerFlags) ==
 *                       capi.ovrTracker_Connected)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":3192
 *         """True if the sensor is connected and available (read-only)."""
 *         return <bint>((capi.ovrTracker_Connected &
 *              self.c_ovrTrackerPose.TrackerFlags) ==             # <<<<<<<<<<<<<<
 *                       capi.ovrTracker_Connected)
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((((ovrTracker_Connected & __pyx_v_self->c_ovrTrackerPose.TrackerFlags) == ovrTracker_Connected) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3189
 * 
 *     @property
 *     def isConnected(self):             # <<<<<<<<<<<<<<
 *         """True if the sensor is connected and available (read-only)."""
 *         return <bint>((capi.ovrTracker_Connected &
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.isConnected.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3196
 * 
 *     @property
 *     def isPoseTracked(self):             # <<<<<<<<<<<<<<
 *         """True if the sensor has a valid pose (read-only)."""
 *         return <bint>((capi.ovrTracker_PoseTracked &
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13isPoseTracked_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13isPoseTracked_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13isPoseTracked___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13isPoseTracked___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3198
 *     def isPoseTracked(self):
 *         """True if the sensor has a valid pose (read-only)."""
 *         return <bint>((capi.ovrTracker_PoseTracked &             # <<<<<<<<<<<<<<
 *              self.c_ovrTrackerPose.TrackerFlags) ==
 *                       capi.ovrTracker_PoseTracked)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":3199
 *         """True if the sensor has a valid pose (read-only)."""
 *         return <bint>((capi.ovrTracker_PoseTracked &
 *              self.c_ovrTrackerPose.TrackerFlags) ==             # <<<<<<<<<<<<<<
 *                       capi.ovrTracker_PoseTracked)
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((((ovrTracker_PoseTracked & __pyx_v_self->c_ovrTrackerPose.TrackerFlags) == ovrTracker_PoseTracked) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3196
 * 
 *     @property
 *     def isPoseTracked(self):             # <<<<<<<<<<<<<<
 *         """True if the sensor has a valid pose (read-only)."""
 *         return <bint>((capi.ovrTracker_PoseTracked &
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.isPoseTracked.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3203
 * 
 *     @property
 *     def horizontalFov(self):             # <<<<<<<<<<<<<<
 *         """Horizontal FOV of the sensor in radians (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumHFovInRadians
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13horizontalFov_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13horizontalFov_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13horizontalFov___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13horizontalFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3205
 *     def horizontalFov(self):
 *         """Horizontal FOV of the sensor in radians (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumHFovInRadians             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_ovrTrackerDesc.FrustumHFovInRadians); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3203
 * 
 *     @property
 *     def horizontalFov(self):             # <<<<<<<<<<<<<<
 *         """Horizontal FOV of the sensor in radians (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumHFovInRadians
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.horizontalFov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3208
 * 
 *     @property
 *     def verticalFov(self):             # <<<<<<<<<<<<<<
 *         """Vertical FOV of the sensor in radians (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumVFovInRadians
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11verticalFov_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11verticalFov_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11verticalFov___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11verticalFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3210
 *     def verticalFov(self):
 *         """Vertical FOV of the sensor in radians (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumVFovInRadians             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_ovrTrackerDesc.FrustumVFovInRadians); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3208
 * 
 *     @property
 *     def verticalFov(self):             # <<<<<<<<<<<<<<
 *         """Vertical FOV of the sensor in radians (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumVFovInRadians
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.verticalFov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3213
 * 
 *     @property
 *     def nearZ(self):             # <<<<<<<<<<<<<<
 *         """Near clipping plane of the sensor frustum in meters (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumNearZInMeters
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_5nearZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_5nearZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_5nearZ___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_5nearZ___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3215
 *     def nearZ(self):
 *         """Near clipping plane of the sensor frustum in meters (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumNearZInMeters             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_ovrTrackerDesc.FrustumNearZInMeters); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3213
 * 
 *     @property
 *     def nearZ(self):             # <<<<<<<<<<<<<<
 *         """Near clipping plane of the sensor frustum in meters (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumNearZInMeters
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.nearZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3218
 * 
 *     @property
 *     def farZ(self):             # <<<<<<<<<<<<<<
 *         """Far clipping plane of the sensor frustum in meters (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumFarZInMeters
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4farZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4farZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4farZ___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4farZ___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3220
 *     def farZ(self):
 *         """Far clipping plane of the sensor frustum in meters (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumFarZInMeters             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_ovrTrackerDesc.FrustumFarZInMeters); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3218
 * 
 *     @property
 *     def farZ(self):             # <<<<<<<<<<<<<<
 *         """Far clipping plane of the sensor frustum in meters (read-only)."""
 *         return self.c_ovrTrackerDesc.FrustumFarZInMeters
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.farZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4__reduce_cython__[] = "LibOVRTrackerInfo.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_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_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_6__setstate_cython__[] = "LibOVRTrackerInfo.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_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_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_6__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRTrackerInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3231
 *     cdef bint ptr_owner
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__[] = "\n        Attributes\n        ----------\n        hmdType : int\n        hasOrientationTracking : bool\n        hasPositionTracking : bool\n        hasMagYawCorrection : bool\n        isDebugDevice : bool\n        productName : str\n        manufacturer : str\n        serialNumber : str\n        resolution : tuple\n        refreshRate : float\n        hid : tuple\n        firmwareVersion : tuple\n        defaultEyeFov : tuple (ndarray and ndarray)\n        maxEyeFov : tuple (ndarray and ndarray)\n        symmetricEyeFov : tuple (ndarray and ndarray)\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psychxr/libovr/_libovr.pyx":3252
 * 
 *         """
 *         self.newStruct()             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  ((struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self->__pyx_vtab)->newStruct(__pyx_v_self);

  /* "psychxr/libovr/_libovr.pyx":3231
 *     cdef bint ptr_owner
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

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

/* "psychxr/libovr/_libovr.pyx":3254
 *         self.newStruct()
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3__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_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/libovr/_libovr.pyx":3255
 * 
 *     def __cinit__(self):
 *         self.ptr_owner = False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_v_self->ptr_owner = 0;

  /* "psychxr/libovr/_libovr.pyx":3254
 *         self.newStruct()
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":3258
 * 
 *     @staticmethod
 *     cdef LibOVRHmdInfo fromPtr(capi.ovrHmdDesc* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRHmdInfo wrapper = LibOVRHmdInfo.__new__(LibOVRHmdInfo)
 */

static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_f_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr(ovrHmdDesc *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr *__pyx_optional_args) {
  int __pyx_v_owner = ((int)0);
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_wrapper = 0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fromPtr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_owner = __pyx_optional_args->owner;
    }
  }

  /* "psychxr/libovr/_libovr.pyx":3260
 *     cdef LibOVRHmdInfo fromPtr(capi.ovrHmdDesc* ptr, bint owner=False):
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRHmdInfo wrapper = LibOVRHmdInfo.__new__(LibOVRHmdInfo)             # <<<<<<<<<<<<<<
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHmdInfo(((PyTypeObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHmdInfo), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3260, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_wrapper = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3261
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRHmdInfo wrapper = LibOVRHmdInfo.__new__(LibOVRHmdInfo)
 *         wrapper.c_data = ptr             # <<<<<<<<<<<<<<
 *         wrapper.ptr_owner = owner
 * 
 */
  __pyx_v_wrapper->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":3262
 *         cdef LibOVRHmdInfo wrapper = LibOVRHmdInfo.__new__(LibOVRHmdInfo)
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner             # <<<<<<<<<<<<<<
 * 
 *         return wrapper
 */
  __pyx_v_wrapper->ptr_owner = __pyx_v_owner;

  /* "psychxr/libovr/_libovr.pyx":3264
 *         wrapper.ptr_owner = owner
 * 
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cdef void newStruct(self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_wrapper));
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3258
 * 
 *     @staticmethod
 *     cdef LibOVRHmdInfo fromPtr(capi.ovrHmdDesc* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         # bypass __init__ if wrapping a pointer
 *         cdef LibOVRHmdInfo wrapper = LibOVRHmdInfo.__new__(LibOVRHmdInfo)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.fromPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3266
 *         return wrapper
 * 
 *     cdef void newStruct(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:  # already allocated, __init__ called twice?
 *             return
 */

static void __pyx_f_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_newStruct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  ovrHmdDesc *__pyx_v__ptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("newStruct", 0);

  /* "psychxr/libovr/_libovr.pyx":3267
 * 
 *     cdef void newStruct(self):
 *         if self.c_data is not NULL:  # already allocated, __init__ called twice?             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":3268
 *     cdef void newStruct(self):
 *         if self.c_data is not NULL:  # already allocated, __init__ called twice?
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef capi.ovrHmdDesc* _ptr = <capi.ovrHmdDesc*>PyMem_Malloc(
 */
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":3267
 * 
 *     cdef void newStruct(self):
 *         if self.c_data is not NULL:  # already allocated, __init__ called twice?             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3270
 *             return
 * 
 *         cdef capi.ovrHmdDesc* _ptr = <capi.ovrHmdDesc*>PyMem_Malloc(             # <<<<<<<<<<<<<<
 *             sizeof(capi.ovrHmdDesc))
 * 
 */
  __pyx_v__ptr = ((ovrHmdDesc *)PyMem_Malloc((sizeof(ovrHmdDesc))));

  /* "psychxr/libovr/_libovr.pyx":3273
 *             sizeof(capi.ovrHmdDesc))
 * 
 *         if _ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v__ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":3274
 * 
 *         if _ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         self.c_data = _ptr
 */
    PyErr_NoMemory(); __PYX_ERR(0, 3274, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":3273
 *             sizeof(capi.ovrHmdDesc))
 * 
 *         if _ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3276
 *             raise MemoryError
 * 
 *         self.c_data = _ptr             # <<<<<<<<<<<<<<
 *         self.ptr_owner = True
 * 
 */
  __pyx_v_self->c_data = __pyx_v__ptr;

  /* "psychxr/libovr/_libovr.pyx":3277
 * 
 *         self.c_data = _ptr
 *         self.ptr_owner = True             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->ptr_owner = 1;

  /* "psychxr/libovr/_libovr.pyx":3266
 *         return wrapper
 * 
 *     cdef void newStruct(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:  # already allocated, __init__ called twice?
 *             return
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.LibOVRHmdInfo.newStruct", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "psychxr/libovr/_libovr.pyx":3279
 *         self.ptr_owner = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL and self.ptr_owner is True:
 *             PyMem_Free(self.c_data)
 */

/* Python wrapper */
static void __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_4__dealloc__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static void __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "psychxr/libovr/_libovr.pyx":3280
 * 
 *     def __dealloc__(self):
 *         if self.c_data is not NULL and self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *             PyMem_Free(self.c_data)
 *             self.c_data = NULL
 */
  __pyx_t_2 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_self->ptr_owner == 1) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":3281
 *     def __dealloc__(self):
 *         if self.c_data is not NULL and self.ptr_owner is True:
 *             PyMem_Free(self.c_data)             # <<<<<<<<<<<<<<
 *             self.c_data = NULL
 * 
 */
    PyMem_Free(__pyx_v_self->c_data);

    /* "psychxr/libovr/_libovr.pyx":3282
 *         if self.c_data is not NULL and self.ptr_owner is True:
 *             PyMem_Free(self.c_data)
 *             self.c_data = NULL             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __pyx_v_self->c_data = NULL;

    /* "psychxr/libovr/_libovr.pyx":3280
 * 
 *     def __dealloc__(self):
 *         if self.c_data is not NULL and self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *             PyMem_Free(self.c_data)
 *             self.c_data = NULL
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3279
 *         self.ptr_owner = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL and self.ptr_owner is True:
 *             PyMem_Free(self.c_data)
 */

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

/* "psychxr/libovr/_libovr.pyx":3285
 * 
 *     @property
 *     def hmdType(self):             # <<<<<<<<<<<<<<
 *         """HMD type currently used.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7hmdType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7hmdType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7hmdType___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7hmdType___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3293
 * 
 *         """
 *         return <int>self.c_data.Type             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_data->Type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3285
 * 
 *     @property
 *     def hmdType(self):             # <<<<<<<<<<<<<<
 *         """HMD type currently used.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.hmdType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3296
 * 
 *     @property
 *     def hasOrientationTracking(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is capable of tracking orientation."""
 *         return (self.c_data.AvailableTrackingCaps &
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_22hasOrientationTracking_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_22hasOrientationTracking_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_22hasOrientationTracking___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_22hasOrientationTracking___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3298
 *     def hasOrientationTracking(self):
 *         """``True`` if the HMD is capable of tracking orientation."""
 *         return (self.c_data.AvailableTrackingCaps &             # <<<<<<<<<<<<<<
 *                 capi.ovrTrackingCap_Orientation) == \
 *                capi.ovrTrackingCap_Orientation
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":3299
 *         """``True`` if the HMD is capable of tracking orientation."""
 *         return (self.c_data.AvailableTrackingCaps &
 *                 capi.ovrTrackingCap_Orientation) == \             # <<<<<<<<<<<<<<
 *                capi.ovrTrackingCap_Orientation
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->c_data->AvailableTrackingCaps & ovrTrackingCap_Orientation) == ovrTrackingCap_Orientation)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3296
 * 
 *     @property
 *     def hasOrientationTracking(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is capable of tracking orientation."""
 *         return (self.c_data.AvailableTrackingCaps &
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.hasOrientationTracking.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3303
 * 
 *     @property
 *     def hasPositionTracking(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is capable of tracking position."""
 *         return (self.c_data.AvailableTrackingCaps &
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasPositionTracking_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasPositionTracking_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasPositionTracking___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasPositionTracking___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3305
 *     def hasPositionTracking(self):
 *         """``True`` if the HMD is capable of tracking position."""
 *         return (self.c_data.AvailableTrackingCaps &             # <<<<<<<<<<<<<<
 *                 capi.ovrTrackingCap_Position) == capi.ovrTrackingCap_Position
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":3306
 *         """``True`` if the HMD is capable of tracking position."""
 *         return (self.c_data.AvailableTrackingCaps &
 *                 capi.ovrTrackingCap_Position) == capi.ovrTrackingCap_Position             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->c_data->AvailableTrackingCaps & ovrTrackingCap_Position) == ovrTrackingCap_Position)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3303
 * 
 *     @property
 *     def hasPositionTracking(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is capable of tracking position."""
 *         return (self.c_data.AvailableTrackingCaps &
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.hasPositionTracking.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3309
 * 
 *     @property
 *     def hasMagYawCorrection(self):             # <<<<<<<<<<<<<<
 *         """``True`` if this HMD supports yaw drift correction."""
 *         return (self.c_data.AvailableTrackingCaps &
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasMagYawCorrection_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasMagYawCorrection_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasMagYawCorrection___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasMagYawCorrection___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3311
 *     def hasMagYawCorrection(self):
 *         """``True`` if this HMD supports yaw drift correction."""
 *         return (self.c_data.AvailableTrackingCaps &             # <<<<<<<<<<<<<<
 *                 capi.ovrTrackingCap_MagYawCorrection) == \
 *                capi.ovrTrackingCap_MagYawCorrection
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":3312
 *         """``True`` if this HMD supports yaw drift correction."""
 *         return (self.c_data.AvailableTrackingCaps &
 *                 capi.ovrTrackingCap_MagYawCorrection) == \             # <<<<<<<<<<<<<<
 *                capi.ovrTrackingCap_MagYawCorrection
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->c_data->AvailableTrackingCaps & ovrTrackingCap_MagYawCorrection) == ovrTrackingCap_MagYawCorrection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3309
 * 
 *     @property
 *     def hasMagYawCorrection(self):             # <<<<<<<<<<<<<<
 *         """``True`` if this HMD supports yaw drift correction."""
 *         return (self.c_data.AvailableTrackingCaps &
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.hasMagYawCorrection.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3316
 * 
 *     @property
 *     def isDebugDevice(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is a virtual debug device."""
 *         return (self.c_data.AvailableHmdCaps & capi.ovrHmdCap_DebugDevice) == \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13isDebugDevice_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13isDebugDevice_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13isDebugDevice___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13isDebugDevice___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3318
 *     def isDebugDevice(self):
 *         """``True`` if the HMD is a virtual debug device."""
 *         return (self.c_data.AvailableHmdCaps & capi.ovrHmdCap_DebugDevice) == \             # <<<<<<<<<<<<<<
 *                capi.ovrHmdCap_DebugDevice
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":3319
 *         """``True`` if the HMD is a virtual debug device."""
 *         return (self.c_data.AvailableHmdCaps & capi.ovrHmdCap_DebugDevice) == \
 *                capi.ovrHmdCap_DebugDevice             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->c_data->AvailableHmdCaps & ovrHmdCap_DebugDevice) == ovrHmdCap_DebugDevice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3316
 * 
 *     @property
 *     def isDebugDevice(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is a virtual debug device."""
 *         return (self.c_data.AvailableHmdCaps & capi.ovrHmdCap_DebugDevice) == \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.isDebugDevice.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3322
 * 
 *     @property
 *     def productName(self):             # <<<<<<<<<<<<<<
 *         """Get the product name for this device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11productName_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11productName_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11productName___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11productName___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3331
 * 
 *         """
 *         return self.c_data[0].ProductName.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__pyx_v_self->c_data[0]).ProductName;
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3322
 * 
 *     @property
 *     def productName(self):             # <<<<<<<<<<<<<<
 *         """Get the product name for this device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.productName.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3334
 * 
 *     @property
 *     def manufacturer(self):             # <<<<<<<<<<<<<<
 *         """Get the device manufacturer name.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12manufacturer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12manufacturer_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12manufacturer___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12manufacturer___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3343
 * 
 *         """
 *         return self.c_data[0].Manufacturer.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__pyx_v_self->c_data[0]).Manufacturer;
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3334
 * 
 *     @property
 *     def manufacturer(self):             # <<<<<<<<<<<<<<
 *         """Get the device manufacturer name.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.manufacturer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3346
 * 
 *     @property
 *     def serialNumber(self):             # <<<<<<<<<<<<<<
 *         """Get the device serial number.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12serialNumber_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12serialNumber_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12serialNumber___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12serialNumber___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3355
 * 
 *         """
 *         return self.c_data[0].SerialNumber.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__pyx_v_self->c_data[0]).SerialNumber;
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3346
 * 
 *     @property
 *     def serialNumber(self):             # <<<<<<<<<<<<<<
 *         """Get the device serial number.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.serialNumber.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3358
 * 
 *     @property
 *     def resolution(self):             # <<<<<<<<<<<<<<
 *         """Horizontal and vertical resolution of the display in pixels.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_10resolution_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_10resolution_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_10resolution___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_10resolution___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3367
 * 
 *         """
 *         return np.asarray((self.c_data[0].Resolution.w,             # <<<<<<<<<<<<<<
 *                            self.c_data[0].Resolution.h), dtype=int)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->c_data[0]).Resolution.w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":3368
 *         """
 *         return np.asarray((self.c_data[0].Resolution.w,
 *                            self.c_data[0].Resolution.h), dtype=int)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_self->c_data[0]).Resolution.h); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3367
 * 
 *         """
 *         return np.asarray((self.c_data[0].Resolution.w,             # <<<<<<<<<<<<<<
 *                            self.c_data[0].Resolution.h), dtype=int)
 * 
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "psychxr/libovr/_libovr.pyx":3368
 *         """
 *         return np.asarray((self.c_data[0].Resolution.w,
 *                            self.c_data[0].Resolution.h), dtype=int)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 3368, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":3367
 * 
 *         """
 *         return np.asarray((self.c_data[0].Resolution.w,             # <<<<<<<<<<<<<<
 *                            self.c_data[0].Resolution.h), dtype=int)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3358
 * 
 *     @property
 *     def resolution(self):             # <<<<<<<<<<<<<<
 *         """Horizontal and vertical resolution of the display in pixels.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.resolution.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3371
 * 
 *     @property
 *     def refreshRate(self):             # <<<<<<<<<<<<<<
 *         """Nominal refresh rate in Hertz of the display.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11refreshRate_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11refreshRate_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11refreshRate___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11refreshRate___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3380
 * 
 *         """
 *         return <float>self.c_data[0].DisplayRefreshRate             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((float)(__pyx_v_self->c_data[0]).DisplayRefreshRate)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3371
 * 
 *     @property
 *     def refreshRate(self):             # <<<<<<<<<<<<<<
 *         """Nominal refresh rate in Hertz of the display.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.refreshRate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3383
 * 
 *     @property
 *     def hid(self):             # <<<<<<<<<<<<<<
 *         """USB human interface device class identifiers.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3hid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3hid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3hid___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3hid___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3392
 * 
 *         """
 *         return <int>self.c_data[0].VendorId, <int>self.c_data[0].ProductId             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)(__pyx_v_self->c_data[0]).VendorId)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(((int)(__pyx_v_self->c_data[0]).ProductId)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3383
 * 
 *     @property
 *     def hid(self):             # <<<<<<<<<<<<<<
 *         """USB human interface device class identifiers.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.hid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3395
 * 
 *     @property
 *     def firmwareVersion(self):             # <<<<<<<<<<<<<<
 *         """Firmware version for this device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15firmwareVersion_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15firmwareVersion_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15firmwareVersion___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15firmwareVersion___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3404
 * 
 *         """
 *         return <int>self.c_data[0].FirmwareMajor, \             # <<<<<<<<<<<<<<
 *                <int>self.c_data[0].FirmwareMinor
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)(__pyx_v_self->c_data[0]).FirmwareMajor)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":3405
 *         """
 *         return <int>self.c_data[0].FirmwareMajor, \
 *                <int>self.c_data[0].FirmwareMinor             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(((int)(__pyx_v_self->c_data[0]).FirmwareMinor)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":3404
 * 
 *         """
 *         return <int>self.c_data[0].FirmwareMajor, \             # <<<<<<<<<<<<<<
 *                <int>self.c_data[0].FirmwareMinor
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3395
 * 
 *     @property
 *     def firmwareVersion(self):             # <<<<<<<<<<<<<<
 *         """Firmware version for this device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.firmwareVersion.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3408
 * 
 *     @property
 *     def defaultEyeFov(self):             # <<<<<<<<<<<<<<
 *         """Default or recommended eye field-of-views (FOVs) provided by the API.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13defaultEyeFov_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13defaultEyeFov_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13defaultEyeFov___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13defaultEyeFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyArrayObject *__pyx_v_fovLeft = 0;
  PyArrayObject *__pyx_v_fovRight = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3418
 * 
 *         """
 *         cdef np.ndarray fovLeft = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[0].UpTan,
 *             self.c_data[0].DefaultEyeFov[0].DownTan,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3419
 *         """
 *         cdef np.ndarray fovLeft = np.asarray([
 *             self.c_data[0].DefaultEyeFov[0].UpTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[0].DownTan,
 *             self.c_data[0].DefaultEyeFov[0].LeftTan,
 */
  __pyx_t_1 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).DefaultEyeFov[0]).UpTan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":3420
 *         cdef np.ndarray fovLeft = np.asarray([
 *             self.c_data[0].DefaultEyeFov[0].UpTan,
 *             self.c_data[0].DefaultEyeFov[0].DownTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[0].LeftTan,
 *             self.c_data[0].DefaultEyeFov[0].RightTan],
 */
  __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).DefaultEyeFov[0]).DownTan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3421
 *             self.c_data[0].DefaultEyeFov[0].UpTan,
 *             self.c_data[0].DefaultEyeFov[0].DownTan,
 *             self.c_data[0].DefaultEyeFov[0].LeftTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[0].RightTan],
 *             dtype=np.float32)
 */
  __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).DefaultEyeFov[0]).LeftTan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":3422
 *             self.c_data[0].DefaultEyeFov[0].DownTan,
 *             self.c_data[0].DefaultEyeFov[0].LeftTan,
 *             self.c_data[0].DefaultEyeFov[0].RightTan],             # <<<<<<<<<<<<<<
 *             dtype=np.float32)
 * 
 */
  __pyx_t_5 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).DefaultEyeFov[0]).RightTan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "psychxr/libovr/_libovr.pyx":3418
 * 
 *         """
 *         cdef np.ndarray fovLeft = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[0].UpTan,
 *             self.c_data[0].DefaultEyeFov[0].DownTan,
 */
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":3423
 *             self.c_data[0].DefaultEyeFov[0].LeftTan,
 *             self.c_data[0].DefaultEyeFov[0].RightTan],
 *             dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         cdef np.ndarray fovRight = np.asarray([
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3418
 * 
 *         """
 *         cdef np.ndarray fovLeft = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[0].UpTan,
 *             self.c_data[0].DefaultEyeFov[0].DownTan,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3418, __pyx_L1_error)
  __pyx_v_fovLeft = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3425
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray fovRight = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[1].UpTan,
 *             self.c_data[0].DefaultEyeFov[1].DownTan,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3426
 * 
 *         cdef np.ndarray fovRight = np.asarray([
 *             self.c_data[0].DefaultEyeFov[1].UpTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[1].DownTan,
 *             self.c_data[0].DefaultEyeFov[1].LeftTan,
 */
  __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).DefaultEyeFov[1]).UpTan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3427
 *         cdef np.ndarray fovRight = np.asarray([
 *             self.c_data[0].DefaultEyeFov[1].UpTan,
 *             self.c_data[0].DefaultEyeFov[1].DownTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[1].LeftTan,
 *             self.c_data[0].DefaultEyeFov[1].RightTan],
 */
  __pyx_t_5 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).DefaultEyeFov[1]).DownTan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "psychxr/libovr/_libovr.pyx":3428
 *             self.c_data[0].DefaultEyeFov[1].UpTan,
 *             self.c_data[0].DefaultEyeFov[1].DownTan,
 *             self.c_data[0].DefaultEyeFov[1].LeftTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[1].RightTan],
 *             dtype=np.float32)
 */
  __pyx_t_2 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).DefaultEyeFov[1]).LeftTan); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":3429
 *             self.c_data[0].DefaultEyeFov[1].DownTan,
 *             self.c_data[0].DefaultEyeFov[1].LeftTan,
 *             self.c_data[0].DefaultEyeFov[1].RightTan],             # <<<<<<<<<<<<<<
 *             dtype=np.float32)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).DefaultEyeFov[1]).RightTan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":3425
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray fovRight = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[1].UpTan,
 *             self.c_data[0].DefaultEyeFov[1].DownTan,
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3430
 *             self.c_data[0].DefaultEyeFov[1].LeftTan,
 *             self.c_data[0].DefaultEyeFov[1].RightTan],
 *             dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         return fovLeft, fovRight
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 3430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3425
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray fovRight = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].DefaultEyeFov[1].UpTan,
 *             self.c_data[0].DefaultEyeFov[1].DownTan,
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3425, __pyx_L1_error)
  __pyx_v_fovRight = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3432
 *             dtype=np.float32)
 * 
 *         return fovLeft, fovRight             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_fovLeft));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_fovLeft));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_fovLeft));
  __Pyx_INCREF(((PyObject *)__pyx_v_fovRight));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_fovRight));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_fovRight));
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3408
 * 
 *     @property
 *     def defaultEyeFov(self):             # <<<<<<<<<<<<<<
 *         """Default or recommended eye field-of-views (FOVs) provided by the API.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.defaultEyeFov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fovLeft);
  __Pyx_XDECREF((PyObject *)__pyx_v_fovRight);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3435
 * 
 *     @property
 *     def maxEyeFov(self):             # <<<<<<<<<<<<<<
 *         """Maximum eye field-of-views (FOVs) provided by the API.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9maxEyeFov_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9maxEyeFov_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9maxEyeFov___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9maxEyeFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyArrayObject *__pyx_v_fov_left = 0;
  PyArrayObject *__pyx_v_fov_right = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fov_left;
  __Pyx_Buffer __pyx_pybuffer_fov_left;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fov_right;
  __Pyx_Buffer __pyx_pybuffer_fov_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_pybuffer_fov_left.pybuffer.buf = NULL;
  __pyx_pybuffer_fov_left.refcount = 0;
  __pyx_pybuffernd_fov_left.data = NULL;
  __pyx_pybuffernd_fov_left.rcbuffer = &__pyx_pybuffer_fov_left;
  __pyx_pybuffer_fov_right.pybuffer.buf = NULL;
  __pyx_pybuffer_fov_right.refcount = 0;
  __pyx_pybuffernd_fov_right.data = NULL;
  __pyx_pybuffernd_fov_right.rcbuffer = &__pyx_pybuffer_fov_right;

  /* "psychxr/libovr/_libovr.pyx":3445
 * 
 *         """
 *         cdef np.ndarray[float, ndim=1] fov_left = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[0].UpTan,
 *             self.c_data[0].MaxEyeFov[0].DownTan,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3446
 *         """
 *         cdef np.ndarray[float, ndim=1] fov_left = np.asarray([
 *             self.c_data[0].MaxEyeFov[0].UpTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[0].DownTan,
 *             self.c_data[0].MaxEyeFov[0].LeftTan,
 */
  __pyx_t_1 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).MaxEyeFov[0]).UpTan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":3447
 *         cdef np.ndarray[float, ndim=1] fov_left = np.asarray([
 *             self.c_data[0].MaxEyeFov[0].UpTan,
 *             self.c_data[0].MaxEyeFov[0].DownTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[0].LeftTan,
 *             self.c_data[0].MaxEyeFov[0].RightTan],
 */
  __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).MaxEyeFov[0]).DownTan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3448
 *             self.c_data[0].MaxEyeFov[0].UpTan,
 *             self.c_data[0].MaxEyeFov[0].DownTan,
 *             self.c_data[0].MaxEyeFov[0].LeftTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[0].RightTan],
 *             dtype=np.float32)
 */
  __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).MaxEyeFov[0]).LeftTan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":3449
 *             self.c_data[0].MaxEyeFov[0].DownTan,
 *             self.c_data[0].MaxEyeFov[0].LeftTan,
 *             self.c_data[0].MaxEyeFov[0].RightTan],             # <<<<<<<<<<<<<<
 *             dtype=np.float32)
 * 
 */
  __pyx_t_5 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).MaxEyeFov[0]).RightTan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "psychxr/libovr/_libovr.pyx":3445
 * 
 *         """
 *         cdef np.ndarray[float, ndim=1] fov_left = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[0].UpTan,
 *             self.c_data[0].MaxEyeFov[0].DownTan,
 */
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":3450
 *             self.c_data[0].MaxEyeFov[0].LeftTan,
 *             self.c_data[0].MaxEyeFov[0].RightTan],
 *             dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right = np.asarray([
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3445
 * 
 *         """
 *         cdef np.ndarray[float, ndim=1] fov_left = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[0].UpTan,
 *             self.c_data[0].MaxEyeFov[0].DownTan,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3445, __pyx_L1_error)
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fov_left.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_fov_left = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_fov_left.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 3445, __pyx_L1_error)
    } else {__pyx_pybuffernd_fov_left.diminfo[0].strides = __pyx_pybuffernd_fov_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fov_left.diminfo[0].shape = __pyx_pybuffernd_fov_left.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_fov_left = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3452
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[1].UpTan,
 *             self.c_data[0].MaxEyeFov[1].DownTan,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3453
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right = np.asarray([
 *             self.c_data[0].MaxEyeFov[1].UpTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[1].DownTan,
 *             self.c_data[0].MaxEyeFov[1].LeftTan,
 */
  __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).MaxEyeFov[1]).UpTan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3454
 *         cdef np.ndarray[float, ndim=1] fov_right = np.asarray([
 *             self.c_data[0].MaxEyeFov[1].UpTan,
 *             self.c_data[0].MaxEyeFov[1].DownTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[1].LeftTan,
 *             self.c_data[0].MaxEyeFov[1].RightTan],
 */
  __pyx_t_5 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).MaxEyeFov[1]).DownTan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "psychxr/libovr/_libovr.pyx":3455
 *             self.c_data[0].MaxEyeFov[1].UpTan,
 *             self.c_data[0].MaxEyeFov[1].DownTan,
 *             self.c_data[0].MaxEyeFov[1].LeftTan,             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[1].RightTan],
 *             dtype=np.float32)
 */
  __pyx_t_2 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).MaxEyeFov[1]).LeftTan); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":3456
 *             self.c_data[0].MaxEyeFov[1].DownTan,
 *             self.c_data[0].MaxEyeFov[1].LeftTan,
 *             self.c_data[0].MaxEyeFov[1].RightTan],             # <<<<<<<<<<<<<<
 *             dtype=np.float32)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_self->c_data[0]).MaxEyeFov[1]).RightTan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":3452
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[1].UpTan,
 *             self.c_data[0].MaxEyeFov[1].DownTan,
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3457
 *             self.c_data[0].MaxEyeFov[1].LeftTan,
 *             self.c_data[0].MaxEyeFov[1].RightTan],
 *             dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         return fov_left, fov_right
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3452
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data[0].MaxEyeFov[1].UpTan,
 *             self.c_data[0].MaxEyeFov[1].DownTan,
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3452, __pyx_L1_error)
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fov_right.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_fov_right = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_fov_right.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 3452, __pyx_L1_error)
    } else {__pyx_pybuffernd_fov_right.diminfo[0].strides = __pyx_pybuffernd_fov_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fov_right.diminfo[0].shape = __pyx_pybuffernd_fov_right.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_fov_right = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3459
 *             dtype=np.float32)
 * 
 *         return fov_left, fov_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_fov_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_fov_left));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_fov_left));
  __Pyx_INCREF(((PyObject *)__pyx_v_fov_right));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_fov_right));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_fov_right));
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3435
 * 
 *     @property
 *     def maxEyeFov(self):             # <<<<<<<<<<<<<<
 *         """Maximum eye field-of-views (FOVs) provided by the API.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fov_left.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fov_right.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.maxEyeFov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fov_left.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fov_right.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fov_left);
  __Pyx_XDECREF((PyObject *)__pyx_v_fov_right);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3462
 * 
 *     @property
 *     def symmetricEyeFov(self):             # <<<<<<<<<<<<<<
 *         """Symmetric field-of-views (FOVs) for mono rendering.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15symmetricEyeFov_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15symmetricEyeFov_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15symmetricEyeFov___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15symmetricEyeFov___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  OVR::FovPort __pyx_v_fov_left;
  OVR::FovPort __pyx_v_fov_right;
  OVR::FovPort __pyx_v_fov_max;
  float __pyx_v_tan_half_fov_horz;
  CYTHON_UNUSED float __pyx_v_tan_half_fov_vert;
  ovrFovPort __pyx_v_fov_both;
  PyArrayObject *__pyx_v_fov_left_out = 0;
  PyArrayObject *__pyx_v_fov_right_out = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fov_left_out;
  __Pyx_Buffer __pyx_pybuffer_fov_left_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fov_right_out;
  __Pyx_Buffer __pyx_pybuffer_fov_right_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_pybuffer_fov_left_out.pybuffer.buf = NULL;
  __pyx_pybuffer_fov_left_out.refcount = 0;
  __pyx_pybuffernd_fov_left_out.data = NULL;
  __pyx_pybuffernd_fov_left_out.rcbuffer = &__pyx_pybuffer_fov_left_out;
  __pyx_pybuffer_fov_right_out.pybuffer.buf = NULL;
  __pyx_pybuffer_fov_right_out.refcount = 0;
  __pyx_pybuffernd_fov_right_out.data = NULL;
  __pyx_pybuffernd_fov_right_out.rcbuffer = &__pyx_pybuffer_fov_right_out;

  /* "psychxr/libovr/_libovr.pyx":3477
 *         """
 *         cdef libovr_math.FovPort fov_left = \
 *             <libovr_math.FovPort>self.c_data[0].DefaultEyeFov[0]             # <<<<<<<<<<<<<<
 *         cdef libovr_math.FovPort fov_right = \
 *             <libovr_math.FovPort>self.c_data[0].DefaultEyeFov[1]
 */
  __pyx_v_fov_left = ((OVR::FovPort)((__pyx_v_self->c_data[0]).DefaultEyeFov[0]));

  /* "psychxr/libovr/_libovr.pyx":3479
 *             <libovr_math.FovPort>self.c_data[0].DefaultEyeFov[0]
 *         cdef libovr_math.FovPort fov_right = \
 *             <libovr_math.FovPort>self.c_data[0].DefaultEyeFov[1]             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.FovPort fov_max = libovr_math.FovPort.Max(
 */
  __pyx_v_fov_right = ((OVR::FovPort)((__pyx_v_self->c_data[0]).DefaultEyeFov[1]));

  /* "psychxr/libovr/_libovr.pyx":3481
 *             <libovr_math.FovPort>self.c_data[0].DefaultEyeFov[1]
 * 
 *         cdef libovr_math.FovPort fov_max = libovr_math.FovPort.Max(             # <<<<<<<<<<<<<<
 *             <libovr_math.FovPort>fov_left, <libovr_math.FovPort>fov_right)
 * 
 */
  __pyx_v_fov_max = OVR::FovPort::Max(((OVR::FovPort)__pyx_v_fov_left), ((OVR::FovPort)__pyx_v_fov_right));

  /* "psychxr/libovr/_libovr.pyx":3484
 *             <libovr_math.FovPort>fov_left, <libovr_math.FovPort>fov_right)
 * 
 *         cdef float tan_half_fov_horz = maxf(fov_max.LeftTan, fov_max.RightTan)             # <<<<<<<<<<<<<<
 *         cdef float tan_half_fov_vert = maxf(fov_max.DownTan, fov_max.UpTan)
 * 
 */
  __pyx_v_tan_half_fov_horz = __pyx_f_7psychxr_6libovr_7_libovr_maxf(__pyx_v_fov_max.LeftTan, __pyx_v_fov_max.RightTan);

  /* "psychxr/libovr/_libovr.pyx":3485
 * 
 *         cdef float tan_half_fov_horz = maxf(fov_max.LeftTan, fov_max.RightTan)
 *         cdef float tan_half_fov_vert = maxf(fov_max.DownTan, fov_max.UpTan)             # <<<<<<<<<<<<<<
 * 
 *         cdef capi.ovrFovPort fov_both
 */
  __pyx_v_tan_half_fov_vert = __pyx_f_7psychxr_6libovr_7_libovr_maxf(__pyx_v_fov_max.DownTan, __pyx_v_fov_max.UpTan);

  /* "psychxr/libovr/_libovr.pyx":3488
 * 
 *         cdef capi.ovrFovPort fov_both
 *         fov_both.LeftTan = fov_both.RightTan = tan_half_fov_horz             # <<<<<<<<<<<<<<
 *         fov_both.UpTan = fov_both.DownTan = tan_half_fov_horz
 * 
 */
  __pyx_v_fov_both.LeftTan = __pyx_v_tan_half_fov_horz;
  __pyx_v_fov_both.RightTan = __pyx_v_tan_half_fov_horz;

  /* "psychxr/libovr/_libovr.pyx":3489
 *         cdef capi.ovrFovPort fov_both
 *         fov_both.LeftTan = fov_both.RightTan = tan_half_fov_horz
 *         fov_both.UpTan = fov_both.DownTan = tan_half_fov_horz             # <<<<<<<<<<<<<<
 * 
 *         cdef np.ndarray[float, ndim=1] fov_left_out = np.asarray([
 */
  __pyx_v_fov_both.UpTan = __pyx_v_tan_half_fov_horz;
  __pyx_v_fov_both.DownTan = __pyx_v_tan_half_fov_horz;

  /* "psychxr/libovr/_libovr.pyx":3491
 *         fov_both.UpTan = fov_both.DownTan = tan_half_fov_horz
 * 
 *         cdef np.ndarray[float, ndim=1] fov_left_out = np.asarray([             # <<<<<<<<<<<<<<
 *             fov_both.UpTan,
 *             fov_both.DownTan,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3492
 * 
 *         cdef np.ndarray[float, ndim=1] fov_left_out = np.asarray([
 *             fov_both.UpTan,             # <<<<<<<<<<<<<<
 *             fov_both.DownTan,
 *             fov_both.LeftTan,
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_fov_both.UpTan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":3493
 *         cdef np.ndarray[float, ndim=1] fov_left_out = np.asarray([
 *             fov_both.UpTan,
 *             fov_both.DownTan,             # <<<<<<<<<<<<<<
 *             fov_both.LeftTan,
 *             fov_both.RightTan],
 */
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fov_both.DownTan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3494
 *             fov_both.UpTan,
 *             fov_both.DownTan,
 *             fov_both.LeftTan,             # <<<<<<<<<<<<<<
 *             fov_both.RightTan],
 *             dtype=np.float32)
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_fov_both.LeftTan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":3495
 *             fov_both.DownTan,
 *             fov_both.LeftTan,
 *             fov_both.RightTan],             # <<<<<<<<<<<<<<
 *             dtype=np.float32)
 * 
 */
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_fov_both.RightTan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "psychxr/libovr/_libovr.pyx":3491
 *         fov_both.UpTan = fov_both.DownTan = tan_half_fov_horz
 * 
 *         cdef np.ndarray[float, ndim=1] fov_left_out = np.asarray([             # <<<<<<<<<<<<<<
 *             fov_both.UpTan,
 *             fov_both.DownTan,
 */
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":3496
 *             fov_both.LeftTan,
 *             fov_both.RightTan],
 *             dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right_out = np.asarray([
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 3496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3491
 *         fov_both.UpTan = fov_both.DownTan = tan_half_fov_horz
 * 
 *         cdef np.ndarray[float, ndim=1] fov_left_out = np.asarray([             # <<<<<<<<<<<<<<
 *             fov_both.UpTan,
 *             fov_both.DownTan,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3491, __pyx_L1_error)
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fov_left_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_fov_left_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_fov_left_out.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 3491, __pyx_L1_error)
    } else {__pyx_pybuffernd_fov_left_out.diminfo[0].strides = __pyx_pybuffernd_fov_left_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fov_left_out.diminfo[0].shape = __pyx_pybuffernd_fov_left_out.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_fov_left_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3498
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right_out = np.asarray([             # <<<<<<<<<<<<<<
 *             fov_both.UpTan,
 *             fov_both.DownTan,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":3499
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right_out = np.asarray([
 *             fov_both.UpTan,             # <<<<<<<<<<<<<<
 *             fov_both.DownTan,
 *             fov_both.LeftTan,
 */
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fov_both.UpTan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3500
 *         cdef np.ndarray[float, ndim=1] fov_right_out = np.asarray([
 *             fov_both.UpTan,
 *             fov_both.DownTan,             # <<<<<<<<<<<<<<
 *             fov_both.LeftTan,
 *             fov_both.RightTan],
 */
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_fov_both.DownTan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "psychxr/libovr/_libovr.pyx":3501
 *             fov_both.UpTan,
 *             fov_both.DownTan,
 *             fov_both.LeftTan,             # <<<<<<<<<<<<<<
 *             fov_both.RightTan],
 *             dtype=np.float32)
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_fov_both.LeftTan); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":3502
 *             fov_both.DownTan,
 *             fov_both.LeftTan,
 *             fov_both.RightTan],             # <<<<<<<<<<<<<<
 *             dtype=np.float32)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_fov_both.RightTan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":3498
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right_out = np.asarray([             # <<<<<<<<<<<<<<
 *             fov_both.UpTan,
 *             fov_both.DownTan,
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3503
 *             fov_both.LeftTan,
 *             fov_both.RightTan],
 *             dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         return fov_left_out, fov_right_out
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3498
 *             dtype=np.float32)
 * 
 *         cdef np.ndarray[float, ndim=1] fov_right_out = np.asarray([             # <<<<<<<<<<<<<<
 *             fov_both.UpTan,
 *             fov_both.DownTan,
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3498, __pyx_L1_error)
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fov_right_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_fov_right_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_fov_right_out.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 3498, __pyx_L1_error)
    } else {__pyx_pybuffernd_fov_right_out.diminfo[0].strides = __pyx_pybuffernd_fov_right_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fov_right_out.diminfo[0].shape = __pyx_pybuffernd_fov_right_out.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_fov_right_out = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3505
 *             dtype=np.float32)
 * 
 *         return fov_left_out, fov_right_out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_fov_left_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_fov_left_out));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_fov_left_out));
  __Pyx_INCREF(((PyObject *)__pyx_v_fov_right_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_fov_right_out));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_fov_right_out));
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3462
 * 
 *     @property
 *     def symmetricEyeFov(self):             # <<<<<<<<<<<<<<
 *         """Symmetric field-of-views (FOVs) for mono rendering.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fov_left_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fov_right_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.symmetricEyeFov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fov_left_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fov_right_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fov_left_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_fov_right_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_6__reduce_cython__[] = "LibOVRHmdInfo.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7__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_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_6__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_8__setstate_cython__[] = "LibOVRHmdInfo.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9__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_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_8__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHmdInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3519
 *     cdef capi.ovrSessionStatus c_data
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__[] = "\n        Attributes\n        ----------\n        isVisible : bool\n        hmdPresent : bool\n        hmdMounted : bool\n        displayLost : bool\n        shouldQuit : bool\n        shouldRecenter : bool\n        hasInputFocus : bool\n        overlayPresent : bool\n        depthRequested : bool\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

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

/* "psychxr/libovr/_libovr.pyx":3536
 *         pass
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_3__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_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_2__cinit__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

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

/* "psychxr/libovr/_libovr.pyx":3539
 *         pass
 * 
 *     def __eq__(self, LibOVRSessionStatus other):             # <<<<<<<<<<<<<<
 *         """Equality test between status objects. Use this to check if the status
 *         is unchanged between two :func:`getSessionStatus` calls.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_5__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__[] = "Equality test between status objects. Use this to check if the status\n        is unchanged between two :func:`getSessionStatus` calls.\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__;
#endif
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_5__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, 1, "other", 0))) __PYX_ERR(0, 3539, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self), ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "psychxr/libovr/_libovr.pyx":3544
 * 
 *         """
 *         return (self.c_data.IsVisible == other.c_data.IsVisible and             # <<<<<<<<<<<<<<
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->c_data.IsVisible == __pyx_v_other->c_data.IsVisible);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3545
 *         """
 *         return (self.c_data.IsVisible == other.c_data.IsVisible and
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and             # <<<<<<<<<<<<<<
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 *                self.c_data.displayLost == other.c_data.displayLost and
 */
  __pyx_t_2 = (__pyx_v_self->c_data.HmdPresent == __pyx_v_other->c_data.HmdPresent);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3546
 *         return (self.c_data.IsVisible == other.c_data.IsVisible and
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and             # <<<<<<<<<<<<<<
 *                self.c_data.displayLost == other.c_data.displayLost and
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hmdMounted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hmdMounted); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3546, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3547
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 *                self.c_data.displayLost == other.c_data.displayLost and             # <<<<<<<<<<<<<<
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_displayLost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_displayLost); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3547, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3548
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 *                self.c_data.displayLost == other.c_data.displayLost and
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and             # <<<<<<<<<<<<<<
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shouldQuit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shouldQuit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3548, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3549
 *                self.c_data.displayLost == other.c_data.displayLost and
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and             # <<<<<<<<<<<<<<
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and
 *                self.c_data.overlayPresent == other.c_data.overlayPresent and
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shouldRecenter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shouldRecenter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3549, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3550
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and             # <<<<<<<<<<<<<<
 *                self.c_data.overlayPresent == other.c_data.overlayPresent and
 *                self.c_data.depthRequested == other.c_data.depthRequested)
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hasInputFocus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hasInputFocus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3550, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3551
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and
 *                self.c_data.overlayPresent == other.c_data.overlayPresent and             # <<<<<<<<<<<<<<
 *                self.c_data.depthRequested == other.c_data.depthRequested)
 * 
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_overlayPresent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_overlayPresent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3551, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3552
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and
 *                self.c_data.overlayPresent == other.c_data.overlayPresent and
 *                self.c_data.depthRequested == other.c_data.depthRequested)             # <<<<<<<<<<<<<<
 * 
 *     def __ne__(self, LibOVRSessionStatus other):
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_depthRequested); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_depthRequested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3539
 *         pass
 * 
 *     def __eq__(self, LibOVRSessionStatus other):             # <<<<<<<<<<<<<<
 *         """Equality test between status objects. Use this to check if the status
 *         is unchanged between two :func:`getSessionStatus` calls.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3554
 *                self.c_data.depthRequested == other.c_data.depthRequested)
 * 
 *     def __ne__(self, LibOVRSessionStatus other):             # <<<<<<<<<<<<<<
 *         """Equality test between status objects. Use this to check if the status
 *         differs between two :func:`getSessionStatus` calls.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_7__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__[] = "Equality test between status objects. Use this to check if the status\n        differs between two :func:`getSessionStatus` calls.\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__;
#endif
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_7__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, 1, "other", 0))) __PYX_ERR(0, 3554, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self), ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__ne__", 0);

  /* "psychxr/libovr/_libovr.pyx":3559
 * 
 *         """
 *         return not (self.c_data.IsVisible == other.c_data.IsVisible and             # <<<<<<<<<<<<<<
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((__pyx_v_self->c_data.IsVisible == __pyx_v_other->c_data.IsVisible) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3560
 *         """
 *         return not (self.c_data.IsVisible == other.c_data.IsVisible and
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and             # <<<<<<<<<<<<<<
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 *                self.c_data.displayLost == other.c_data.displayLost and
 */
  __pyx_t_2 = ((__pyx_v_self->c_data.HmdPresent == __pyx_v_other->c_data.HmdPresent) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3561
 *         return not (self.c_data.IsVisible == other.c_data.IsVisible and
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and             # <<<<<<<<<<<<<<
 *                self.c_data.displayLost == other.c_data.displayLost and
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hmdMounted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hmdMounted); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3562
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 *                self.c_data.displayLost == other.c_data.displayLost and             # <<<<<<<<<<<<<<
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_displayLost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_displayLost); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3563
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 *                self.c_data.displayLost == other.c_data.displayLost and
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and             # <<<<<<<<<<<<<<
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shouldQuit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shouldQuit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3564
 *                self.c_data.displayLost == other.c_data.displayLost and
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and             # <<<<<<<<<<<<<<
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and
 *                self.c_data.overlayPresent == other.c_data.overlayPresent and
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shouldRecenter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shouldRecenter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3565
 *                self.c_data.shouldQuit == other.c_data.shouldQuit and
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and             # <<<<<<<<<<<<<<
 *                self.c_data.overlayPresent == other.c_data.overlayPresent and
 *                self.c_data.depthRequested == other.c_data.depthRequested)
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hasInputFocus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hasInputFocus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3566
 *                self.c_data.shouldRecenter == other.c_data.shouldRecenter and
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and
 *                self.c_data.overlayPresent == other.c_data.overlayPresent and             # <<<<<<<<<<<<<<
 *                self.c_data.depthRequested == other.c_data.depthRequested)
 * 
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_overlayPresent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_overlayPresent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }

  /* "psychxr/libovr/_libovr.pyx":3567
 *                self.c_data.hasInputFocus == other.c_data.hasInputFocus and
 *                self.c_data.overlayPresent == other.c_data.overlayPresent and
 *                self.c_data.depthRequested == other.c_data.depthRequested)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_self->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_depthRequested); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_convert__to_py_ovrSessionStatus(__pyx_v_other->c_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_depthRequested); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;

  /* "psychxr/libovr/_libovr.pyx":3559
 * 
 *         """
 *         return not (self.c_data.IsVisible == other.c_data.IsVisible and             # <<<<<<<<<<<<<<
 *                self.c_data.HmdPresent == other.c_data.HmdPresent and
 *                self.c_data.hmdMounted == other.c_data.hmdMounted and
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3554
 *                self.c_data.depthRequested == other.c_data.depthRequested)
 * 
 *     def __ne__(self, LibOVRSessionStatus other):             # <<<<<<<<<<<<<<
 *         """Equality test between status objects. Use this to check if the status
 *         differs between two :func:`getSessionStatus` calls.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3570
 * 
 *     @property
 *     def isVisible(self):             # <<<<<<<<<<<<<<
 *         """``True`` the application has focus and visible in the HMD."""
 *         return self.c_data.IsVisible == capi.ovrTrue
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9isVisible_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9isVisible_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9isVisible___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9isVisible___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3572
 *     def isVisible(self):
 *         """``True`` the application has focus and visible in the HMD."""
 *         return self.c_data.IsVisible == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.IsVisible == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3570
 * 
 *     @property
 *     def isVisible(self):             # <<<<<<<<<<<<<<
 *         """``True`` the application has focus and visible in the HMD."""
 *         return self.c_data.IsVisible == capi.ovrTrue
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.isVisible.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3575
 * 
 *     @property
 *     def hmdPresent(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is present."""
 *         return self.c_data.HmdPresent == capi.ovrTrue
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdPresent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdPresent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdPresent___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdPresent___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3577
 *     def hmdPresent(self):
 *         """``True`` if the HMD is present."""
 *         return self.c_data.HmdPresent == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.HmdPresent == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3575
 * 
 *     @property
 *     def hmdPresent(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is present."""
 *         return self.c_data.HmdPresent == capi.ovrTrue
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.hmdPresent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3580
 * 
 *     @property
 *     def hmdMounted(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is being worn on the user's head."""
 *         return self.c_data.HmdMounted == capi.ovrTrue
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdMounted_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdMounted_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdMounted___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdMounted___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3582
 *     def hmdMounted(self):
 *         """``True`` if the HMD is being worn on the user's head."""
 *         return self.c_data.HmdMounted == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.HmdMounted == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3580
 * 
 *     @property
 *     def hmdMounted(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the HMD is being worn on the user's head."""
 *         return self.c_data.HmdMounted == capi.ovrTrue
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.hmdMounted.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3585
 * 
 *     @property
 *     def displayLost(self):             # <<<<<<<<<<<<<<
 *         """``True`` the the display was lost.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11displayLost_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11displayLost_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11displayLost___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11displayLost___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3593
 *         shutdown the application.
 *         """
 *         return self.c_data.DisplayLost == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.DisplayLost == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3585
 * 
 *     @property
 *     def displayLost(self):             # <<<<<<<<<<<<<<
 *         """``True`` the the display was lost.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.displayLost.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3596
 * 
 *     @property
 *     def shouldQuit(self):             # <<<<<<<<<<<<<<
 *         """``True`` the application was signaled to quit.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10shouldQuit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10shouldQuit_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10shouldQuit___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10shouldQuit___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3602
 *         system UI menu. You can ignore this flag if needed.
 *         """
 *         return self.c_data.ShouldQuit == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.ShouldQuit == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3596
 * 
 *     @property
 *     def shouldQuit(self):             # <<<<<<<<<<<<<<
 *         """``True`` the application was signaled to quit.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.shouldQuit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3605
 * 
 *     @property
 *     def shouldRecenter(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the application was signaled to recenter.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14shouldRecenter_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14shouldRecenter_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14shouldRecenter___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14shouldRecenter___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3614
 * 
 *         """
 *         return self.c_data.ShouldRecenter == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.ShouldRecenter == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3605
 * 
 *     @property
 *     def shouldRecenter(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the application was signaled to recenter.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.shouldRecenter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3617
 * 
 *     @property
 *     def hasInputFocus(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the application has input focus.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_13hasInputFocus_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_13hasInputFocus_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_13hasInputFocus___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_13hasInputFocus___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3624
 * 
 *         """
 *         return self.c_data.HasInputFocus == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.HasInputFocus == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3617
 * 
 *     @property
 *     def hasInputFocus(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the application has input focus.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.hasInputFocus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3627
 * 
 *     @property
 *     def overlayPresent(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the system UI is visible."""
 *         return self.c_data.OverlayPresent == capi.ovrTrue
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14overlayPresent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14overlayPresent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14overlayPresent___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14overlayPresent___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3629
 *     def overlayPresent(self):
 *         """``True`` if the system UI is visible."""
 *         return self.c_data.OverlayPresent == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.OverlayPresent == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3627
 * 
 *     @property
 *     def overlayPresent(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the system UI is visible."""
 *         return self.c_data.OverlayPresent == capi.ovrTrue
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.overlayPresent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3632
 * 
 *     @property
 *     def depthRequested(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the a depth texture is requested.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14depthRequested_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14depthRequested_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14depthRequested___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14depthRequested___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3640
 * 
 *         """
 *         return self.c_data.DepthRequested == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.DepthRequested == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3632
 * 
 *     @property
 *     def depthRequested(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the a depth texture is requested.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.depthRequested.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_8__reduce_cython__[] = "LibOVRSessionStatus.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_8__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10__setstate_cython__[] = "LibOVRSessionStatus.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRSessionStatus.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3650
 *     cdef capi.ovrBoundaryTestResult c_data
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__[] = "\n        Attributes\n        ----------\n        isTriggering : bool (read-only)\n        closestDistance : float (read-only)\n        closestPoint : ndarray (read-only)\n        closestPointNormal : ndarray (read-only)\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

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

/* "psychxr/libovr/_libovr.pyx":3662
 *         pass
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_3__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_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_2__cinit__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

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

/* "psychxr/libovr/_libovr.pyx":3666
 * 
 *     @property
 *     def isTriggering(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the play area boundary is triggering. Since the boundary
 *         fades-in, it might not be perceptible when this is called.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12isTriggering_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12isTriggering_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12isTriggering___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12isTriggering___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3670
 *         fades-in, it might not be perceptible when this is called.
 *         """
 *         return self.c_data.IsTriggering == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data.IsTriggering == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3666
 * 
 *     @property
 *     def isTriggering(self):             # <<<<<<<<<<<<<<
 *         """``True`` if the play area boundary is triggering. Since the boundary
 *         fades-in, it might not be perceptible when this is called.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBoundaryTestResult.isTriggering.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3673
 * 
 *     @property
 *     def closestDistance(self):             # <<<<<<<<<<<<<<
 *         """Closest point to the boundary in meters."""
 *         return <float>self.c_data.ClosestDistance
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_15closestDistance_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_15closestDistance_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_15closestDistance___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_15closestDistance___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3675
 *     def closestDistance(self):
 *         """Closest point to the boundary in meters."""
 *         return <float>self.c_data.ClosestDistance             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((float)__pyx_v_self->c_data.ClosestDistance)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3673
 * 
 *     @property
 *     def closestDistance(self):             # <<<<<<<<<<<<<<
 *         """Closest point to the boundary in meters."""
 *         return <float>self.c_data.ClosestDistance
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBoundaryTestResult.closestDistance.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3678
 * 
 *     @property
 *     def closestPoint(self):             # <<<<<<<<<<<<<<
 *         """Closest point on the boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12closestPoint_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12closestPoint_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12closestPoint___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12closestPoint___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self) {
  PyArrayObject *__pyx_v_to_return = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_to_return;
  __Pyx_Buffer __pyx_pybuffer_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_pybuffer_to_return.pybuffer.buf = NULL;
  __pyx_pybuffer_to_return.refcount = 0;
  __pyx_pybuffernd_to_return.data = NULL;
  __pyx_pybuffernd_to_return.rcbuffer = &__pyx_pybuffer_to_return;

  /* "psychxr/libovr/_libovr.pyx":3680
 *     def closestPoint(self):
 *         """Closest point on the boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPoint.x,
 *             self.c_data.ClosestPoint.y,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3681
 *         """Closest point on the boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([
 *             self.c_data.ClosestPoint.x,             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPoint.y,
 *             self.c_data.ClosestPoint.z],
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data.ClosestPoint.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":3682
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([
 *             self.c_data.ClosestPoint.x,
 *             self.c_data.ClosestPoint.y,             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPoint.z],
 *             dtype=np.float32)
 */
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_data.ClosestPoint.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3683
 *             self.c_data.ClosestPoint.x,
 *             self.c_data.ClosestPoint.y,
 *             self.c_data.ClosestPoint.z],             # <<<<<<<<<<<<<<
 *             dtype=np.float32)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c_data.ClosestPoint.z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":3680
 *     def closestPoint(self):
 *         """Closest point on the boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPoint.x,
 *             self.c_data.ClosestPoint.y,
 */
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3684
 *             self.c_data.ClosestPoint.y,
 *             self.c_data.ClosestPoint.z],
 *             dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 3684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3680
 *     def closestPoint(self):
 *         """Closest point on the boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPoint.x,
 *             self.c_data.ClosestPoint.y,
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3680, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_to_return = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 3680, __pyx_L1_error)
    } else {__pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_to_return = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3686
 *             dtype=np.float32)
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3678
 * 
 *     @property
 *     def closestPoint(self):             # <<<<<<<<<<<<<<
 *         """Closest point on the boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBoundaryTestResult.closestPoint.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3689
 * 
 *     @property
 *     def closestPointNormal(self):             # <<<<<<<<<<<<<<
 *         """Unit normal of the closest boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_18closestPointNormal_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_18closestPointNormal_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_18closestPointNormal___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_18closestPointNormal___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self) {
  PyArrayObject *__pyx_v_to_return = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_to_return;
  __Pyx_Buffer __pyx_pybuffer_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_pybuffer_to_return.pybuffer.buf = NULL;
  __pyx_pybuffer_to_return.refcount = 0;
  __pyx_pybuffernd_to_return.data = NULL;
  __pyx_pybuffernd_to_return.rcbuffer = &__pyx_pybuffer_to_return;

  /* "psychxr/libovr/_libovr.pyx":3691
 *     def closestPointNormal(self):
 *         """Unit normal of the closest boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPointNormal.x,
 *             self.c_data.ClosestPointNormal.y,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3692
 *         """Unit normal of the closest boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([
 *             self.c_data.ClosestPointNormal.x,             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPointNormal.y,
 *             self.c_data.ClosestPointNormal.z],
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data.ClosestPointNormal.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":3693
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([
 *             self.c_data.ClosestPointNormal.x,
 *             self.c_data.ClosestPointNormal.y,             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPointNormal.z],
 *             dtype=np.float32)
 */
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_data.ClosestPointNormal.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":3694
 *             self.c_data.ClosestPointNormal.x,
 *             self.c_data.ClosestPointNormal.y,
 *             self.c_data.ClosestPointNormal.z],             # <<<<<<<<<<<<<<
 *             dtype=np.float32)
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c_data.ClosestPointNormal.z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":3691
 *     def closestPointNormal(self):
 *         """Unit normal of the closest boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPointNormal.x,
 *             self.c_data.ClosestPointNormal.y,
 */
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":3695
 *             self.c_data.ClosestPointNormal.y,
 *             self.c_data.ClosestPointNormal.z],
 *             dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 3695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3691
 *     def closestPointNormal(self):
 *         """Unit normal of the closest boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([             # <<<<<<<<<<<<<<
 *             self.c_data.ClosestPointNormal.x,
 *             self.c_data.ClosestPointNormal.y,
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3691, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_to_return = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 3691, __pyx_L1_error)
    } else {__pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_to_return = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3697
 *             dtype=np.float32)
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3689
 * 
 *     @property
 *     def closestPointNormal(self):             # <<<<<<<<<<<<<<
 *         """Unit normal of the closest boundary surface."""
 *         cdef np.ndarray[float, ndim=1] to_return = np.asarray([
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBoundaryTestResult.closestPointNormal.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_4__reduce_cython__[] = "LibOVRBoundaryTestResult.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_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_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_4__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBoundaryTestResult.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_6__setstate_cython__[] = "LibOVRBoundaryTestResult.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_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_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_6__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRBoundaryTestResult.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3719
 *     cdef bint ptr_owner
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__[] = "\n        Attributes\n        ----------\n        hmdVsyncIndex : int\n        appFrameIndex : int\n        appDroppedFrameCount : int\n        appMotionToPhotonLatency : float\n        appQueueAheadTime : float\n        appCpuElapsedTime : float\n        appGpuElapsedTime : float\n        compositorFrameIndex : float\n        compositorDroppedFrameCount : float\n        compositorLatency : float\n        compositorCpuElapsedTime : float\n        compositorGpuElapsedTime : float\n        compositorCpuStartToGpuEndElapsedTime : float\n        compositorGpuEndToVsyncElapsedTime : float\n        timeToVsync : float\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psychxr/libovr/_libovr.pyx":3740
 * 
 *         """
 *         self._new_struct()             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  ((struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self->__pyx_vtab)->_new_struct(__pyx_v_self);

  /* "psychxr/libovr/_libovr.pyx":3719
 *     cdef bint ptr_owner
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

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

/* "psychxr/libovr/_libovr.pyx":3742
 *         self._new_struct()
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_3__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_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/libovr/_libovr.pyx":3743
 * 
 *     def __cinit__(self):
 *         self.ptr_owner = False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_v_self->ptr_owner = 0;

  /* "psychxr/libovr/_libovr.pyx":3742
 *         self._new_struct()
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":3746
 * 
 *     @staticmethod
 *     cdef LibOVRPerfStatsPerCompositorFrame fromPtr(             # <<<<<<<<<<<<<<
 *             capi.ovrPerfStatsPerCompositorFrame* ptr, bint owner=False):
 *         cdef LibOVRPerfStatsPerCompositorFrame wrapper = \
 */

static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_f_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr(ovrPerfStatsPerCompositorFrame *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr *__pyx_optional_args) {

  /* "psychxr/libovr/_libovr.pyx":3747
 *     @staticmethod
 *     cdef LibOVRPerfStatsPerCompositorFrame fromPtr(
 *             capi.ovrPerfStatsPerCompositorFrame* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRPerfStatsPerCompositorFrame wrapper = \
 *             LibOVRPerfStatsPerCompositorFrame.__new__(
 */
  int __pyx_v_owner = ((int)0);
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_wrapper = 0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fromPtr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_owner = __pyx_optional_args->owner;
    }
  }

  /* "psychxr/libovr/_libovr.pyx":3749
 *             capi.ovrPerfStatsPerCompositorFrame* ptr, bint owner=False):
 *         cdef LibOVRPerfStatsPerCompositorFrame wrapper = \
 *             LibOVRPerfStatsPerCompositorFrame.__new__(             # <<<<<<<<<<<<<<
 *                 LibOVRPerfStatsPerCompositorFrame)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame(((PyTypeObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3749, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_wrapper = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3752
 *                 LibOVRPerfStatsPerCompositorFrame)
 * 
 *         wrapper.c_data = ptr             # <<<<<<<<<<<<<<
 *         wrapper.ptr_owner = owner
 * 
 */
  __pyx_v_wrapper->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":3753
 * 
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner             # <<<<<<<<<<<<<<
 * 
 *         return wrapper
 */
  __pyx_v_wrapper->ptr_owner = __pyx_v_owner;

  /* "psychxr/libovr/_libovr.pyx":3755
 *         wrapper.ptr_owner = owner
 * 
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cdef void _new_struct(self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_wrapper));
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3746
 * 
 *     @staticmethod
 *     cdef LibOVRPerfStatsPerCompositorFrame fromPtr(             # <<<<<<<<<<<<<<
 *             capi.ovrPerfStatsPerCompositorFrame* ptr, bint owner=False):
 *         cdef LibOVRPerfStatsPerCompositorFrame wrapper = \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.fromPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3757
 *         return wrapper
 * 
 *     cdef void _new_struct(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

static void __pyx_f_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  ovrPerfStatsPerCompositorFrame *__pyx_v_ptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_new_struct", 0);

  /* "psychxr/libovr/_libovr.pyx":3758
 * 
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":3759
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef capi.ovrPerfStatsPerCompositorFrame* ptr = \
 */
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":3758
 * 
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3762
 * 
 *         cdef capi.ovrPerfStatsPerCompositorFrame* ptr = \
 *             <capi.ovrPerfStatsPerCompositorFrame*>PyMem_Malloc(             # <<<<<<<<<<<<<<
 *                 sizeof(capi.ovrPerfStatsPerCompositorFrame))
 * 
 */
  __pyx_v_ptr = ((ovrPerfStatsPerCompositorFrame *)PyMem_Malloc((sizeof(ovrPerfStatsPerCompositorFrame))));

  /* "psychxr/libovr/_libovr.pyx":3765
 *                 sizeof(capi.ovrPerfStatsPerCompositorFrame))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":3766
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         self.c_data = ptr
 */
    PyErr_NoMemory(); __PYX_ERR(0, 3766, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":3765
 *                 sizeof(capi.ovrPerfStatsPerCompositorFrame))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3768
 *             raise MemoryError
 * 
 *         self.c_data = ptr             # <<<<<<<<<<<<<<
 *         self.ptr_owner = True
 * 
 */
  __pyx_v_self->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":3769
 * 
 *         self.c_data = ptr
 *         self.ptr_owner = True             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->ptr_owner = 1;

  /* "psychxr/libovr/_libovr.pyx":3757
 *         return wrapper
 * 
 *     cdef void _new_struct(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame._new_struct", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "psychxr/libovr/_libovr.pyx":3771
 *         self.ptr_owner = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 */

/* Python wrapper */
static void __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_4__dealloc__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static void __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "psychxr/libovr/_libovr.pyx":3773
 *     def __dealloc__(self):
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":3774
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    __pyx_t_1 = ((__pyx_v_self->ptr_owner == 1) != 0);
    if (__pyx_t_1) {

      /* "psychxr/libovr/_libovr.pyx":3775
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)             # <<<<<<<<<<<<<<
 *                 self.c_data = NULL
 * 
 */
      PyMem_Free(__pyx_v_self->c_data);

      /* "psychxr/libovr/_libovr.pyx":3776
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
      __pyx_v_self->c_data = NULL;

      /* "psychxr/libovr/_libovr.pyx":3774
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    }

    /* "psychxr/libovr/_libovr.pyx":3773
 *     def __dealloc__(self):
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3771
 *         self.ptr_owner = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 */

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

/* "psychxr/libovr/_libovr.pyx":3779
 * 
 *     @property
 *     def hmdVsyncIndex(self):             # <<<<<<<<<<<<<<
 *         """Increments every HMD vertical sync signal."""
 *         return self.c_data.HmdVsyncIndex
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13hmdVsyncIndex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13hmdVsyncIndex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13hmdVsyncIndex___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13hmdVsyncIndex___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3781
 *     def hmdVsyncIndex(self):
 *         """Increments every HMD vertical sync signal."""
 *         return self.c_data.HmdVsyncIndex             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->HmdVsyncIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3779
 * 
 *     @property
 *     def hmdVsyncIndex(self):             # <<<<<<<<<<<<<<
 *         """Increments every HMD vertical sync signal."""
 *         return self.c_data.HmdVsyncIndex
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.hmdVsyncIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3784
 * 
 *     @property
 *     def appFrameIndex(self):             # <<<<<<<<<<<<<<
 *         """Index increments after each call to :func:`endFrame`."""
 *         return self.c_data.AppFrameIndex
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13appFrameIndex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13appFrameIndex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13appFrameIndex___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13appFrameIndex___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3786
 *     def appFrameIndex(self):
 *         """Index increments after each call to :func:`endFrame`."""
 *         return self.c_data.AppFrameIndex             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->AppFrameIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3784
 * 
 *     @property
 *     def appFrameIndex(self):             # <<<<<<<<<<<<<<
 *         """Index increments after each call to :func:`endFrame`."""
 *         return self.c_data.AppFrameIndex
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.appFrameIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3789
 * 
 *     @property
 *     def appDroppedFrameCount(self):             # <<<<<<<<<<<<<<
 *         """If :func:`endFrame` is not called on-time, this will increment (i.e.
 *         missed HMD vertical sync deadline).
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20appDroppedFrameCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20appDroppedFrameCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20appDroppedFrameCount___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20appDroppedFrameCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3801
 * 
 *         """
 *         return self.c_data.AppDroppedFrameCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->AppDroppedFrameCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3789
 * 
 *     @property
 *     def appDroppedFrameCount(self):             # <<<<<<<<<<<<<<
 *         """If :func:`endFrame` is not called on-time, this will increment (i.e.
 *         missed HMD vertical sync deadline).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.appDroppedFrameCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3804
 * 
 *     @property
 *     def appMotionToPhotonLatency(self):             # <<<<<<<<<<<<<<
 *         """Motion-to-photon latency in seconds computed using the marker set by
 *         :func:`getTrackingState` or the sensor sample time set by
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24appMotionToPhotonLatency_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24appMotionToPhotonLatency_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24appMotionToPhotonLatency___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24appMotionToPhotonLatency___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3809
 *         :func:`setSensorSampleTime`.
 *         """
 *         return self.c_data.AppMotionToPhotonLatency             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->AppMotionToPhotonLatency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3804
 * 
 *     @property
 *     def appMotionToPhotonLatency(self):             # <<<<<<<<<<<<<<
 *         """Motion-to-photon latency in seconds computed using the marker set by
 *         :func:`getTrackingState` or the sensor sample time set by
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.appMotionToPhotonLatency.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3812
 * 
 *     @property
 *     def appQueueAheadTime(self):             # <<<<<<<<<<<<<<
 *         """Queue-ahead time in seconds. If >11 ms, the CPU is outpacing the GPU
 *         workload by 1 frame.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appQueueAheadTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appQueueAheadTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appQueueAheadTime___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appQueueAheadTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3816
 *         workload by 1 frame.
 *         """
 *         return self.c_data.AppQueueAheadTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->AppQueueAheadTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3812
 * 
 *     @property
 *     def appQueueAheadTime(self):             # <<<<<<<<<<<<<<
 *         """Queue-ahead time in seconds. If >11 ms, the CPU is outpacing the GPU
 *         workload by 1 frame.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.appQueueAheadTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3819
 * 
 *     @property
 *     def appCpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds the CPU spent between calls of :func:`endFrame`. Form
 *         the point when :func:`endFrame` releases control back to the
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appCpuElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appCpuElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appCpuElapsedTime___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appCpuElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3824
 *         application, to the next time it is called.
 *         """
 *         return self.c_data.AppCpuElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->AppCpuElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3819
 * 
 *     @property
 *     def appCpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds the CPU spent between calls of :func:`endFrame`. Form
 *         the point when :func:`endFrame` releases control back to the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.appCpuElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3827
 * 
 *     @property
 *     def appGpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds the GPU spent between calls of :func:`endFrame`."""
 *         return self.c_data.AppGpuElapsedTime
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appGpuElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appGpuElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appGpuElapsedTime___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appGpuElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3829
 *     def appGpuElapsedTime(self):
 *         """Time in seconds the GPU spent between calls of :func:`endFrame`."""
 *         return self.c_data.AppGpuElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->AppGpuElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3827
 * 
 *     @property
 *     def appGpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds the GPU spent between calls of :func:`endFrame`."""
 *         return self.c_data.AppGpuElapsedTime
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.appGpuElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3832
 * 
 *     @property
 *     def compositorFrameIndex(self):             # <<<<<<<<<<<<<<
 *         """Increments when the compositor completes a distortion pass, happens
 *         regardless if :func:`endFrame` was called late.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20compositorFrameIndex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20compositorFrameIndex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20compositorFrameIndex___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20compositorFrameIndex___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3836
 *         regardless if :func:`endFrame` was called late.
 *         """
 *         return self.c_data.CompositorFrameIndex             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->CompositorFrameIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3832
 * 
 *     @property
 *     def compositorFrameIndex(self):             # <<<<<<<<<<<<<<
 *         """Increments when the compositor completes a distortion pass, happens
 *         regardless if :func:`endFrame` was called late.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.compositorFrameIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3839
 * 
 *     @property
 *     def compositorDroppedFrameCount(self):             # <<<<<<<<<<<<<<
 *         """Number of frames dropped by the compositor. This can happen
 *         spontaneously for reasons not related to application performance.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_27compositorDroppedFrameCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_27compositorDroppedFrameCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_27compositorDroppedFrameCount___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_27compositorDroppedFrameCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3843
 *         spontaneously for reasons not related to application performance.
 *         """
 *         return self.c_data.CompositorDroppedFrameCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->CompositorDroppedFrameCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3839
 * 
 *     @property
 *     def compositorDroppedFrameCount(self):             # <<<<<<<<<<<<<<
 *         """Number of frames dropped by the compositor. This can happen
 *         spontaneously for reasons not related to application performance.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.compositorDroppedFrameCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3846
 * 
 *     @property
 *     def compositorLatency(self):             # <<<<<<<<<<<<<<
 *         """Motion-to-photon latency of the compositor, which include the
 *         latency of 'timewarp' needed to correct for application latency and
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17compositorLatency_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17compositorLatency_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17compositorLatency___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17compositorLatency___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3851
 *         dropped application frames.
 *         """
 *         return self.c_data.CompositorLatency             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->CompositorLatency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3846
 * 
 *     @property
 *     def compositorLatency(self):             # <<<<<<<<<<<<<<
 *         """Motion-to-photon latency of the compositor, which include the
 *         latency of 'timewarp' needed to correct for application latency and
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.compositorLatency.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3854
 * 
 *     @property
 *     def compositorCpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds the compositor spends on the CPU."""
 *         return self.c_data.CompositorCpuElapsedTime
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorCpuElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorCpuElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorCpuElapsedTime___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorCpuElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3856
 *     def compositorCpuElapsedTime(self):
 *         """Time in seconds the compositor spends on the CPU."""
 *         return self.c_data.CompositorCpuElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->CompositorCpuElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3854
 * 
 *     @property
 *     def compositorCpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds the compositor spends on the CPU."""
 *         return self.c_data.CompositorCpuElapsedTime
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.compositorCpuElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3859
 * 
 *     @property
 *     def compositorGpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds the compositor spends on the GPU."""
 *         return self.c_data.CompositorGpuElapsedTime
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorGpuElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorGpuElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorGpuElapsedTime___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorGpuElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3861
 *     def compositorGpuElapsedTime(self):
 *         """Time in seconds the compositor spends on the GPU."""
 *         return self.c_data.CompositorGpuElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->CompositorGpuElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3859
 * 
 *     @property
 *     def compositorGpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds the compositor spends on the GPU."""
 *         return self.c_data.CompositorGpuElapsedTime
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.compositorGpuElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3864
 * 
 *     @property
 *     def compositorCpuStartToGpuEndElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds between the point the compositor executes and
 *         completes distortion/timewarp. Value is -1.0 if GPU time is not
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_37compositorCpuStartToGpuEndElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_37compositorCpuStartToGpuEndElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_37compositorCpuStartToGpuEndElapsedTime___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_37compositorCpuStartToGpuEndElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3869
 *         available.
 *         """
 *         return self.c_data.CompositorCpuStartToGpuEndElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->CompositorCpuStartToGpuEndElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3864
 * 
 *     @property
 *     def compositorCpuStartToGpuEndElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds between the point the compositor executes and
 *         completes distortion/timewarp. Value is -1.0 if GPU time is not
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.compositorCpuStartToGpuEndElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3872
 * 
 *     @property
 *     def compositorGpuEndToVsyncElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds left between the compositor is complete and the
 *         target vertical synchronization (v-sync) on the HMD."""
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_34compositorGpuEndToVsyncElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_34compositorGpuEndToVsyncElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_34compositorGpuEndToVsyncElapsedTime___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_34compositorGpuEndToVsyncElapsedTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3875
 *         """Time in seconds left between the compositor is complete and the
 *         target vertical synchronization (v-sync) on the HMD."""
 *         return self.c_data.CompositorGpuEndToVsyncElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->CompositorGpuEndToVsyncElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3872
 * 
 *     @property
 *     def compositorGpuEndToVsyncElapsedTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds left between the compositor is complete and the
 *         target vertical synchronization (v-sync) on the HMD."""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.compositorGpuEndToVsyncElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3878
 * 
 *     @property
 *     def timeToVsync(self):             # <<<<<<<<<<<<<<
 *         """Total time elapsed from when CPU control is handed off to the
 *         compositor to HMD vertical synchronization signal (V-Sync).
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11timeToVsync_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11timeToVsync_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11timeToVsync___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11timeToVsync___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3883
 * 
 *         """
 *         return self.c_data.CompositorCpuStartToGpuEndElapsedTime + \             # <<<<<<<<<<<<<<
 *             self.c_data.CompositorGpuEndToVsyncElapsedTime
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":3884
 *         """
 *         return self.c_data.CompositorCpuStartToGpuEndElapsedTime + \
 *             self.c_data.CompositorGpuEndToVsyncElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data->CompositorCpuStartToGpuEndElapsedTime + __pyx_v_self->c_data->CompositorGpuEndToVsyncElapsedTime)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3878
 * 
 *     @property
 *     def timeToVsync(self):             # <<<<<<<<<<<<<<
 *         """Total time elapsed from when CPU control is handed off to the
 *         compositor to HMD vertical synchronization signal (V-Sync).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.timeToVsync.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3887
 * 
 *     @property
 *     def aswIsActive(self):             # <<<<<<<<<<<<<<
 *         """``True`` if Asynchronous Space Warp (ASW) was active this frame."""
 *         return self.c_data.AswIsActive == capi.ovrTrue
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11aswIsActive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11aswIsActive_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11aswIsActive___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11aswIsActive___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3889
 *     def aswIsActive(self):
 *         """``True`` if Asynchronous Space Warp (ASW) was active this frame."""
 *         return self.c_data.AswIsActive == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->AswIsActive == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3887
 * 
 *     @property
 *     def aswIsActive(self):             # <<<<<<<<<<<<<<
 *         """``True`` if Asynchronous Space Warp (ASW) was active this frame."""
 *         return self.c_data.AswIsActive == capi.ovrTrue
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.aswIsActive.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3892
 * 
 *     @property
 *     def aswActivatedToggleCount(self):             # <<<<<<<<<<<<<<
 *         """How many frames ASW activated during the runtime of this application.
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_23aswActivatedToggleCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_23aswActivatedToggleCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_23aswActivatedToggleCount___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_23aswActivatedToggleCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3895
 *         """How many frames ASW activated during the runtime of this application.
 *         """
 *         return self.c_data.AswActivatedToggleCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->AswActivatedToggleCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3892
 * 
 *     @property
 *     def aswActivatedToggleCount(self):             # <<<<<<<<<<<<<<
 *         """How many frames ASW activated during the runtime of this application.
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.aswActivatedToggleCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3898
 * 
 *     @property
 *     def aswPresentedFrameCount(self):             # <<<<<<<<<<<<<<
 *         """Number of frames the compositor extrapolated using ASW."""
 *         return self.c_data.AswPresentedFrameCount
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_22aswPresentedFrameCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_22aswPresentedFrameCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_22aswPresentedFrameCount___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_22aswPresentedFrameCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3900
 *     def aswPresentedFrameCount(self):
 *         """Number of frames the compositor extrapolated using ASW."""
 *         return self.c_data.AswPresentedFrameCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->AswPresentedFrameCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3898
 * 
 *     @property
 *     def aswPresentedFrameCount(self):             # <<<<<<<<<<<<<<
 *         """Number of frames the compositor extrapolated using ASW."""
 *         return self.c_data.AswPresentedFrameCount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.aswPresentedFrameCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3903
 * 
 *     @property
 *     def aswFailedFrameCount(self):             # <<<<<<<<<<<<<<
 *         """Number of frames the compositor failed to present extrapolated frames
 *         using ASW.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_19aswFailedFrameCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_19aswFailedFrameCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_19aswFailedFrameCount___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_19aswFailedFrameCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":3907
 *         using ASW.
 *         """
 *         return self.c_data.AswFailedFrameCount             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->AswFailedFrameCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3903
 * 
 *     @property
 *     def aswFailedFrameCount(self):             # <<<<<<<<<<<<<<
 *         """Number of frames the compositor failed to present extrapolated frames
 *         using ASW.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.aswFailedFrameCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_6__reduce_cython__[] = "LibOVRPerfStatsPerCompositorFrame.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_7__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_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_6__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_8__setstate_cython__[] = "LibOVRPerfStatsPerCompositorFrame.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_9__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_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_8__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3925
 *     cdef LibOVRPerfStatsPerCompositorFrame compFrame4
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__[] = "\n        Attributes\n        ----------\n        frameStats : tuple\n        frameStatsCount : int\n        anyFrameStatsDropped : bool\n        adaptiveGpuPerformanceScale : float\n        aswIsAvailable : bool\n        visibleProcessId : int\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "psychxr/libovr/_libovr.pyx":3937
 * 
 *         """
 *         self._new_struct()             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  ((struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self->__pyx_vtab)->_new_struct(__pyx_v_self);

  /* "psychxr/libovr/_libovr.pyx":3925
 *     cdef LibOVRPerfStatsPerCompositorFrame compFrame4
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

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

/* "psychxr/libovr/_libovr.pyx":3939
 *         self._new_struct()
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_3__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_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/libovr/_libovr.pyx":3940
 * 
 *     def __cinit__(self):
 *         self.ptr_owner = False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_v_self->ptr_owner = 0;

  /* "psychxr/libovr/_libovr.pyx":3939
 *         self._new_struct()
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.ptr_owner = False
 * 
 */

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

/* "psychxr/libovr/_libovr.pyx":3943
 * 
 *     @staticmethod
 *     cdef LibOVRPerfStats fromPtr(capi.ovrPerfStats* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRPerfStats wrapper = LibOVRPerfStats.__new__(LibOVRPerfStats)
 * 
 */

static struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr(ovrPerfStats *__pyx_v_ptr, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr *__pyx_optional_args) {
  int __pyx_v_owner = ((int)0);
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_wrapper = 0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("fromPtr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_owner = __pyx_optional_args->owner;
    }
  }

  /* "psychxr/libovr/_libovr.pyx":3944
 *     @staticmethod
 *     cdef LibOVRPerfStats fromPtr(capi.ovrPerfStats* ptr, bint owner=False):
 *         cdef LibOVRPerfStats wrapper = LibOVRPerfStats.__new__(LibOVRPerfStats)             # <<<<<<<<<<<<<<
 * 
 *         wrapper.c_data = ptr
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPerfStats(((PyTypeObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPerfStats), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3944, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_wrapper = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3946
 *         cdef LibOVRPerfStats wrapper = LibOVRPerfStats.__new__(LibOVRPerfStats)
 * 
 *         wrapper.c_data = ptr             # <<<<<<<<<<<<<<
 *         wrapper.ptr_owner = owner
 * 
 */
  __pyx_v_wrapper->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":3947
 * 
 *         wrapper.c_data = ptr
 *         wrapper.ptr_owner = owner             # <<<<<<<<<<<<<<
 * 
 *         wrapper.compFrame0 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_v_wrapper->ptr_owner = __pyx_v_owner;

  /* "psychxr/libovr/_libovr.pyx":3949
 *         wrapper.ptr_owner = owner
 * 
 *         wrapper.compFrame0 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &wrapper.c_data.FrameStats[0])
 *         wrapper.compFrame1 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_wrapper->c_data->FrameStats[0])), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->compFrame0);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->compFrame0));
  __pyx_v_wrapper->compFrame0 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3951
 *         wrapper.compFrame0 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 *             &wrapper.c_data.FrameStats[0])
 *         wrapper.compFrame1 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &wrapper.c_data.FrameStats[1])
 *         wrapper.compFrame2 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_wrapper->c_data->FrameStats[1])), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->compFrame1);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->compFrame1));
  __pyx_v_wrapper->compFrame1 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3953
 *         wrapper.compFrame1 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 *             &wrapper.c_data.FrameStats[1])
 *         wrapper.compFrame2 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &wrapper.c_data.FrameStats[2])
 *         wrapper.compFrame3 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_wrapper->c_data->FrameStats[2])), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->compFrame2);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->compFrame2));
  __pyx_v_wrapper->compFrame2 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3955
 *         wrapper.compFrame2 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 *             &wrapper.c_data.FrameStats[2])
 *         wrapper.compFrame3 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &wrapper.c_data.FrameStats[3])
 *         wrapper.compFrame4 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_wrapper->c_data->FrameStats[3])), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->compFrame3);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->compFrame3));
  __pyx_v_wrapper->compFrame3 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3957
 *         wrapper.compFrame3 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 *             &wrapper.c_data.FrameStats[3])
 *         wrapper.compFrame4 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &wrapper.c_data.FrameStats[4])
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_wrapper->c_data->FrameStats[4])), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_wrapper->compFrame4);
  __Pyx_DECREF(((PyObject *)__pyx_v_wrapper->compFrame4));
  __pyx_v_wrapper->compFrame4 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":3960
 *             &wrapper.c_data.FrameStats[4])
 * 
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cdef void _new_struct(self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_wrapper));
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3943
 * 
 *     @staticmethod
 *     cdef LibOVRPerfStats fromPtr(capi.ovrPerfStats* ptr, bint owner=False):             # <<<<<<<<<<<<<<
 *         cdef LibOVRPerfStats wrapper = LibOVRPerfStats.__new__(LibOVRPerfStats)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.fromPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wrapper);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":3962
 *         return wrapper
 * 
 *     cdef void _new_struct(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

static void __pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPerfStats__new_struct(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  ovrPerfStats *__pyx_v_ptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("_new_struct", 0);

  /* "psychxr/libovr/_libovr.pyx":3963
 * 
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":3964
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         cdef capi.ovrPerfStats* ptr = \
 */
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":3963
 * 
 *     cdef void _new_struct(self):
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3967
 * 
 *         cdef capi.ovrPerfStats* ptr = \
 *             <capi.ovrPerfStats*>PyMem_Malloc(             # <<<<<<<<<<<<<<
 *                 sizeof(capi.ovrPerfStats))
 * 
 */
  __pyx_v_ptr = ((ovrPerfStats *)PyMem_Malloc((sizeof(ovrPerfStats))));

  /* "psychxr/libovr/_libovr.pyx":3970
 *                 sizeof(capi.ovrPerfStats))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":3971
 * 
 *         if ptr is NULL:
 *             raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         self.c_data = ptr
 */
    PyErr_NoMemory(); __PYX_ERR(0, 3971, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":3970
 *                 sizeof(capi.ovrPerfStats))
 * 
 *         if ptr is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3973
 *             raise MemoryError
 * 
 *         self.c_data = ptr             # <<<<<<<<<<<<<<
 *         self.ptr_owner = True
 * 
 */
  __pyx_v_self->c_data = __pyx_v_ptr;

  /* "psychxr/libovr/_libovr.pyx":3974
 * 
 *         self.c_data = ptr
 *         self.ptr_owner = True             # <<<<<<<<<<<<<<
 * 
 *         self.compFrame0 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_v_self->ptr_owner = 1;

  /* "psychxr/libovr/_libovr.pyx":3976
 *         self.ptr_owner = True
 * 
 *         self.compFrame0 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &self.c_data.FrameStats[0])
 *         self.compFrame1 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_self->c_data->FrameStats[0])), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->compFrame0);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->compFrame0));
  __pyx_v_self->compFrame0 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":3978
 *         self.compFrame0 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 *             &self.c_data.FrameStats[0])
 *         self.compFrame1 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &self.c_data.FrameStats[1])
 *         self.compFrame2 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_self->c_data->FrameStats[1])), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->compFrame1);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->compFrame1));
  __pyx_v_self->compFrame1 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":3980
 *         self.compFrame1 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 *             &self.c_data.FrameStats[1])
 *         self.compFrame2 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &self.c_data.FrameStats[2])
 *         self.compFrame3 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_self->c_data->FrameStats[2])), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->compFrame2);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->compFrame2));
  __pyx_v_self->compFrame2 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":3982
 *         self.compFrame2 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 *             &self.c_data.FrameStats[2])
 *         self.compFrame3 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &self.c_data.FrameStats[3])
 *         self.compFrame4 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_self->c_data->FrameStats[3])), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->compFrame3);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->compFrame3));
  __pyx_v_self->compFrame3 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":3984
 *         self.compFrame3 = LibOVRPerfStatsPerCompositorFrame.fromPtr(
 *             &self.c_data.FrameStats[3])
 *         self.compFrame4 = LibOVRPerfStatsPerCompositorFrame.fromPtr(             # <<<<<<<<<<<<<<
 *             &self.c_data.FrameStats[4])
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame->fromPtr((&(__pyx_v_self->c_data->FrameStats[4])), NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->compFrame4);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->compFrame4));
  __pyx_v_self->compFrame4 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":3962
 *         return wrapper
 * 
 *     cdef void _new_struct(self):             # <<<<<<<<<<<<<<
 *         if self.c_data is not NULL:
 *             return
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("psychxr.libovr._libovr.LibOVRPerfStats._new_struct", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "psychxr/libovr/_libovr.pyx":3987
 *             &self.c_data.FrameStats[4])
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 */

/* Python wrapper */
static void __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_4__dealloc__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static void __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_4__dealloc__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "psychxr/libovr/_libovr.pyx":3989
 *     def __dealloc__(self):
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":3990
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    __pyx_t_1 = ((__pyx_v_self->ptr_owner == 1) != 0);
    if (__pyx_t_1) {

      /* "psychxr/libovr/_libovr.pyx":3991
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)             # <<<<<<<<<<<<<<
 *                 self.c_data = NULL
 * 
 */
      PyMem_Free(__pyx_v_self->c_data);

      /* "psychxr/libovr/_libovr.pyx":3992
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
      __pyx_v_self->c_data = NULL;

      /* "psychxr/libovr/_libovr.pyx":3990
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 *             if self.ptr_owner is True:             # <<<<<<<<<<<<<<
 *                 PyMem_Free(self.c_data)
 *                 self.c_data = NULL
 */
    }

    /* "psychxr/libovr/_libovr.pyx":3989
 *     def __dealloc__(self):
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.ptr_owner is True:
 *                 PyMem_Free(self.c_data)
 */
  }

  /* "psychxr/libovr/_libovr.pyx":3987
 *             &self.c_data.FrameStats[4])
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # don't do anything crazy like set c_data=NULL without deallocating!
 *         if self.c_data is not NULL:
 */

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

/* "psychxr/libovr/_libovr.pyx":3995
 * 
 *     @property
 *     def frameStats(self):             # <<<<<<<<<<<<<<
 *         """Performance stats per compositor frame. Statistics are in reverse
 *         chronological order where the first index is the most recent. Only
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_10frameStats_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_10frameStats_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_10frameStats___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_10frameStats___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4000
 *         indices 0 to :py:attr:`LibOVRPerfStats.frameStatsCount` are valid.
 *         """
 *         return (self.compFrame0,             # <<<<<<<<<<<<<<
 *                 self.compFrame1,
 *                 self.compFrame2,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":4004
 *                 self.compFrame2,
 *                 self.compFrame3,
 *                 self.compFrame4)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->compFrame0));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->compFrame0));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->compFrame0));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->compFrame1));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->compFrame1));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->compFrame1));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->compFrame2));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->compFrame2));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->compFrame2));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->compFrame3));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->compFrame3));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->compFrame3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->compFrame4));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->compFrame4));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->compFrame4));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":3995
 * 
 *     @property
 *     def frameStats(self):             # <<<<<<<<<<<<<<
 *         """Performance stats per compositor frame. Statistics are in reverse
 *         chronological order where the first index is the most recent. Only
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.frameStats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4007
 * 
 *     @property
 *     def frameStatsCount(self):             # <<<<<<<<<<<<<<
 *         """Number of compositor frame statistics available. The maximum number
 *         of frame statistics is 5. If 1 is returned, the application is calling
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_15frameStatsCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_15frameStatsCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_15frameStatsCount___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_15frameStatsCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4013
 *         rate of the display.
 *         """
 *         return self.c_data.FrameStatsCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data->FrameStatsCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4007
 * 
 *     @property
 *     def frameStatsCount(self):             # <<<<<<<<<<<<<<
 *         """Number of compositor frame statistics available. The maximum number
 *         of frame statistics is 5. If 1 is returned, the application is calling
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.frameStatsCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4016
 * 
 *     @property
 *     def anyFrameStatsDropped(self):             # <<<<<<<<<<<<<<
 *         """``True`` if compositor frame statistics have been dropped. This
 *         occurs if :func:`getPerfStats` is called at a rate less than 1/5th the
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_20anyFrameStatsDropped_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_20anyFrameStatsDropped_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_20anyFrameStatsDropped___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_20anyFrameStatsDropped___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4025
 * 
 *         """
 *         return self.c_data.AnyFrameStatsDropped == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->AnyFrameStatsDropped == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4016
 * 
 *     @property
 *     def anyFrameStatsDropped(self):             # <<<<<<<<<<<<<<
 *         """``True`` if compositor frame statistics have been dropped. This
 *         occurs if :func:`getPerfStats` is called at a rate less than 1/5th the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.anyFrameStatsDropped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4028
 * 
 *     @property
 *     def adaptiveGpuPerformanceScale(self):             # <<<<<<<<<<<<<<
 *         """Adaptive performance scale value. This value ranges between 0.0 and
 *         1.0. If the application is taking up too many GPU resources, this value
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_27adaptiveGpuPerformanceScale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_27adaptiveGpuPerformanceScale_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_27adaptiveGpuPerformanceScale___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_27adaptiveGpuPerformanceScale___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4036
 * 
 *         """
 *         return self.c_data.AdaptiveGpuPerformanceScale             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->AdaptiveGpuPerformanceScale); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4028
 * 
 *     @property
 *     def adaptiveGpuPerformanceScale(self):             # <<<<<<<<<<<<<<
 *         """Adaptive performance scale value. This value ranges between 0.0 and
 *         1.0. If the application is taking up too many GPU resources, this value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.adaptiveGpuPerformanceScale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4039
 * 
 *     @property
 *     def aswIsAvailable(self):             # <<<<<<<<<<<<<<
 *         """``True`` is ASW is enabled."""
 *         return self.c_data.AswIsAvailable == capi.ovrTrue
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_14aswIsAvailable_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_14aswIsAvailable_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_14aswIsAvailable___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_14aswIsAvailable___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4041
 *     def aswIsAvailable(self):
 *         """``True`` is ASW is enabled."""
 *         return self.c_data.AswIsAvailable == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->AswIsAvailable == ovrTrue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4039
 * 
 *     @property
 *     def aswIsAvailable(self):             # <<<<<<<<<<<<<<
 *         """``True`` is ASW is enabled."""
 *         return self.c_data.AswIsAvailable == capi.ovrTrue
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.aswIsAvailable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4044
 * 
 *     @property
 *     def visibleProcessId(self):             # <<<<<<<<<<<<<<
 *         """Visible process ID.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_16visibleProcessId_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_16visibleProcessId_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_16visibleProcessId___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_16visibleProcessId___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4061
 * 
 *         """
 *         return <int>self.c_data.VisibleProcessId             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_data->VisibleProcessId)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4044
 * 
 *     @property
 *     def visibleProcessId(self):             # <<<<<<<<<<<<<<
 *         """Visible process ID.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.visibleProcessId.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_6__reduce_cython__[] = "LibOVRPerfStats.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_7__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_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_6__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_8__setstate_cython__[] = "LibOVRPerfStats.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_9__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_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_8__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRPerfStats.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4070
 *     cdef capi.ovrTouchHapticsDesc c_data
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__[] = "\n        Attributes\n        ----------\n        sampleRateHz : int\n        sampleTime : float\n        sampleSizeInBytes : int\n        queueMinSizeToAvoidStarvation : int\n        submitMinSamples : int\n        submitMaxSamples : int\n        submitOptimalSamples : int\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 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, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

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

/* "psychxr/libovr/_libovr.pyx":4084
 *         pass
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_3__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_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_2__cinit__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

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

/* "psychxr/libovr/_libovr.pyx":4088
 * 
 *     @property
 *     def sampleRateHz(self):             # <<<<<<<<<<<<<<
 *         """Haptics engine frequency/sample-rate."""
 *         return self.c_data.SampleRateHz
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_12sampleRateHz_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_12sampleRateHz_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_12sampleRateHz___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_12sampleRateHz___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4090
 *     def sampleRateHz(self):
 *         """Haptics engine frequency/sample-rate."""
 *         return self.c_data.SampleRateHz             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data.SampleRateHz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4088
 * 
 *     @property
 *     def sampleRateHz(self):             # <<<<<<<<<<<<<<
 *         """Haptics engine frequency/sample-rate."""
 *         return self.c_data.SampleRateHz
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsInfo.sampleRateHz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4093
 * 
 *     @property
 *     def sampleTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds per sample. You can compute the total playback time
 *         of a haptics buffer with the formula ``sampleTime * samplesCount``.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_10sampleTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_10sampleTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_10sampleTime___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_10sampleTime___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4098
 * 
 *         """
 *         return <float>1.0 / <float>self.c_data.SampleRateHz             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((float)__pyx_v_self->c_data.SampleRateHz) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 4098, __pyx_L1_error)
  }
  __pyx_t_1 = PyFloat_FromDouble((((float)1.0) / ((float)__pyx_v_self->c_data.SampleRateHz))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4093
 * 
 *     @property
 *     def sampleTime(self):             # <<<<<<<<<<<<<<
 *         """Time in seconds per sample. You can compute the total playback time
 *         of a haptics buffer with the formula ``sampleTime * samplesCount``.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsInfo.sampleTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4101
 * 
 *     @property
 *     def queueMinSizeToAvoidStarvation(self):             # <<<<<<<<<<<<<<
 *         """Queue size required to prevent starving the haptics engine."""
 *         return self.c_data.QueueMinSizeToAvoidStarvation
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_29queueMinSizeToAvoidStarvation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_29queueMinSizeToAvoidStarvation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_29queueMinSizeToAvoidStarvation___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_29queueMinSizeToAvoidStarvation___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4103
 *     def queueMinSizeToAvoidStarvation(self):
 *         """Queue size required to prevent starving the haptics engine."""
 *         return self.c_data.QueueMinSizeToAvoidStarvation             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data.QueueMinSizeToAvoidStarvation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4101
 * 
 *     @property
 *     def queueMinSizeToAvoidStarvation(self):             # <<<<<<<<<<<<<<
 *         """Queue size required to prevent starving the haptics engine."""
 *         return self.c_data.QueueMinSizeToAvoidStarvation
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsInfo.queueMinSizeToAvoidStarvation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4106
 * 
 *     @property
 *     def submitMinSamples(self):             # <<<<<<<<<<<<<<
 *         """Minimum number of samples that can be sent to the haptics engine."""
 *         return self.c_data.SubmitMinSamples
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMinSamples_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMinSamples_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMinSamples___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMinSamples___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4108
 *     def submitMinSamples(self):
 *         """Minimum number of samples that can be sent to the haptics engine."""
 *         return self.c_data.SubmitMinSamples             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data.SubmitMinSamples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4106
 * 
 *     @property
 *     def submitMinSamples(self):             # <<<<<<<<<<<<<<
 *         """Minimum number of samples that can be sent to the haptics engine."""
 *         return self.c_data.SubmitMinSamples
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsInfo.submitMinSamples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4111
 * 
 *     @property
 *     def submitMaxSamples(self):             # <<<<<<<<<<<<<<
 *         """Maximum number of samples that can be sent to the haptics engine."""
 *         return self.c_data.SubmitMinSamples
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMaxSamples_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMaxSamples_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMaxSamples___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMaxSamples___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4113
 *     def submitMaxSamples(self):
 *         """Maximum number of samples that can be sent to the haptics engine."""
 *         return self.c_data.SubmitMinSamples             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data.SubmitMinSamples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4111
 * 
 *     @property
 *     def submitMaxSamples(self):             # <<<<<<<<<<<<<<
 *         """Maximum number of samples that can be sent to the haptics engine."""
 *         return self.c_data.SubmitMinSamples
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsInfo.submitMaxSamples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4116
 * 
 *     @property
 *     def submitOptimalSamples(self):             # <<<<<<<<<<<<<<
 *         """Optimal number of samples for the haptics engine."""
 *         return self.c_data.SubmitMinSamples
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_20submitOptimalSamples_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_20submitOptimalSamples_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_20submitOptimalSamples___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_20submitOptimalSamples___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4118
 *     def submitOptimalSamples(self):
 *         """Optimal number of samples for the haptics engine."""
 *         return self.c_data.SubmitMinSamples             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data.SubmitMinSamples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4116
 * 
 *     @property
 *     def submitOptimalSamples(self):             # <<<<<<<<<<<<<<
 *         """Optimal number of samples for the haptics engine."""
 *         return self.c_data.SubmitMinSamples
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsInfo.submitOptimalSamples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_4__reduce_cython__[] = "LibOVRHapticsInfo.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_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_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_4__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_6__setstate_cython__[] = "LibOVRHapticsInfo.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_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_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_6__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4155
 *     cdef np.ndarray _samples
 * 
 *     def __init__(self, object buffer):             # <<<<<<<<<<<<<<
 *         """
 *         Attributes
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__[] = "\n        Attributes\n        ----------\n        samples : ndarray\n        samplesCount : int\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__;
#endif
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_buffer = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buffer)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4155, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_buffer = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4155, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsBuffer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)__pyx_v_self), __pyx_v_buffer);

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_buffer) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

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

/* "psychxr/libovr/_libovr.pyx":4165
 *         pass
 * 
 *     def __cinit__(self, object buffer):             # <<<<<<<<<<<<<<
 *         cdef np.ndarray[np.float32_t, ndim=1] array_in = \
 *             np.asarray(buffer, dtype=np.float32)
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_buffer = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buffer)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4165, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_buffer = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4165, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsBuffer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_2__cinit__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)__pyx_v_self), __pyx_v_buffer);

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_2__cinit__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self, PyObject *__pyx_v_buffer) {
  PyArrayObject *__pyx_v_array_in = 0;
  int __pyx_v_num_samples;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_array_in;
  __Pyx_Buffer __pyx_pybuffer_array_in;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __pyx_pybuffer_array_in.pybuffer.buf = NULL;
  __pyx_pybuffer_array_in.refcount = 0;
  __pyx_pybuffernd_array_in.data = NULL;
  __pyx_pybuffernd_array_in.rcbuffer = &__pyx_pybuffer_array_in;

  /* "psychxr/libovr/_libovr.pyx":4167
 *     def __cinit__(self, object buffer):
 *         cdef np.ndarray[np.float32_t, ndim=1] array_in = \
 *             np.asarray(buffer, dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         if array_in.ndim > 1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_buffer);
  __Pyx_GIVEREF(__pyx_v_buffer);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_buffer);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4167, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array_in.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_array_in = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_array_in.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 4166, __pyx_L1_error)
    } else {__pyx_pybuffernd_array_in.diminfo[0].strides = __pyx_pybuffernd_array_in.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_array_in.diminfo[0].shape = __pyx_pybuffernd_array_in.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_array_in = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":4169
 *             np.asarray(buffer, dtype=np.float32)
 * 
 *         if array_in.ndim > 1:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Array has invalid number of dimensions, must be 1.")
 */
  __pyx_t_7 = ((__pyx_v_array_in->nd > 1) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "psychxr/libovr/_libovr.pyx":4170
 * 
 *         if array_in.ndim > 1:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Array has invalid number of dimensions, must be 1.")
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 4170, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":4169
 *             np.asarray(buffer, dtype=np.float32)
 * 
 *         if array_in.ndim > 1:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Array has invalid number of dimensions, must be 1.")
 */
  }

  /* "psychxr/libovr/_libovr.pyx":4173
 *                 "Array has invalid number of dimensions, must be 1.")
 * 
 *         cdef int num_samples = <int>array_in.shape[0]             # <<<<<<<<<<<<<<
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:
 *             raise ValueError(
 */
  __pyx_v_num_samples = ((int)(__pyx_v_array_in->dimensions[0]));

  /* "psychxr/libovr/_libovr.pyx":4174
 * 
 *         cdef int num_samples = <int>array_in.shape[0]
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Array too large, must have length < HAPTICS_BUFFER_SAMPLES_MAX")
 */
  __pyx_t_7 = ((__pyx_v_num_samples >= OVR_HAPTICS_BUFFER_SAMPLES_MAX) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "psychxr/libovr/_libovr.pyx":4175
 *         cdef int num_samples = <int>array_in.shape[0]
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Array too large, must have length < HAPTICS_BUFFER_SAMPLES_MAX")
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 4175, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":4174
 * 
 *         cdef int num_samples = <int>array_in.shape[0]
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Array too large, must have length < HAPTICS_BUFFER_SAMPLES_MAX")
 */
  }

  /* "psychxr/libovr/_libovr.pyx":4179
 * 
 *         # clip values so range is between 0.0 and 1.0
 *         np.clip(array_in, 0.0, 1.0, out=array_in)             # <<<<<<<<<<<<<<
 * 
 *         self._samples = array_in
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_clip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_array_in));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_array_in));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_array_in));
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_float_0_0);
  __Pyx_INCREF(__pyx_float_1_0);
  __Pyx_GIVEREF(__pyx_float_1_0);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_float_1_0);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_out, ((PyObject *)__pyx_v_array_in)) < 0) __PYX_ERR(0, 4179, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":4181
 *         np.clip(array_in, 0.0, 1.0, out=array_in)
 * 
 *         self._samples = array_in             # <<<<<<<<<<<<<<
 * 
 *         # set samples buffer data
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_array_in));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_array_in));
  __Pyx_GOTREF(__pyx_v_self->_samples);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_samples));
  __pyx_v_self->_samples = ((PyArrayObject *)__pyx_v_array_in);

  /* "psychxr/libovr/_libovr.pyx":4184
 * 
 *         # set samples buffer data
 *         self.c_data.Samples = <void*>self._samples.data             # <<<<<<<<<<<<<<
 *         self.c_data.SamplesCount = num_samples
 *         self.c_data.SubmitMode = capi.ovrHapticsBufferSubmit_Enqueue
 */
  __pyx_v_self->c_data.Samples = ((void *)__pyx_v_self->_samples->data);

  /* "psychxr/libovr/_libovr.pyx":4185
 *         # set samples buffer data
 *         self.c_data.Samples = <void*>self._samples.data
 *         self.c_data.SamplesCount = num_samples             # <<<<<<<<<<<<<<
 *         self.c_data.SubmitMode = capi.ovrHapticsBufferSubmit_Enqueue
 * 
 */
  __pyx_v_self->c_data.SamplesCount = __pyx_v_num_samples;

  /* "psychxr/libovr/_libovr.pyx":4186
 *         self.c_data.Samples = <void*>self._samples.data
 *         self.c_data.SamplesCount = num_samples
 *         self.c_data.SubmitMode = capi.ovrHapticsBufferSubmit_Enqueue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data.SubmitMode = ovrHapticsBufferSubmit_Enqueue;

  /* "psychxr/libovr/_libovr.pyx":4165
 *         pass
 * 
 *     def __cinit__(self, object buffer):             # <<<<<<<<<<<<<<
 *         cdef np.ndarray[np.float32_t, ndim=1] array_in = \
 *             np.asarray(buffer, dtype=np.float32)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_array_in.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsBuffer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_array_in.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_array_in);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4189
 * 
 *     @property
 *     def samples(self):             # <<<<<<<<<<<<<<
 *         """Haptics buffer samples. Each sample specifies the amplitude of
 *         vibration at a given point of playback. Must have a length less than
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4201
 * 
 *         """
 *         return self._samples             # <<<<<<<<<<<<<<
 * 
 *     @samples.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_samples));
  __pyx_r = ((PyObject *)__pyx_v_self->_samples);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4189
 * 
 *     @property
 *     def samples(self):             # <<<<<<<<<<<<<<
 *         """Haptics buffer samples. Each sample specifies the amplitude of
 *         vibration at a given point of playback. Must have a length less than
 */

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

/* "psychxr/libovr/_libovr.pyx":4204
 * 
 *     @samples.setter
 *     def samples(self, object value):             # <<<<<<<<<<<<<<
 *         cdef np.ndarray[np.float32_t, ndim=1] array_in = \
 *             np.asarray(value, dtype=np.float32)
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_2__set__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_2__set__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self, PyObject *__pyx_v_value) {
  PyArrayObject *__pyx_v_array_in = 0;
  int __pyx_v_num_samples;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_array_in;
  __Pyx_Buffer __pyx_pybuffer_array_in;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_pybuffer_array_in.pybuffer.buf = NULL;
  __pyx_pybuffer_array_in.refcount = 0;
  __pyx_pybuffernd_array_in.data = NULL;
  __pyx_pybuffernd_array_in.rcbuffer = &__pyx_pybuffer_array_in;

  /* "psychxr/libovr/_libovr.pyx":4206
 *     def samples(self, object value):
 *         cdef np.ndarray[np.float32_t, ndim=1] array_in = \
 *             np.asarray(value, dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         if array_in.ndim > 1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 4206, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array_in.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_array_in = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_array_in.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 4205, __pyx_L1_error)
    } else {__pyx_pybuffernd_array_in.diminfo[0].strides = __pyx_pybuffernd_array_in.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_array_in.diminfo[0].shape = __pyx_pybuffernd_array_in.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_array_in = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":4208
 *             np.asarray(value, dtype=np.float32)
 * 
 *         if array_in.ndim > 1:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Array has invalid number of dimensions, must be 1.")
 */
  __pyx_t_7 = ((__pyx_v_array_in->nd > 1) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "psychxr/libovr/_libovr.pyx":4209
 * 
 *         if array_in.ndim > 1:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Array has invalid number of dimensions, must be 1.")
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 4209, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":4208
 *             np.asarray(value, dtype=np.float32)
 * 
 *         if array_in.ndim > 1:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Array has invalid number of dimensions, must be 1.")
 */
  }

  /* "psychxr/libovr/_libovr.pyx":4212
 *                 "Array has invalid number of dimensions, must be 1.")
 * 
 *         cdef int num_samples = <int>array_in.shape[0]             # <<<<<<<<<<<<<<
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:
 *             raise ValueError(
 */
  __pyx_v_num_samples = ((int)(__pyx_v_array_in->dimensions[0]));

  /* "psychxr/libovr/_libovr.pyx":4213
 * 
 *         cdef int num_samples = <int>array_in.shape[0]
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Array too large, must have length < HAPTICS_BUFFER_SAMPLES_MAX")
 */
  __pyx_t_7 = ((__pyx_v_num_samples >= OVR_HAPTICS_BUFFER_SAMPLES_MAX) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "psychxr/libovr/_libovr.pyx":4214
 *         cdef int num_samples = <int>array_in.shape[0]
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Array too large, must have length < HAPTICS_BUFFER_SAMPLES_MAX")
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 4214, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":4213
 * 
 *         cdef int num_samples = <int>array_in.shape[0]
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Array too large, must have length < HAPTICS_BUFFER_SAMPLES_MAX")
 */
  }

  /* "psychxr/libovr/_libovr.pyx":4218
 * 
 *         # clip values so range is between 0.0 and 1.0
 *         np.clip(array_in, 0.0, 1.0, out=array_in)             # <<<<<<<<<<<<<<
 * 
 *         self._samples = array_in
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_clip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_array_in));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_array_in));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_array_in));
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_float_0_0);
  __Pyx_INCREF(__pyx_float_1_0);
  __Pyx_GIVEREF(__pyx_float_1_0);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_float_1_0);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_out, ((PyObject *)__pyx_v_array_in)) < 0) __PYX_ERR(0, 4218, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":4220
 *         np.clip(array_in, 0.0, 1.0, out=array_in)
 * 
 *         self._samples = array_in             # <<<<<<<<<<<<<<
 * 
 *         # set samples buffer data
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_array_in));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_array_in));
  __Pyx_GOTREF(__pyx_v_self->_samples);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_samples));
  __pyx_v_self->_samples = ((PyArrayObject *)__pyx_v_array_in);

  /* "psychxr/libovr/_libovr.pyx":4223
 * 
 *         # set samples buffer data
 *         self.c_data.Samples = <void*>self._samples.data             # <<<<<<<<<<<<<<
 *         self.c_data.SamplesCount = num_samples
 * 
 */
  __pyx_v_self->c_data.Samples = ((void *)__pyx_v_self->_samples->data);

  /* "psychxr/libovr/_libovr.pyx":4224
 *         # set samples buffer data
 *         self.c_data.Samples = <void*>self._samples.data
 *         self.c_data.SamplesCount = num_samples             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data.SamplesCount = __pyx_v_num_samples;

  /* "psychxr/libovr/_libovr.pyx":4204
 * 
 *     @samples.setter
 *     def samples(self, object value):             # <<<<<<<<<<<<<<
 *         cdef np.ndarray[np.float32_t, ndim=1] array_in = \
 *             np.asarray(value, dtype=np.float32)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_array_in.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsBuffer.samples.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_array_in.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_array_in);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4227
 * 
 *     @property
 *     def samplesCount(self):             # <<<<<<<<<<<<<<
 *         """Number of haptic buffer samples stored. This value will always be
 *         less than ``HAPTICS_BUFFER_SAMPLES_MAX``.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_12samplesCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_12samplesCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_12samplesCount___get__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_12samplesCount___get__(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/libovr/_libovr.pyx":4232
 * 
 *         """
 *         return self.c_data.SamplesCount             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_data.SamplesCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4227
 * 
 *     @property
 *     def samplesCount(self):             # <<<<<<<<<<<<<<
 *         """Number of haptic buffer samples stored. This value will always be
 *         less than ``HAPTICS_BUFFER_SAMPLES_MAX``.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsBuffer.samplesCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_4__reduce_cython__[] = "LibOVRHapticsBuffer.__reduce_cython__(self)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_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_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_4__reduce_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsBuffer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_6__setstate_cython__[] = "LibOVRHapticsBuffer.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_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_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_6__setstate_cython__(((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__40, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.LibOVRHapticsBuffer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4239
 * #
 * 
 * def success(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates success.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_3success(PyObject *__pyx_self, PyObject *__pyx_arg_result); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_2success[] = "success(int result)\nCheck if an API return indicates success.\n\n    Returns\n    -------\n    bool\n        ``True`` if API call was an successful (`result` > 0).\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_3success = {"success", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_3success, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_2success};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_3success(PyObject *__pyx_self, PyObject *__pyx_arg_result) {
  int __pyx_v_result;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("success (wrapper)", 0);
  assert(__pyx_arg_result); {
    __pyx_v_result = __Pyx_PyInt_As_int(__pyx_arg_result); if (unlikely((__pyx_v_result == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4239, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.success", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_2success(__pyx_self, ((int)__pyx_v_result));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_2success(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_result) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("success", 0);

  /* "psychxr/libovr/_libovr.pyx":4248
 * 
 *     """
 *     return <bint>capi.OVR_SUCCESS(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_f_7psychxr_6libovr_11libovr_capi_OVR_SUCCESS(__pyx_v_result) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4239
 * #
 * 
 * def success(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates success.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.success", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4251
 * 
 * 
 * def unqualifiedSuccess(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates unqualified success.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_5unqualifiedSuccess(PyObject *__pyx_self, PyObject *__pyx_arg_result); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_4unqualifiedSuccess[] = "unqualifiedSuccess(int result)\nCheck if an API return indicates unqualified success.\n\n    Returns\n    -------\n    bool\n        ``True`` if API call was an unqualified success (`result` == 0).\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_5unqualifiedSuccess = {"unqualifiedSuccess", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_5unqualifiedSuccess, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_4unqualifiedSuccess};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_5unqualifiedSuccess(PyObject *__pyx_self, PyObject *__pyx_arg_result) {
  int __pyx_v_result;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unqualifiedSuccess (wrapper)", 0);
  assert(__pyx_arg_result); {
    __pyx_v_result = __Pyx_PyInt_As_int(__pyx_arg_result); if (unlikely((__pyx_v_result == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4251, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.unqualifiedSuccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_4unqualifiedSuccess(__pyx_self, ((int)__pyx_v_result));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_4unqualifiedSuccess(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_result) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("unqualifiedSuccess", 0);

  /* "psychxr/libovr/_libovr.pyx":4260
 * 
 *     """
 *     return <bint>capi.OVR_UNQUALIFIED_SUCCESS(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_f_7psychxr_6libovr_11libovr_capi_OVR_UNQUALIFIED_SUCCESS(__pyx_v_result) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4251
 * 
 * 
 * def unqualifiedSuccess(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates unqualified success.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.unqualifiedSuccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4263
 * 
 * 
 * def failure(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates failure (error).
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_7failure(PyObject *__pyx_self, PyObject *__pyx_arg_result); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_6failure[] = "failure(int result)\nCheck if an API return indicates failure (error).\n\n    Returns\n    -------\n    bool\n        ``True`` if API call returned an error (`result` < 0).\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_7failure = {"failure", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_7failure, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_6failure};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_7failure(PyObject *__pyx_self, PyObject *__pyx_arg_result) {
  int __pyx_v_result;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("failure (wrapper)", 0);
  assert(__pyx_arg_result); {
    __pyx_v_result = __Pyx_PyInt_As_int(__pyx_arg_result); if (unlikely((__pyx_v_result == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4263, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.failure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_6failure(__pyx_self, ((int)__pyx_v_result));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_6failure(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_result) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("failure", 0);

  /* "psychxr/libovr/_libovr.pyx":4272
 * 
 *     """
 *     return <bint>capi.OVR_FAILURE(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_f_7psychxr_6libovr_11libovr_capi_OVR_FAILURE(__pyx_v_result) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4263
 * 
 * 
 * def failure(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates failure (error).
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.failure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4275
 * 
 * 
 * def getBool(bytes propertyName, bint defaultVal=False):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR boolean property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_9getBool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_8getBool[] = "getBool(bytes propertyName, bool defaultVal=False)\nRead a LibOVR boolean property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to get.\n    defaultVal : bool, optional\n        Return value if the property could not be set. The default value is\n        ``False``.\n\n    Returns\n    -------\n    bool\n        Value of the property. Returns `defaultVal` if the property does not\n        exist.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_9getBool = {"getBool", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_9getBool, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_8getBool};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_9getBool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  int __pyx_v_defaultVal;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBool (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_defaultVal,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaultVal);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getBool") < 0)) __PYX_ERR(0, 4275, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_defaultVal = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_defaultVal == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4275, __pyx_L3_error)
    } else {
      __pyx_v_defaultVal = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getBool", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4275, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4275, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_8getBool(__pyx_self, __pyx_v_propertyName, __pyx_v_defaultVal);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_8getBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, int __pyx_v_defaultVal) {
  CYTHON_UNUSED ovrBool __pyx_v_val;
  ovrBool __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrBool __pyx_t_1;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getBool", 0);

  /* "psychxr/libovr/_libovr.pyx":4294
 *     """
 *     global _ptrSession
 *     cdef capi.ovrBool val = capi.ovrTrue if defaultVal else capi.ovrFalse             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_GetBool(
 */
  if ((__pyx_v_defaultVal != 0)) {
    __pyx_t_1 = ovrTrue;
  } else {
    __pyx_t_1 = ovrFalse;
  }
  __pyx_v_val = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":4298
 *     cdef capi.ovrBool to_return = capi.ovr_GetBool(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         defaultVal)
 * 
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4298, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4296
 *     cdef capi.ovrBool val = capi.ovrTrue if defaultVal else capi.ovrFalse
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_GetBool(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_GetBool(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_2, __pyx_v_defaultVal);

  /* "psychxr/libovr/_libovr.pyx":4301
 *         defaultVal)
 * 
 *     return to_return == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_to_return == ovrTrue)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4275
 * 
 * 
 * def getBool(bytes propertyName, bint defaultVal=False):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR boolean property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4304
 * 
 * 
 * def setBool(bytes propertyName, bint value=True):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR boolean property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_11setBool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_10setBool[] = "setBool(bytes propertyName, bool value=True)\nWrite a LibOVR boolean property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to set.\n    value : bool\n        Value to write.\n\n    Returns\n    -------\n    bool\n        ``True`` if the property was set successfully, ``False`` if the property\n        was read-only or does not exist.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_11setBool = {"setBool", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_11setBool, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10setBool};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_11setBool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  int __pyx_v_value;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBool (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBool") < 0)) __PYX_ERR(0, 4304, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_value = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4304, __pyx_L3_error)
    } else {
      __pyx_v_value = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBool", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4304, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4304, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_10setBool(__pyx_self, __pyx_v_propertyName, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_10setBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, int __pyx_v_value) {
  ovrBool __pyx_v_val;
  ovrBool __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrBool __pyx_t_1;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("setBool", 0);

  /* "psychxr/libovr/_libovr.pyx":4322
 *     """
 *     global _ptrSession
 *     cdef capi.ovrBool val = capi.ovrTrue if value else capi.ovrFalse             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_SetBool(
 */
  if ((__pyx_v_value != 0)) {
    __pyx_t_1 = ovrTrue;
  } else {
    __pyx_t_1 = ovrFalse;
  }
  __pyx_v_val = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":4326
 *     cdef capi.ovrBool to_return = capi.ovr_SetBool(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         val)
 * 
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4326, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4326, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4324
 *     cdef capi.ovrBool val = capi.ovrTrue if value else capi.ovrFalse
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_SetBool(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_SetBool(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_2, __pyx_v_val);

  /* "psychxr/libovr/_libovr.pyx":4329
 *         val)
 * 
 *     return to_return == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_to_return == ovrTrue)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4304
 * 
 * 
 * def setBool(bytes propertyName, bint value=True):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR boolean property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4332
 * 
 * 
 * def getInt(bytes propertyName, int defaultVal=0):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR integer property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13getInt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_12getInt[] = "getInt(bytes propertyName, int defaultVal=0)\nRead a LibOVR integer property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to get.\n    defaultVal : int, optional\n        Return value if the property could not be set.\n\n    Returns\n    -------\n    int\n        Value of the property. Returns `defaultVal` if the property does not\n        exist.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_13getInt = {"getInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_13getInt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_12getInt};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_13getInt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  int __pyx_v_defaultVal;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getInt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_defaultVal,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaultVal);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getInt") < 0)) __PYX_ERR(0, 4332, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_defaultVal = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_defaultVal == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4332, __pyx_L3_error)
    } else {
      __pyx_v_defaultVal = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getInt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4332, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4332, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_12getInt(__pyx_self, __pyx_v_propertyName, __pyx_v_defaultVal);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_12getInt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, int __pyx_v_defaultVal) {
  int __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getInt", 0);

  /* "psychxr/libovr/_libovr.pyx":4353
 *     cdef int to_return = capi.ovr_GetInt(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         defaultVal)
 * 
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4353, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 4353, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4351
 *     global _ptrSession
 * 
 *     cdef int to_return = capi.ovr_GetInt(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_GetInt(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_1, __pyx_v_defaultVal);

  /* "psychxr/libovr/_libovr.pyx":4356
 *         defaultVal)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_to_return); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4332
 * 
 * 
 * def getInt(bytes propertyName, int defaultVal=0):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR integer property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4359
 * 
 * 
 * def setInt(bytes propertyName, int value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR integer property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15setInt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_14setInt[] = "setInt(bytes propertyName, int value)\nWrite a LibOVR integer property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to set.\n    value : int\n        Value to write.\n\n    Returns\n    -------\n    bool\n        ``True`` if the property was set successfully, ``False`` if the property\n        was read-only or does not exist.\n\n    Examples\n    --------\n\n    Set the performance HUD mode to show summary information::\n\n        setInt(PERF_HUD_MODE, PERF_HUD_PERF_SUMMARY)\n\n    Switch off the performance HUD::\n\n        setInt(PERF_HUD_MODE, PERF_OFF)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_15setInt = {"setInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_15setInt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_14setInt};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_15setInt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  int __pyx_v_value;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setInt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setInt", 1, 2, 2, 1); __PYX_ERR(0, 4359, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInt") < 0)) __PYX_ERR(0, 4359, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    __pyx_v_value = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4359, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setInt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4359, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4359, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_14setInt(__pyx_self, __pyx_v_propertyName, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_14setInt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, int __pyx_v_value) {
  ovrBool __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("setInt", 0);

  /* "psychxr/libovr/_libovr.pyx":4391
 *     cdef capi.ovrBool to_return = capi.ovr_SetInt(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         value)
 * 
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4391, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 4391, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4389
 *     global _ptrSession
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_SetInt(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_SetInt(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_1, __pyx_v_value);

  /* "psychxr/libovr/_libovr.pyx":4394
 *         value)
 * 
 *     return to_return == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_to_return == ovrTrue)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4359
 * 
 * 
 * def setInt(bytes propertyName, int value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR integer property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4397
 * 
 * 
 * def getFloat(bytes propertyName, float defaultVal=0.0):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR floating point number property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17getFloat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_16getFloat[] = "getFloat(bytes propertyName, float defaultVal=0.0)\nRead a LibOVR floating point number property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to get.\n    defaultVal : float, optional\n        Return value if the property could not be set. Returns 0.0 if not\n        specified.\n\n    Returns\n    -------\n    float\n        Value of the property. Returns `defaultVal` if the property does not\n        exist.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_17getFloat = {"getFloat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_17getFloat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_16getFloat};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_17getFloat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  float __pyx_v_defaultVal;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFloat (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_defaultVal,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaultVal);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFloat") < 0)) __PYX_ERR(0, 4397, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_defaultVal = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_defaultVal == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4397, __pyx_L3_error)
    } else {
      __pyx_v_defaultVal = ((float)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getFloat", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4397, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getFloat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4397, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_16getFloat(__pyx_self, __pyx_v_propertyName, __pyx_v_defaultVal);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_16getFloat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, float __pyx_v_defaultVal) {
  float __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getFloat", 0);

  /* "psychxr/libovr/_libovr.pyx":4419
 *     cdef float to_return = capi.ovr_GetFloat(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         defaultVal)
 * 
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4419, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 4419, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4417
 *     global _ptrSession
 * 
 *     cdef float to_return = capi.ovr_GetFloat(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_GetFloat(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_1, __pyx_v_defaultVal);

  /* "psychxr/libovr/_libovr.pyx":4422
 *         defaultVal)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_to_return); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4397
 * 
 * 
 * def getFloat(bytes propertyName, float defaultVal=0.0):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR floating point number property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getFloat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4425
 * 
 * 
 * def setFloat(bytes propertyName, float value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19setFloat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_18setFloat[] = "setFloat(bytes propertyName, float value)\nWrite a LibOVR floating point number property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to set.\n    value : float\n        Value to write.\n\n    Returns\n    -------\n    bool\n        ``True`` if the property was set successfully, ``False`` if the property\n        was read-only or does not exist.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_19setFloat = {"setFloat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_19setFloat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_18setFloat};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_19setFloat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  float __pyx_v_value;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFloat (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setFloat", 1, 2, 2, 1); __PYX_ERR(0, 4425, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setFloat") < 0)) __PYX_ERR(0, 4425, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    __pyx_v_value = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_value == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4425, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setFloat", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4425, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setFloat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4425, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_18setFloat(__pyx_self, __pyx_v_propertyName, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_18setFloat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, float __pyx_v_value) {
  ovrBool __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("setFloat", 0);

  /* "psychxr/libovr/_libovr.pyx":4446
 *     cdef capi.ovrBool to_return = capi.ovr_SetFloat(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         value)
 * 
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4446, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 4446, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4444
 *     global _ptrSession
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_SetFloat(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_SetFloat(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_1, __pyx_v_value);

  /* "psychxr/libovr/_libovr.pyx":4449
 *         value)
 * 
 *     return to_return == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_to_return == ovrTrue)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4425
 * 
 * 
 * def setFloat(bytes propertyName, float value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setFloat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4452
 * 
 * 
 * def setFloatArray(bytes propertyName, np.ndarray[np.float32_t, ndim=1] values):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_21setFloatArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_20setFloatArray[] = "setFloatArray(bytes propertyName, ndarray values)\nWrite a LibOVR floating point number property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to set.\n    values : ndarray\n        Value to write, must be 1-D and have dtype=float32.\n\n    Returns\n    -------\n    bool\n        ``True`` if the property was set successfully, ``False`` if the property\n        was read-only or does not exist.\n\n    Examples\n    --------\n\n    Set the position of the stereo debug guide::\n\n        guidePos = numpy.asarray([0., 0., -10.0], dtype=np.float32)\n        setFloatArray(DEBUG_HUD_STEREO_GUIDE_POSITION, guidePos)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_21setFloatArray = {"setFloatArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_21setFloatArray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_20setFloatArray};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_21setFloatArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFloatArray (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setFloatArray", 1, 2, 2, 1); __PYX_ERR(0, 4452, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setFloatArray") < 0)) __PYX_ERR(0, 4452, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    __pyx_v_values = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setFloatArray", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4452, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setFloatArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4452, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 4452, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_20setFloatArray(__pyx_self, __pyx_v_propertyName, __pyx_v_values);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_20setFloatArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_valuesCapacity;
  ovrBool __pyx_v_to_return;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  char const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("setFloatArray", 0);
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 4452, __pyx_L1_error)
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":4479
 *     global _ptrSession
 * 
 *     cdef Py_ssize_t valuesCapacity = len(values)             # <<<<<<<<<<<<<<
 *     cdef capi.ovrBool to_return = capi.ovr_SetFloatArray(
 *         _ptrSession,
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4479, __pyx_L1_error)
  __pyx_v_valuesCapacity = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":4482
 *     cdef capi.ovrBool to_return = capi.ovr_SetFloatArray(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         &values[0],
 *         <unsigned int>valuesCapacity)
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4482, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4482, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4483
 *         _ptrSession,
 *         propertyName,
 *         &values[0],             # <<<<<<<<<<<<<<
 *         <unsigned int>valuesCapacity)
 * 
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape;
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 4483, __pyx_L1_error)
  }

  /* "psychxr/libovr/_libovr.pyx":4480
 * 
 *     cdef Py_ssize_t valuesCapacity = len(values)
 *     cdef capi.ovrBool to_return = capi.ovr_SetFloatArray(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_SetFloatArray(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_2, (&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides))), ((unsigned int)__pyx_v_valuesCapacity));

  /* "psychxr/libovr/_libovr.pyx":4486
 *         <unsigned int>valuesCapacity)
 * 
 *     return to_return == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyBool_FromLong((__pyx_v_to_return == ovrTrue)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4452
 * 
 * 
 * def setFloatArray(bytes propertyName, np.ndarray[np.float32_t, ndim=1] values):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.setFloatArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4489
 * 
 * 
 * def getFloatArray(bytes propertyName, np.ndarray[np.float32_t, ndim=1] values not None):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR float array property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_23getFloatArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_22getFloatArray[] = "getFloatArray(bytes propertyName, ndarray values)\nRead a LibOVR float array property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to get.\n    values : ndarray\n        Output array array for values, must be 1-D and have dtype=float32.\n\n    Returns\n    -------\n    int\n        Number of values successfully read from the property.\n\n    Examples\n    --------\n\n    Get the position of the stereo debug guide::\n\n        guidePos = numpy.zeros((3,), dtype=np.float32)  # array to write to\n        result = getFloatArray(DEBUG_HUD_STEREO_GUIDE_POSITION, guidePos)\n\n        # check if the array we specified was long enough to store the values\n        if result <= len(guidePos):\n            # success\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_23getFloatArray = {"getFloatArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_23getFloatArray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_22getFloatArray};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_23getFloatArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFloatArray (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getFloatArray", 1, 2, 2, 1); __PYX_ERR(0, 4489, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFloatArray") < 0)) __PYX_ERR(0, 4489, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    __pyx_v_values = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getFloatArray", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4489, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getFloatArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4489, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 0, "values", 0))) __PYX_ERR(0, 4489, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_22getFloatArray(__pyx_self, __pyx_v_propertyName, __pyx_v_values);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_22getFloatArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_valuesCapacity;
  unsigned int __pyx_v_to_return;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  char const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("getFloatArray", 0);
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 4489, __pyx_L1_error)
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":4519
 *     global _ptrSession
 * 
 *     cdef Py_ssize_t valuesCapacity = len(values)             # <<<<<<<<<<<<<<
 *     cdef unsigned int to_return = capi.ovr_GetFloatArray(
 *         _ptrSession,
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4519, __pyx_L1_error)
  __pyx_v_valuesCapacity = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":4522
 *     cdef unsigned int to_return = capi.ovr_GetFloatArray(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         &values[0],
 *         <unsigned int>valuesCapacity)
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4522, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4522, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4523
 *         _ptrSession,
 *         propertyName,
 *         &values[0],             # <<<<<<<<<<<<<<
 *         <unsigned int>valuesCapacity)
 * 
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape;
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    __PYX_ERR(0, 4523, __pyx_L1_error)
  }

  /* "psychxr/libovr/_libovr.pyx":4520
 * 
 *     cdef Py_ssize_t valuesCapacity = len(values)
 *     cdef unsigned int to_return = capi.ovr_GetFloatArray(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_GetFloatArray(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_2, (&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides))), ((unsigned int)__pyx_v_valuesCapacity));

  /* "psychxr/libovr/_libovr.pyx":4526
 *         <unsigned int>valuesCapacity)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_to_return); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4489
 * 
 * 
 * def getFloatArray(bytes propertyName, np.ndarray[np.float32_t, ndim=1] values not None):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR float array property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.getFloatArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4529
 * 
 * 
 * def setString(bytes propertyName, object value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_25setString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_24setString[] = "setString(bytes propertyName, value)\nWrite a LibOVR floating point number property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to set.\n    value : str or bytes\n        Value to write.\n\n    Returns\n    -------\n    bool\n        ``True`` if the property was set successfully, ``False`` if the property\n        was read-only or does not exist.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_25setString = {"setString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_25setString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_24setString};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_25setString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setString", 1, 2, 2, 1); __PYX_ERR(0, 4529, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setString") < 0)) __PYX_ERR(0, 4529, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setString", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4529, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4529, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_24setString(__pyx_self, __pyx_v_propertyName, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_24setString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_value_in = 0;
  ovrBool __pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  __Pyx_RefNannySetupContext("setString", 0);

  /* "psychxr/libovr/_libovr.pyx":4548
 *     global _ptrSession
 * 
 *     cdef object value_in = None             # <<<<<<<<<<<<<<
 *     if isinstance(value, str):
 *         value_in = value.encode('UTF-8')
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_value_in = Py_None;

  /* "psychxr/libovr/_libovr.pyx":4549
 * 
 *     cdef object value_in = None
 *     if isinstance(value, str):             # <<<<<<<<<<<<<<
 *         value_in = value.encode('UTF-8')
 *     elif isinstance(value, bytes):
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":4550
 *     cdef object value_in = None
 *     if isinstance(value, str):
 *         value_in = value.encode('UTF-8')             # <<<<<<<<<<<<<<
 *     elif isinstance(value, bytes):
 *         value_in = value
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_UTF_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_value_in, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "psychxr/libovr/_libovr.pyx":4549
 * 
 *     cdef object value_in = None
 *     if isinstance(value, str):             # <<<<<<<<<<<<<<
 *         value_in = value.encode('UTF-8')
 *     elif isinstance(value, bytes):
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":4551
 *     if isinstance(value, str):
 *         value_in = value.encode('UTF-8')
 *     elif isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *         value_in = value
 *     else:
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":4552
 *         value_in = value.encode('UTF-8')
 *     elif isinstance(value, bytes):
 *         value_in = value             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Default value must be type 'str' or 'bytes'.")
 */
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_DECREF_SET(__pyx_v_value_in, __pyx_v_value);

    /* "psychxr/libovr/_libovr.pyx":4551
 *     if isinstance(value, str):
 *         value_in = value.encode('UTF-8')
 *     elif isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *         value_in = value
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":4554
 *         value_in = value
 *     else:
 *         raise TypeError("Default value must be type 'str' or 'bytes'.")             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_SetString(
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4554, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":4558
 *     cdef capi.ovrBool to_return = capi.ovr_SetString(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         value_in)
 * 
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4558, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 4558, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4559
 *         _ptrSession,
 *         propertyName,
 *         value_in)             # <<<<<<<<<<<<<<
 * 
 *     return to_return == capi.ovrTrue
 */
  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value_in); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 4559, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4556
 *         raise TypeError("Default value must be type 'str' or 'bytes'.")
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_SetString(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_SetString(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_6, __pyx_t_7);

  /* "psychxr/libovr/_libovr.pyx":4561
 *         value_in)
 * 
 *     return to_return == capi.ovrTrue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_to_return == ovrTrue)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4529
 * 
 * 
 * def setString(bytes propertyName, object value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value_in);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4564
 * 
 * 
 * def getString(bytes propertyName, object defaultVal=''):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR string property.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_27getString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_26getString[] = "getString(bytes propertyName, defaultVal=u'')\nRead a LibOVR string property.\n\n    Parameters\n    ----------\n    propertyName : bytes\n        Name of the property to get.\n    defaultVal : bytes, optional\n        Return value if the property could not be set. Returns 0.0 if not\n        specified.\n\n    Returns\n    -------\n    str\n        Value of the property. Returns `defaultVal` if the property does not\n        exist.\n\n    Notes\n    -----\n\n    * Strings passed to this function are converted to bytes before being passed\n      to ``OVR::ovr_GetString``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_27getString = {"getString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_27getString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_26getString};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_27getString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_propertyName = 0;
  PyObject *__pyx_v_defaultVal = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getString (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_propertyName,&__pyx_n_s_defaultVal,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_kp_u__42);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_propertyName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaultVal);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getString") < 0)) __PYX_ERR(0, 4564, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_propertyName = ((PyObject*)values[0]);
    __pyx_v_defaultVal = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4564, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_propertyName), (&PyBytes_Type), 1, "propertyName", 1))) __PYX_ERR(0, 4564, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_26getString(__pyx_self, __pyx_v_propertyName, __pyx_v_defaultVal);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_26getString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_propertyName, PyObject *__pyx_v_defaultVal) {
  PyObject *__pyx_v_value_in = 0;
  char const *__pyx_v_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  __Pyx_RefNannySetupContext("getString", 0);

  /* "psychxr/libovr/_libovr.pyx":4590
 *     global _ptrSession
 * 
 *     cdef object value_in = None             # <<<<<<<<<<<<<<
 *     if isinstance(defaultVal, str):
 *         value_in = defaultVal.encode('UTF-8')
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_value_in = Py_None;

  /* "psychxr/libovr/_libovr.pyx":4591
 * 
 *     cdef object value_in = None
 *     if isinstance(defaultVal, str):             # <<<<<<<<<<<<<<
 *         value_in = defaultVal.encode('UTF-8')
 *     elif isinstance(defaultVal, bytes):
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_defaultVal); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":4592
 *     cdef object value_in = None
 *     if isinstance(defaultVal, str):
 *         value_in = defaultVal.encode('UTF-8')             # <<<<<<<<<<<<<<
 *     elif isinstance(defaultVal, bytes):
 *         value_in = defaultVal
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_defaultVal, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_UTF_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_value_in, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "psychxr/libovr/_libovr.pyx":4591
 * 
 *     cdef object value_in = None
 *     if isinstance(defaultVal, str):             # <<<<<<<<<<<<<<
 *         value_in = defaultVal.encode('UTF-8')
 *     elif isinstance(defaultVal, bytes):
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":4593
 *     if isinstance(defaultVal, str):
 *         value_in = defaultVal.encode('UTF-8')
 *     elif isinstance(defaultVal, bytes):             # <<<<<<<<<<<<<<
 *         value_in = defaultVal
 *     else:
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_defaultVal); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":4594
 *         value_in = defaultVal.encode('UTF-8')
 *     elif isinstance(defaultVal, bytes):
 *         value_in = defaultVal             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Default value must be type 'str' or 'bytes'.")
 */
    __Pyx_INCREF(__pyx_v_defaultVal);
    __Pyx_DECREF_SET(__pyx_v_value_in, __pyx_v_defaultVal);

    /* "psychxr/libovr/_libovr.pyx":4593
 *     if isinstance(defaultVal, str):
 *         value_in = defaultVal.encode('UTF-8')
 *     elif isinstance(defaultVal, bytes):             # <<<<<<<<<<<<<<
 *         value_in = defaultVal
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":4596
 *         value_in = defaultVal
 *     else:
 *         raise TypeError("Default value must be type 'str' or 'bytes'.")             # <<<<<<<<<<<<<<
 * 
 *     cdef const char* to_return = capi.ovr_GetString(
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4596, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":4600
 *     cdef const char* to_return = capi.ovr_GetString(
 *         _ptrSession,
 *         propertyName,             # <<<<<<<<<<<<<<
 *         value_in)
 * 
 */
  if (unlikely(__pyx_v_propertyName == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 4600, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsString(__pyx_v_propertyName); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 4600, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4601
 *         _ptrSession,
 *         propertyName,
 *         value_in)             # <<<<<<<<<<<<<<
 * 
 *     return to_return.decode('UTF-8')
 */
  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value_in); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 4601, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4598
 *         raise TypeError("Default value must be type 'str' or 'bytes'.")
 * 
 *     cdef const char* to_return = capi.ovr_GetString(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         propertyName,
 */
  __pyx_v_to_return = ovr_GetString(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_t_6, __pyx_t_7);

  /* "psychxr/libovr/_libovr.pyx":4603
 *         value_in)
 * 
 *     return to_return.decode('UTF-8')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_to_return, 0, strlen(__pyx_v_to_return), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4564
 * 
 * 
 * def getString(bytes propertyName, object defaultVal=''):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR string property.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value_in);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4606
 * 
 * 
 * def isOculusServiceRunning(int timeoutMs=100):             # <<<<<<<<<<<<<<
 *     """Check if the Oculus Runtime is loaded and running.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_29isOculusServiceRunning(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_28isOculusServiceRunning[] = "isOculusServiceRunning(int timeoutMs=100)\nCheck if the Oculus Runtime is loaded and running.\n\n    Parameters\n    ----------\n    timeoutMS : int\n        Timeout in milliseconds.\n\n    Returns\n    -------\n    bool\n        True if the Oculus background service is running.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_29isOculusServiceRunning = {"isOculusServiceRunning", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_29isOculusServiceRunning, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_28isOculusServiceRunning};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_29isOculusServiceRunning(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_timeoutMs;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isOculusServiceRunning (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeoutMs,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeoutMs);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isOculusServiceRunning") < 0)) __PYX_ERR(0, 4606, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_timeoutMs = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeoutMs == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4606, __pyx_L3_error)
    } else {
      __pyx_v_timeoutMs = ((int)0x64);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isOculusServiceRunning", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4606, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.isOculusServiceRunning", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_28isOculusServiceRunning(__pyx_self, __pyx_v_timeoutMs);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_28isOculusServiceRunning(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_timeoutMs) {
  ovrDetectResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("isOculusServiceRunning", 0);

  /* "psychxr/libovr/_libovr.pyx":4620
 * 
 *     """
 *     cdef capi.ovrDetectResult result = capi.ovr_Detect(             # <<<<<<<<<<<<<<
 *         timeoutMs)
 * 
 */
  __pyx_v_result = ovr_Detect(__pyx_v_timeoutMs);

  /* "psychxr/libovr/_libovr.pyx":4623
 *         timeoutMs)
 * 
 *     return <bint>result.IsOculusServiceRunning             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_result.IsOculusServiceRunning != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4606
 * 
 * 
 * def isOculusServiceRunning(int timeoutMs=100):             # <<<<<<<<<<<<<<
 *     """Check if the Oculus Runtime is loaded and running.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.isOculusServiceRunning", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4626
 * 
 * 
 * def isHmdConnected(int timeoutMs=100):             # <<<<<<<<<<<<<<
 *     """Check if an HMD is connected.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_31isHmdConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_30isHmdConnected[] = "isHmdConnected(int timeoutMs=100)\nCheck if an HMD is connected.\n\n    Parameters\n    ----------\n    timeoutMs : int\n        Timeout in milliseconds.\n\n    Returns\n    -------\n    bool\n        True if a LibOVR compatible HMD is connected.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_31isHmdConnected = {"isHmdConnected", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_31isHmdConnected, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_30isHmdConnected};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_31isHmdConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_timeoutMs;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isHmdConnected (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeoutMs,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeoutMs);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isHmdConnected") < 0)) __PYX_ERR(0, 4626, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_timeoutMs = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeoutMs == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4626, __pyx_L3_error)
    } else {
      __pyx_v_timeoutMs = ((int)0x64);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isHmdConnected", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4626, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.isHmdConnected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_30isHmdConnected(__pyx_self, __pyx_v_timeoutMs);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_30isHmdConnected(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_timeoutMs) {
  ovrDetectResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("isHmdConnected", 0);

  /* "psychxr/libovr/_libovr.pyx":4640
 * 
 *     """
 *     cdef capi.ovrDetectResult result = capi.ovr_Detect(             # <<<<<<<<<<<<<<
 *         timeoutMs)
 * 
 */
  __pyx_v_result = ovr_Detect(__pyx_v_timeoutMs);

  /* "psychxr/libovr/_libovr.pyx":4643
 *         timeoutMs)
 * 
 *     return <bint>result.IsOculusHMDConnected             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_result.IsOculusHMDConnected != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4626
 * 
 * 
 * def isHmdConnected(int timeoutMs=100):             # <<<<<<<<<<<<<<
 *     """Check if an HMD is connected.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.isHmdConnected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4646
 * 
 * 
 * def getHmdInfo():             # <<<<<<<<<<<<<<
 *     """Get HMD information.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33getHmdInfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_32getHmdInfo[] = "getHmdInfo()\nGet HMD information.\n\n    Returns\n    -------\n    LibOVRHmdInfo\n        HMD information.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_33getHmdInfo = {"getHmdInfo", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_33getHmdInfo, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_32getHmdInfo};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_33getHmdInfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getHmdInfo (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_32getHmdInfo(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_32getHmdInfo(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *__pyx_v_toReturn = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getHmdInfo", 0);

  /* "psychxr/libovr/_libovr.pyx":4656
 *     """
 *     global _hmdDesc
 *     cdef LibOVRHmdInfo toReturn = LibOVRHmdInfo()             # <<<<<<<<<<<<<<
 *     toReturn.c_data[0] = _hmdDesc
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHmdInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_toReturn = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":4657
 *     global _hmdDesc
 *     cdef LibOVRHmdInfo toReturn = LibOVRHmdInfo()
 *     toReturn.c_data[0] = _hmdDesc             # <<<<<<<<<<<<<<
 * 
 *     return toReturn
 */
  (__pyx_v_toReturn->c_data[0]) = __pyx_v_7psychxr_6libovr_7_libovr__hmdDesc;

  /* "psychxr/libovr/_libovr.pyx":4659
 *     toReturn.c_data[0] = _hmdDesc
 * 
 *     return toReturn             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4646
 * 
 * 
 * def getHmdInfo():             # <<<<<<<<<<<<<<
 *     """Get HMD information.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getHmdInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4662
 * 
 * 
 * def initialize(bint focusAware=False, int connectionTimeout=0, object logCallback=None):             # <<<<<<<<<<<<<<
 *     """Initialize the session.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_35initialize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_34initialize[] = "initialize(bool focusAware=False, int connectionTimeout=0, logCallback=None)\nInitialize the session.\n\n    Parameters\n    ----------\n    focusAware : bool, optional\n        Client is focus aware.\n    connectionTimeout : bool, optional\n        Timeout in milliseconds for connecting to the server.\n    logCallback : object, optional\n        Python callback function for logging. May be called at anytime from\n        any thread until :func:`shutdown` is called. Function must accept\n        arguments `level` and `message`. Where `level` is passed the logging\n        level and `message` the message string. Callbacks message levels can be\n        ``LOG_LEVEL_DEBUG``, ``LOG_LEVEL_INFO``, and ``LOG_LEVEL_ERROR``. The\n        application can filter messages accordingly.\n\n    Returns\n    -------\n    int\n        Return code of the LibOVR API call ``OVR::ovr_Initialize``. Returns\n        ``SUCCESS`` if completed without errors. In the event of an\n        error, possible return values are:\n\n        * ``ERROR_INITIALIZE``: Initialization error.\n        * ``ERROR_LIB_LOAD``:  Failed to load LibOVRRT.\n        * ``ERROR_LIB_VERSION``:  LibOVRRT version incompatible.\n        * ``ERROR_SERVICE_CONNECTION``:  Cannot connect to OVR service.\n        * ``ERROR_SERVICE_VERSION``: OVR service version is incompatible.\n        * ``ERROR_INCOMPATIBLE_OS``: Operating system version is incompatible.\n        * ``ERROR_DISPLAY_INIT``: Unable to initialize the HMD.\n        * ``ERROR_SERVER_START``:  Cannot start a server.\n        * ``ERROR_REINITIALIZATION``: Reinitialized with a different version.\n\n    Examples\n    --------\n    Passing a callback function for logging::\n\n        def myLoggingCallback(level, message):\n            level_text = {\n                LOG_LEVEL_DEBUG: '[DEBUG]:',\n                LOG_LEVEL_INFO: '[INFO]:',\n                LOG_LEVEL_ERROR: '[ERROR]:'}\n\n            # print message like '[INFO]: IAD changed to 62.1mm'\n            print(""level_text[level], message)\n\n        result = initialize(logCallback=myLoggingCallback)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_35initialize = {"initialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_35initialize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_34initialize};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_35initialize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_focusAware;
  int __pyx_v_connectionTimeout;
  PyObject *__pyx_v_logCallback = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_focusAware,&__pyx_n_s_connectionTimeout,&__pyx_n_s_logCallback,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_focusAware);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_connectionTimeout);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_logCallback);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize") < 0)) __PYX_ERR(0, 4662, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_focusAware = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_focusAware == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4662, __pyx_L3_error)
    } else {
      __pyx_v_focusAware = ((int)0);
    }
    if (values[1]) {
      __pyx_v_connectionTimeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_connectionTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4662, __pyx_L3_error)
    } else {
      __pyx_v_connectionTimeout = ((int)0);
    }
    __pyx_v_logCallback = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("initialize", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4662, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_34initialize(__pyx_self, __pyx_v_focusAware, __pyx_v_connectionTimeout, __pyx_v_logCallback);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_34initialize(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_focusAware, int __pyx_v_connectionTimeout, PyObject *__pyx_v_logCallback) {
  int32_t __pyx_v_flags;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("initialize", 0);

  /* "psychxr/libovr/_libovr.pyx":4712
 * 
 *     """
 *     cdef int32_t flags = capi.ovrInit_RequestVersion             # <<<<<<<<<<<<<<
 *     if focusAware is True:
 *         flags |= capi.ovrInit_FocusAware
 */
  __pyx_v_flags = ovrInit_RequestVersion;

  /* "psychxr/libovr/_libovr.pyx":4713
 *     """
 *     cdef int32_t flags = capi.ovrInit_RequestVersion
 *     if focusAware is True:             # <<<<<<<<<<<<<<
 *         flags |= capi.ovrInit_FocusAware
 * 
 */
  __pyx_t_1 = ((__pyx_v_focusAware == 1) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":4714
 *     cdef int32_t flags = capi.ovrInit_RequestVersion
 *     if focusAware is True:
 *         flags |= capi.ovrInit_FocusAware             # <<<<<<<<<<<<<<
 * 
 *     #if debug is True:
 */
    __pyx_v_flags = (__pyx_v_flags | ovrInit_FocusAware);

    /* "psychxr/libovr/_libovr.pyx":4713
 *     """
 *     cdef int32_t flags = capi.ovrInit_RequestVersion
 *     if focusAware is True:             # <<<<<<<<<<<<<<
 *         flags |= capi.ovrInit_FocusAware
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":4719
 *     #    flags |= capi.ovrInit_Debug
 *     global _initParams
 *     _initParams.Flags = flags             # <<<<<<<<<<<<<<
 *     _initParams.RequestedMinorVersion = capi.OVR_MINOR_VERSION
 * 
 */
  __pyx_v_7psychxr_6libovr_7_libovr__initParams.Flags = __pyx_v_flags;

  /* "psychxr/libovr/_libovr.pyx":4720
 *     global _initParams
 *     _initParams.Flags = flags
 *     _initParams.RequestedMinorVersion = capi.OVR_MINOR_VERSION             # <<<<<<<<<<<<<<
 * 
 *     if logCallback is not None:
 */
  __pyx_v_7psychxr_6libovr_7_libovr__initParams.RequestedMinorVersion = OVR_MINOR_VERSION;

  /* "psychxr/libovr/_libovr.pyx":4722
 *     _initParams.RequestedMinorVersion = capi.OVR_MINOR_VERSION
 * 
 *     if logCallback is not None:             # <<<<<<<<<<<<<<
 *         _initParams.LogCallback = <capi.ovrLogCallback>LibOVRLogCallback
 *         _initParams.UserData = <uintptr_t>(<void*>logCallback)
 */
  __pyx_t_1 = (__pyx_v_logCallback != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":4723
 * 
 *     if logCallback is not None:
 *         _initParams.LogCallback = <capi.ovrLogCallback>LibOVRLogCallback             # <<<<<<<<<<<<<<
 *         _initParams.UserData = <uintptr_t>(<void*>logCallback)
 *     else:
 */
    __pyx_v_7psychxr_6libovr_7_libovr__initParams.LogCallback = ((ovrLogCallback)__pyx_f_7psychxr_6libovr_7_libovr_LibOVRLogCallback);

    /* "psychxr/libovr/_libovr.pyx":4724
 *     if logCallback is not None:
 *         _initParams.LogCallback = <capi.ovrLogCallback>LibOVRLogCallback
 *         _initParams.UserData = <uintptr_t>(<void*>logCallback)             # <<<<<<<<<<<<<<
 *     else:
 *         _initParams.LogCallback = NULL
 */
    __pyx_v_7psychxr_6libovr_7_libovr__initParams.UserData = ((uintptr_t)((void *)__pyx_v_logCallback));

    /* "psychxr/libovr/_libovr.pyx":4722
 *     _initParams.RequestedMinorVersion = capi.OVR_MINOR_VERSION
 * 
 *     if logCallback is not None:             # <<<<<<<<<<<<<<
 *         _initParams.LogCallback = <capi.ovrLogCallback>LibOVRLogCallback
 *         _initParams.UserData = <uintptr_t>(<void*>logCallback)
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":4726
 *         _initParams.UserData = <uintptr_t>(<void*>logCallback)
 *     else:
 *         _initParams.LogCallback = NULL             # <<<<<<<<<<<<<<
 * 
 *     _initParams.ConnectionTimeoutMS = <uint32_t>connectionTimeout
 */
  /*else*/ {
    __pyx_v_7psychxr_6libovr_7_libovr__initParams.LogCallback = NULL;
  }
  __pyx_L4:;

  /* "psychxr/libovr/_libovr.pyx":4728
 *         _initParams.LogCallback = NULL
 * 
 *     _initParams.ConnectionTimeoutMS = <uint32_t>connectionTimeout             # <<<<<<<<<<<<<<
 *     cdef capi.ovrResult result = capi.ovr_Initialize(
 *         &_initParams)
 */
  __pyx_v_7psychxr_6libovr_7_libovr__initParams.ConnectionTimeoutMS = ((uint32_t)__pyx_v_connectionTimeout);

  /* "psychxr/libovr/_libovr.pyx":4729
 * 
 *     _initParams.ConnectionTimeoutMS = <uint32_t>connectionTimeout
 *     cdef capi.ovrResult result = capi.ovr_Initialize(             # <<<<<<<<<<<<<<
 *         &_initParams)
 * 
 */
  __pyx_v_result = ovr_Initialize((&__pyx_v_7psychxr_6libovr_7_libovr__initParams));

  /* "psychxr/libovr/_libovr.pyx":4732
 *         &_initParams)
 * 
 *     return result  # failed to initalize, return error code             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4662
 * 
 * 
 * def initialize(bint focusAware=False, int connectionTimeout=0, object logCallback=None):             # <<<<<<<<<<<<<<
 *     """Initialize the session.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4735
 * 
 * 
 * def create():             # <<<<<<<<<<<<<<
 *     """Create a new session. Control is handed over to the application from
 *     Oculus Home.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_37create(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_36create[] = "create()\nCreate a new session. Control is handed over to the application from\n    Oculus Home.\n\n    Starting a session will initialize and create a new session. Afterwards\n    API functions will return valid values.\n\n    Returns\n    -------\n    int\n        Result of the ``OVR::ovr_Create`` API call. A session was successfully\n        created if the result is ``SUCCESS``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_37create = {"create", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_37create, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_36create};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_37create(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_36create(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_36create(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrResult __pyx_v_result;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  ovrEyeType __pyx_t_6;
  ovrEyeType __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  ovrFovPort __pyx_t_9;
  __Pyx_RefNannySetupContext("create", 0);

  /* "psychxr/libovr/_libovr.pyx":4755
 *     global _eyeRenderDesc
 * 
 *     result = capi.ovr_Create(&_ptrSession, &_gfxLuid)             # <<<<<<<<<<<<<<
 *     check_result(result)
 *     if capi.OVR_FAILURE(result):
 */
  __pyx_v_result = ovr_Create((&__pyx_v_7psychxr_6libovr_7_libovr__ptrSession), (&__pyx_v_7psychxr_6libovr_7_libovr__gfxLuid));

  /* "psychxr/libovr/_libovr.pyx":4756
 * 
 *     result = capi.ovr_Create(&_ptrSession, &_gfxLuid)
 *     check_result(result)             # <<<<<<<<<<<<<<
 *     if capi.OVR_FAILURE(result):
 *         return result  # failed to create session, return error code
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":4757
 *     result = capi.ovr_Create(&_ptrSession, &_gfxLuid)
 *     check_result(result)
 *     if capi.OVR_FAILURE(result):             # <<<<<<<<<<<<<<
 *         return result  # failed to create session, return error code
 * 
 */
  __pyx_t_5 = (__pyx_f_7psychxr_6libovr_11libovr_capi_OVR_FAILURE(__pyx_v_result) != 0);
  if (__pyx_t_5) {

    /* "psychxr/libovr/_libovr.pyx":4758
 *     check_result(result)
 *     if capi.OVR_FAILURE(result):
 *         return result  # failed to create session, return error code             # <<<<<<<<<<<<<<
 * 
 *     # if we got to this point, everything should be fine
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":4757
 *     result = capi.ovr_Create(&_ptrSession, &_gfxLuid)
 *     check_result(result)
 *     if capi.OVR_FAILURE(result):             # <<<<<<<<<<<<<<
 *         return result  # failed to create session, return error code
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":4762
 *     # if we got to this point, everything should be fine
 *     # get HMD descriptor
 *     _hmdDesc = capi.ovr_GetHmdDesc(_ptrSession)             # <<<<<<<<<<<<<<
 * 
 *     # configure the eye render descriptor to use the recommended FOV, this
 */
  __pyx_v_7psychxr_6libovr_7_libovr__hmdDesc = ovr_GetHmdDesc(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":4766
 *     # configure the eye render descriptor to use the recommended FOV, this
 *     # can be changed later
 *     cdef Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 *     for i in range(capi.ovrEye_Count):
 *         _eyeRenderDesc[i] = capi.ovr_GetRenderDesc(
 */
  __pyx_v_i = 0;

  /* "psychxr/libovr/_libovr.pyx":4767
 *     # can be changed later
 *     cdef Py_ssize_t i = 0
 *     for i in range(capi.ovrEye_Count):             # <<<<<<<<<<<<<<
 *         _eyeRenderDesc[i] = capi.ovr_GetRenderDesc(
 *             _ptrSession,
 */
  __pyx_t_6 = ovrEye_Count;
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "psychxr/libovr/_libovr.pyx":4768
 *     cdef Py_ssize_t i = 0
 *     for i in range(capi.ovrEye_Count):
 *         _eyeRenderDesc[i] = capi.ovr_GetRenderDesc(             # <<<<<<<<<<<<<<
 *             _ptrSession,
 *             <capi.ovrEyeType>i,
 */
    (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_i]) = ovr_GetRenderDesc(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrEyeType)__pyx_v_i), (__pyx_v_7psychxr_6libovr_7_libovr__hmdDesc.DefaultEyeFov[__pyx_v_i]));

    /* "psychxr/libovr/_libovr.pyx":4773
 *             _hmdDesc.DefaultEyeFov[i])
 * 
 *         _eyeLayer.Fov[i] = _eyeRenderDesc[i].Fov             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_9 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_i]).Fov;
    (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Fov[__pyx_v_i]) = __pyx_t_9;
  }

  /* "psychxr/libovr/_libovr.pyx":4775
 *         _eyeLayer.Fov[i] = _eyeRenderDesc[i].Fov
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4735
 * 
 * 
 * def create():             # <<<<<<<<<<<<<<
 *     """Create a new session. Control is handed over to the application from
 *     Oculus Home.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4778
 * 
 * 
 * def destroyTextureSwapChain(int swapChain):             # <<<<<<<<<<<<<<
 *     """Destroy a texture swap chain.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_39destroyTextureSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_swapChain); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_38destroyTextureSwapChain[] = "destroyTextureSwapChain(int swapChain)\nDestroy a texture swap chain.\n\n    Once destroyed, the swap chain's resources will be freed.\n\n    Parameters\n    ----------\n    swapChain : int\n        Swap chain identifier/index.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_39destroyTextureSwapChain = {"destroyTextureSwapChain", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_39destroyTextureSwapChain, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_38destroyTextureSwapChain};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_39destroyTextureSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_swapChain) {
  int __pyx_v_swapChain;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroyTextureSwapChain (wrapper)", 0);
  assert(__pyx_arg_swapChain); {
    __pyx_v_swapChain = __Pyx_PyInt_As_int(__pyx_arg_swapChain); if (unlikely((__pyx_v_swapChain == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4778, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.destroyTextureSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_38destroyTextureSwapChain(__pyx_self, ((int)__pyx_v_swapChain));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_38destroyTextureSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroyTextureSwapChain", 0);

  /* "psychxr/libovr/_libovr.pyx":4791
 *     global _ptrSession
 *     global _swapChains
 *     capi.ovr_DestroyTextureSwapChain(_ptrSession, _swapChains[swapChain])             # <<<<<<<<<<<<<<
 *     _swapChains[swapChain] = NULL
 * 
 */
  ovr_DestroyTextureSwapChain(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_swapChain]));

  /* "psychxr/libovr/_libovr.pyx":4792
 *     global _swapChains
 *     capi.ovr_DestroyTextureSwapChain(_ptrSession, _swapChains[swapChain])
 *     _swapChains[swapChain] = NULL             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_swapChain]) = NULL;

  /* "psychxr/libovr/_libovr.pyx":4778
 * 
 * 
 * def destroyTextureSwapChain(int swapChain):             # <<<<<<<<<<<<<<
 *     """Destroy a texture swap chain.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4795
 * 
 * 
 * def destroyMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Destroy the mirror texture.
 *     """
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_41destroyMirrorTexture(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_40destroyMirrorTexture[] = "destroyMirrorTexture()\nDestroy the mirror texture.\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_41destroyMirrorTexture = {"destroyMirrorTexture", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_41destroyMirrorTexture, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_40destroyMirrorTexture};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_41destroyMirrorTexture(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroyMirrorTexture (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_40destroyMirrorTexture(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_40destroyMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroyMirrorTexture", 0);

  /* "psychxr/libovr/_libovr.pyx":4800
 *     global _ptrSession
 *     global _mirrorTexture
 *     if _mirrorTexture != NULL:             # <<<<<<<<<<<<<<
 *         capi.ovr_DestroyMirrorTexture(_ptrSession, _mirrorTexture)
 * 
 */
  __pyx_t_1 = ((__pyx_v_7psychxr_6libovr_7_libovr__mirrorTexture != NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":4801
 *     global _mirrorTexture
 *     if _mirrorTexture != NULL:
 *         capi.ovr_DestroyMirrorTexture(_ptrSession, _mirrorTexture)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    ovr_DestroyMirrorTexture(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_7psychxr_6libovr_7_libovr__mirrorTexture);

    /* "psychxr/libovr/_libovr.pyx":4800
 *     global _ptrSession
 *     global _mirrorTexture
 *     if _mirrorTexture != NULL:             # <<<<<<<<<<<<<<
 *         capi.ovr_DestroyMirrorTexture(_ptrSession, _mirrorTexture)
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":4795
 * 
 * 
 * def destroyMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Destroy the mirror texture.
 *     """
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4804
 * 
 * 
 * def destroy():             # <<<<<<<<<<<<<<
 *     """Destroy a session.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_43destroy(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_42destroy[] = "destroy()\nDestroy a session.\n\n    Must be called after every successful :func:`create` call. Calling destroy\n    will invalidate the current session and all resources must be freed and\n    re-created.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_43destroy = {"destroy", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_43destroy, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_42destroy};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_43destroy(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_42destroy(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_42destroy(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "psychxr/libovr/_libovr.pyx":4815
 *     global _eyeLayer
 *     # null eye textures in eye layer
 *     _eyeLayer.ColorTexture[0] = _eyeLayer.ColorTexture[1] = NULL             # <<<<<<<<<<<<<<
 * 
 *     # destroy the current session and shutdown
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.ColorTexture[0]) = NULL;
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.ColorTexture[1]) = NULL;

  /* "psychxr/libovr/_libovr.pyx":4818
 * 
 *     # destroy the current session and shutdown
 *     capi.ovr_Destroy(_ptrSession)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ovr_Destroy(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":4804
 * 
 * 
 * def destroy():             # <<<<<<<<<<<<<<
 *     """Destroy a session.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4821
 * 
 * 
 * def shutdown():             # <<<<<<<<<<<<<<
 *     """End the current session.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_45shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_44shutdown[] = "shutdown()\nEnd the current session.\n\n    Clean-up routines are executed that destroy all swap chains and mirror\n    texture buffers, afterwards control is returned to Oculus Home. This\n    must be called after every successful :func:`initialize` call.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_45shutdown = {"shutdown", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_45shutdown, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_44shutdown};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_45shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_44shutdown(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_44shutdown(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shutdown", 0);

  /* "psychxr/libovr/_libovr.pyx":4829
 * 
 *     """
 *     capi.ovr_Shutdown()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ovr_Shutdown();

  /* "psychxr/libovr/_libovr.pyx":4821
 * 
 * 
 * def shutdown():             # <<<<<<<<<<<<<<
 *     """End the current session.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4832
 * 
 * 
 * def getGraphicsLUID():             # <<<<<<<<<<<<<<
 *     """The graphics device LUID.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_47getGraphicsLUID(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_46getGraphicsLUID[] = "getGraphicsLUID()\nThe graphics device LUID.\n\n    Returns\n    -------\n    str\n        Reserved graphics LUID.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_47getGraphicsLUID = {"getGraphicsLUID", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_47getGraphicsLUID, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_46getGraphicsLUID};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_47getGraphicsLUID(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getGraphicsLUID (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_46getGraphicsLUID(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_46getGraphicsLUID(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getGraphicsLUID", 0);

  /* "psychxr/libovr/_libovr.pyx":4842
 *     """
 *     global _gfxLuid
 *     return _gfxLuid.Reserved.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_7psychxr_6libovr_7_libovr__gfxLuid.Reserved;
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4832
 * 
 * 
 * def getGraphicsLUID():             # <<<<<<<<<<<<<<
 *     """The graphics device LUID.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getGraphicsLUID", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4845
 * 
 * 
 * def setHighQuality(bint enable):             # <<<<<<<<<<<<<<
 *     """Enable high quality mode.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_49setHighQuality(PyObject *__pyx_self, PyObject *__pyx_arg_enable); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_48setHighQuality[] = "setHighQuality(bool enable)\nEnable high quality mode.\n\n    This enables 4x anisotropic sampling by the compositor to reduce the\n    appearance of high-frequency artifacts in the visual periphery due to\n    distortion.\n\n    Parameters\n    ----------\n    enable : bool\n        Enable high-quality mode.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_49setHighQuality = {"setHighQuality", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_49setHighQuality, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_48setHighQuality};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_49setHighQuality(PyObject *__pyx_self, PyObject *__pyx_arg_enable) {
  int __pyx_v_enable;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setHighQuality (wrapper)", 0);
  assert(__pyx_arg_enable); {
    __pyx_v_enable = __Pyx_PyObject_IsTrue(__pyx_arg_enable); if (unlikely((__pyx_v_enable == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4845, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setHighQuality", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_48setHighQuality(__pyx_self, ((int)__pyx_v_enable));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_48setHighQuality(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_enable) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setHighQuality", 0);

  /* "psychxr/libovr/_libovr.pyx":4859
 *     """
 *     global _eyeLayer
 *     if enable:             # <<<<<<<<<<<<<<
 *         _eyeLayer.Header.Flags |= capi.ovrLayerFlag_HighQuality
 *     else:
 */
  __pyx_t_1 = (__pyx_v_enable != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":4860
 *     global _eyeLayer
 *     if enable:
 *         _eyeLayer.Header.Flags |= capi.ovrLayerFlag_HighQuality             # <<<<<<<<<<<<<<
 *     else:
 *         _eyeLayer.Header.Flags &= ~capi.ovrLayerFlag_HighQuality
 */
    __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags = (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags | ovrLayerFlag_HighQuality);

    /* "psychxr/libovr/_libovr.pyx":4859
 *     """
 *     global _eyeLayer
 *     if enable:             # <<<<<<<<<<<<<<
 *         _eyeLayer.Header.Flags |= capi.ovrLayerFlag_HighQuality
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":4862
 *         _eyeLayer.Header.Flags |= capi.ovrLayerFlag_HighQuality
 *     else:
 *         _eyeLayer.Header.Flags &= ~capi.ovrLayerFlag_HighQuality             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags = (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags & (~ovrLayerFlag_HighQuality));
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":4845
 * 
 * 
 * def setHighQuality(bint enable):             # <<<<<<<<<<<<<<
 *     """Enable high quality mode.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4865
 * 
 * 
 * def setHeadLocked(bint enable):             # <<<<<<<<<<<<<<
 *     """Set the render layer state for head locking.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_51setHeadLocked(PyObject *__pyx_self, PyObject *__pyx_arg_enable); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_50setHeadLocked[] = "setHeadLocked(bool enable)\nSet the render layer state for head locking.\n\n    Head-locking prevents the compositor from applying asynchronous time warp\n    (ASW) which compensates for rendering latency. Under normal circumstances\n    where head pose data is retrieved from `LibOVR` using\n    :func:`getTrackingState` or :func:`getDevicePoses` calls, it\n    should be enabled to prevent juddering and improve visual stability.\n\n    However, when using custom head poses (eg. fixed, or from a motion tracker)\n    this system may cause the render layer to slip around, as internal IMU data\n    will be incongruous with head position data. If you plan on passing custom\n    poses to :func:`calcEyePoses`, ensure that head locking is enabled.\n\n    Head locking is disabled by default when a session is started.\n\n    Parameters\n    ----------\n    enable : bool\n        Enable head-locking when rendering to the eye render layer.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_51setHeadLocked = {"setHeadLocked", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_51setHeadLocked, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_50setHeadLocked};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_51setHeadLocked(PyObject *__pyx_self, PyObject *__pyx_arg_enable) {
  int __pyx_v_enable;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setHeadLocked (wrapper)", 0);
  assert(__pyx_arg_enable); {
    __pyx_v_enable = __Pyx_PyObject_IsTrue(__pyx_arg_enable); if (unlikely((__pyx_v_enable == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4865, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setHeadLocked", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_50setHeadLocked(__pyx_self, ((int)__pyx_v_enable));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_50setHeadLocked(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_enable) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setHeadLocked", 0);

  /* "psychxr/libovr/_libovr.pyx":4888
 *     """
 *     global _eyeLayer
 *     if enable:             # <<<<<<<<<<<<<<
 *         _eyeLayer.Header.Flags |= capi.ovrLayerFlag_HeadLocked
 *     else:
 */
  __pyx_t_1 = (__pyx_v_enable != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":4889
 *     global _eyeLayer
 *     if enable:
 *         _eyeLayer.Header.Flags |= capi.ovrLayerFlag_HeadLocked             # <<<<<<<<<<<<<<
 *     else:
 *         _eyeLayer.Header.Flags &= ~capi.ovrLayerFlag_HeadLocked
 */
    __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags = (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags | ovrLayerFlag_HeadLocked);

    /* "psychxr/libovr/_libovr.pyx":4888
 *     """
 *     global _eyeLayer
 *     if enable:             # <<<<<<<<<<<<<<
 *         _eyeLayer.Header.Flags |= capi.ovrLayerFlag_HeadLocked
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":4891
 *         _eyeLayer.Header.Flags |= capi.ovrLayerFlag_HeadLocked
 *     else:
 *         _eyeLayer.Header.Flags &= ~capi.ovrLayerFlag_HeadLocked             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags = (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags & (~ovrLayerFlag_HeadLocked));
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":4865
 * 
 * 
 * def setHeadLocked(bint enable):             # <<<<<<<<<<<<<<
 *     """Set the render layer state for head locking.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4894
 * 
 * 
 * def isHeadLocked():             # <<<<<<<<<<<<<<
 *     """Check if head locking is enabled.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_53isHeadLocked(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_52isHeadLocked[] = "isHeadLocked()\nCheck if head locking is enabled.\n\n    Returns\n    -------\n    bool\n        ``True`` if head-locking is enabled.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_53isHeadLocked = {"isHeadLocked", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_53isHeadLocked, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_52isHeadLocked};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_53isHeadLocked(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isHeadLocked (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_52isHeadLocked(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_52isHeadLocked(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("isHeadLocked", 0);

  /* "psychxr/libovr/_libovr.pyx":4904
 *     """
 * 
 *     return (_eyeLayer.Header.Flags & capi.ovrLayerFlag_HeadLocked) == \             # <<<<<<<<<<<<<<
 *            capi.ovrLayerFlag_HeadLocked
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "psychxr/libovr/_libovr.pyx":4905
 * 
 *     return (_eyeLayer.Header.Flags & capi.ovrLayerFlag_HeadLocked) == \
 *            capi.ovrLayerFlag_HeadLocked             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags & ovrLayerFlag_HeadLocked) == ovrLayerFlag_HeadLocked)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4894
 * 
 * 
 * def isHeadLocked():             # <<<<<<<<<<<<<<
 *     """Check if head locking is enabled.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.isHeadLocked", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4908
 * 
 * 
 * def getPixelsPerTanAngleAtCenter(int eye):             # <<<<<<<<<<<<<<
 *     """Get pixels per tan angle (=1) at the center of the display.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_55getPixelsPerTanAngleAtCenter(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_54getPixelsPerTanAngleAtCenter[] = "getPixelsPerTanAngleAtCenter(int eye)\nGet pixels per tan angle (=1) at the center of the display.\n\n    Values reflect the FOVs set by the last call to :func:`setEyeRenderFov` (or\n    else the default FOVs will be used.)\n\n    Parameters\n    ----------\n    eye : int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    tuple\n        Pixels per tan angle at the center of the screen.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_55getPixelsPerTanAngleAtCenter = {"getPixelsPerTanAngleAtCenter", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_55getPixelsPerTanAngleAtCenter, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_54getPixelsPerTanAngleAtCenter};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_55getPixelsPerTanAngleAtCenter(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPixelsPerTanAngleAtCenter (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4908, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getPixelsPerTanAngleAtCenter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_54getPixelsPerTanAngleAtCenter(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_54getPixelsPerTanAngleAtCenter(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  ovrVector2f __pyx_v_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrVector2f __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getPixelsPerTanAngleAtCenter", 0);

  /* "psychxr/libovr/_libovr.pyx":4928
 * 
 *     cdef capi.ovrVector2f toReturn = \
 *         _eyeRenderDesc[eye].PixelsPerTanAngleAtCenter             # <<<<<<<<<<<<<<
 * 
 *     return toReturn.x, toReturn.y
 */
  __pyx_t_1 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).PixelsPerTanAngleAtCenter;
  __pyx_v_toReturn = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":4930
 *         _eyeRenderDesc[eye].PixelsPerTanAngleAtCenter
 * 
 *     return toReturn.x, toReturn.y             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_toReturn.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_toReturn.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4908
 * 
 * 
 * def getPixelsPerTanAngleAtCenter(int eye):             # <<<<<<<<<<<<<<
 *     """Get pixels per tan angle (=1) at the center of the display.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getPixelsPerTanAngleAtCenter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4933
 * 
 * 
 * def getTanAngleToRenderTargetNDC(int eye, object tanAngle):             # <<<<<<<<<<<<<<
 *     """Convert FOV tan angle to normalized device coordinates (NDC).
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_57getTanAngleToRenderTargetNDC(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_56getTanAngleToRenderTargetNDC[] = "getTanAngleToRenderTargetNDC(int eye, tanAngle)\nConvert FOV tan angle to normalized device coordinates (NDC).\n\n    Parameters\n    ----------\n    eye : int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n    tanAngle : tuple, list of float or ndarray\n        Horizontal and vertical tan angles [X, Y] from display center.\n\n    Returns\n    -------\n    tuple\n        NDC coordinates X, Y [-1, 1].\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_57getTanAngleToRenderTargetNDC = {"getTanAngleToRenderTargetNDC", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_57getTanAngleToRenderTargetNDC, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_56getTanAngleToRenderTargetNDC};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_57getTanAngleToRenderTargetNDC(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  PyObject *__pyx_v_tanAngle = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTanAngleToRenderTargetNDC (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_tanAngle,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tanAngle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getTanAngleToRenderTargetNDC", 1, 2, 2, 1); __PYX_ERR(0, 4933, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTanAngleToRenderTargetNDC") < 0)) __PYX_ERR(0, 4933, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4933, __pyx_L3_error)
    __pyx_v_tanAngle = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTanAngleToRenderTargetNDC", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4933, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTanAngleToRenderTargetNDC", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_56getTanAngleToRenderTargetNDC(__pyx_self, __pyx_v_eye, __pyx_v_tanAngle);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_56getTanAngleToRenderTargetNDC(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyObject *__pyx_v_tanAngle) {
  OVR::Vector2f __pyx_v_vecIn;
  OVR::Vector2f __pyx_v_toReturn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getTanAngleToRenderTargetNDC", 0);

  /* "psychxr/libovr/_libovr.pyx":4952
 * 
 *     cdef libovr_math.Vector2f vecIn
 *     vecIn.x = tanAngle[0]             # <<<<<<<<<<<<<<
 *     vecIn.y = tanAngle[1]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tanAngle, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_vecIn.x = __pyx_t_2;

  /* "psychxr/libovr/_libovr.pyx":4953
 *     cdef libovr_math.Vector2f vecIn
 *     vecIn.x = tanAngle[0]
 *     vecIn.y = tanAngle[1]             # <<<<<<<<<<<<<<
 * 
 *     cdef libovr_math.Vector2f toReturn = \
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tanAngle, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_vecIn.y = __pyx_t_2;

  /* "psychxr/libovr/_libovr.pyx":4956
 * 
 *     cdef libovr_math.Vector2f toReturn = \
 *         (<libovr_math.FovPort>_eyeRenderDesc[eye].Fov).TanAngleToRendertargetNDC(             # <<<<<<<<<<<<<<
 *             vecIn)
 * 
 */
  __pyx_v_toReturn = ((OVR::FovPort)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov).TanAngleToRendertargetNDC(__pyx_v_vecIn);

  /* "psychxr/libovr/_libovr.pyx":4959
 *             vecIn)
 * 
 *     return toReturn.x, toReturn.y             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_toReturn.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_toReturn.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4933
 * 
 * 
 * def getTanAngleToRenderTargetNDC(int eye, object tanAngle):             # <<<<<<<<<<<<<<
 *     """Convert FOV tan angle to normalized device coordinates (NDC).
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTanAngleToRenderTargetNDC", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4962
 * 
 * 
 * def getPixelsPerDegree(int eye):             # <<<<<<<<<<<<<<
 *     """Get pixels per degree at the center of the display.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_59getPixelsPerDegree(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_58getPixelsPerDegree[] = "getPixelsPerDegree(int eye)\nGet pixels per degree at the center of the display.\n\n    Values reflect the FOVs set by the last call to :func:`setEyeRenderFov` (or\n    else the default FOVs will be used.)\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    tuple\n        Pixels per degree at the center of the screen (h, v).\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_59getPixelsPerDegree = {"getPixelsPerDegree", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_59getPixelsPerDegree, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_58getPixelsPerDegree};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_59getPixelsPerDegree(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPixelsPerDegree (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4962, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getPixelsPerDegree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_58getPixelsPerDegree(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_58getPixelsPerDegree(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  ovrVector2f __pyx_v_pixelsPerTanAngle;
  float __pyx_v_horzPixelPerDeg;
  float __pyx_v_vertPixelPerDeg;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrVector2f __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getPixelsPerDegree", 0);

  /* "psychxr/libovr/_libovr.pyx":4982
 * 
 *     cdef capi.ovrVector2f pixelsPerTanAngle = \
 *         _eyeRenderDesc[eye].PixelsPerTanAngleAtCenter             # <<<<<<<<<<<<<<
 * 
 *     # tan(angle)=1 -> 45 deg
 */
  __pyx_t_1 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).PixelsPerTanAngleAtCenter;
  __pyx_v_pixelsPerTanAngle = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":4985
 * 
 *     # tan(angle)=1 -> 45 deg
 *     cdef float horzPixelPerDeg = <float>pixelsPerTanAngle.x / <float>45.0             # <<<<<<<<<<<<<<
 *     cdef float vertPixelPerDeg = <float>pixelsPerTanAngle.y / <float>45.0
 * 
 */
  __pyx_v_horzPixelPerDeg = (((float)__pyx_v_pixelsPerTanAngle.x) / ((float)45.0));

  /* "psychxr/libovr/_libovr.pyx":4986
 *     # tan(angle)=1 -> 45 deg
 *     cdef float horzPixelPerDeg = <float>pixelsPerTanAngle.x / <float>45.0
 *     cdef float vertPixelPerDeg = <float>pixelsPerTanAngle.y / <float>45.0             # <<<<<<<<<<<<<<
 * 
 *     return horzPixelPerDeg, vertPixelPerDeg
 */
  __pyx_v_vertPixelPerDeg = (((float)__pyx_v_pixelsPerTanAngle.y) / ((float)45.0));

  /* "psychxr/libovr/_libovr.pyx":4988
 *     cdef float vertPixelPerDeg = <float>pixelsPerTanAngle.y / <float>45.0
 * 
 *     return horzPixelPerDeg, vertPixelPerDeg             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_horzPixelPerDeg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vertPixelPerDeg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4962
 * 
 * 
 * def getPixelsPerDegree(int eye):             # <<<<<<<<<<<<<<
 *     """Get pixels per degree at the center of the display.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getPixelsPerDegree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":4991
 * 
 * 
 * def getDistortedViewport(int eye):             # <<<<<<<<<<<<<<
 *     """Get the distorted viewport.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_61getDistortedViewport(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_60getDistortedViewport[] = "getDistortedViewport(int eye)\nGet the distorted viewport.\n\n    You must call :func:`setEyeRenderFov` first for values to be valid.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_61getDistortedViewport = {"getDistortedViewport", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_61getDistortedViewport, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_60getDistortedViewport};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_61getDistortedViewport(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDistortedViewport (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4991, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getDistortedViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_60getDistortedViewport(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_60getDistortedViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  ovrRecti __pyx_v_distVp;
  PyArrayObject *__pyx_v_toReturn = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrRecti __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("getDistortedViewport", 0);

  /* "psychxr/libovr/_libovr.pyx":5002
 * 
 *     """
 *     cdef capi.ovrRecti distVp = _eyeRenderDesc[eye].DistortedViewport             # <<<<<<<<<<<<<<
 * 
 *     cdef np.ndarray toReturn = np.asarray([
 */
  __pyx_t_1 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).DistortedViewport;
  __pyx_v_distVp = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":5004
 *     cdef capi.ovrRecti distVp = _eyeRenderDesc[eye].DistortedViewport
 * 
 *     cdef np.ndarray toReturn = np.asarray([             # <<<<<<<<<<<<<<
 *         distVp.Pos.x,
 *         distVp.Pos.x,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":5005
 * 
 *     cdef np.ndarray toReturn = np.asarray([
 *         distVp.Pos.x,             # <<<<<<<<<<<<<<
 *         distVp.Pos.x,
 *         distVp.Size.w,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_distVp.Pos.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":5006
 *     cdef np.ndarray toReturn = np.asarray([
 *         distVp.Pos.x,
 *         distVp.Pos.x,             # <<<<<<<<<<<<<<
 *         distVp.Size.w,
 *         distVp.Size.h],
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_distVp.Pos.x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":5007
 *         distVp.Pos.x,
 *         distVp.Pos.x,
 *         distVp.Size.w,             # <<<<<<<<<<<<<<
 *         distVp.Size.h],
 *         dtype=np.int)
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_distVp.Size.w); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "psychxr/libovr/_libovr.pyx":5008
 *         distVp.Pos.x,
 *         distVp.Size.w,
 *         distVp.Size.h],             # <<<<<<<<<<<<<<
 *         dtype=np.int)
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_distVp.Size.h); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "psychxr/libovr/_libovr.pyx":5004
 *     cdef capi.ovrRecti distVp = _eyeRenderDesc[eye].DistortedViewport
 * 
 *     cdef np.ndarray toReturn = np.asarray([             # <<<<<<<<<<<<<<
 *         distVp.Pos.x,
 *         distVp.Pos.x,
 */
  __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5009
 *         distVp.Size.w,
 *         distVp.Size.h],
 *         dtype=np.int)             # <<<<<<<<<<<<<<
 * 
 *     return toReturn
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 5009, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "psychxr/libovr/_libovr.pyx":5004
 *     cdef capi.ovrRecti distVp = _eyeRenderDesc[eye].DistortedViewport
 * 
 *     cdef np.ndarray toReturn = np.asarray([             # <<<<<<<<<<<<<<
 *         distVp.Pos.x,
 *         distVp.Pos.x,
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 5004, __pyx_L1_error)
  __pyx_v_toReturn = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "psychxr/libovr/_libovr.pyx":5011
 *         dtype=np.int)
 * 
 *     return toReturn             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_toReturn));
  __pyx_r = ((PyObject *)__pyx_v_toReturn);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":4991
 * 
 * 
 * def getDistortedViewport(int eye):             # <<<<<<<<<<<<<<
 *     """Get the distorted viewport.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getDistortedViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5014
 * 
 * 
 * def getEyeRenderFov(int eye):             # <<<<<<<<<<<<<<
 *     """Get the field-of-view to use for rendering.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_63getEyeRenderFov(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_62getEyeRenderFov[] = "getEyeRenderFov(int eye)\nGet the field-of-view to use for rendering.\n\n    The FOV for a given eye are defined as a tuple of tangent angles (Up,\n    Down, Left, Right). By default, this function will return the default\n    (recommended) FOVs after :func:`create` is called.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    ndarray\n        Eye FOV tangent angles [UpTan, DownTan, LeftTan, RightTan].\n\n    Examples\n    --------\n    Getting the tangent angles::\n\n        leftFov = getEyeRenderFOV(EYE_LEFT)\n        # left FOV tangent angles, do the same for the right\n        upTan, downTan, leftTan, rightTan =  leftFov\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_63getEyeRenderFov = {"getEyeRenderFov", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_63getEyeRenderFov, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_62getEyeRenderFov};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_63getEyeRenderFov(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeRenderFov (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5014, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeRenderFov", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_62getEyeRenderFov(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_62getEyeRenderFov(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  PyArrayObject *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getEyeRenderFov", 0);

  /* "psychxr/libovr/_libovr.pyx":5041
 *     """
 *     global _eyeRenderDesc
 *     cdef np.ndarray to_return = np.asarray([             # <<<<<<<<<<<<<<
 *         _eyeRenderDesc[eye].Fov.UpTan,
 *         _eyeRenderDesc[eye].Fov.DownTan,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":5042
 *     global _eyeRenderDesc
 *     cdef np.ndarray to_return = np.asarray([
 *         _eyeRenderDesc[eye].Fov.UpTan,             # <<<<<<<<<<<<<<
 *         _eyeRenderDesc[eye].Fov.DownTan,
 *         _eyeRenderDesc[eye].Fov.LeftTan,
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov.UpTan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/libovr/_libovr.pyx":5043
 *     cdef np.ndarray to_return = np.asarray([
 *         _eyeRenderDesc[eye].Fov.UpTan,
 *         _eyeRenderDesc[eye].Fov.DownTan,             # <<<<<<<<<<<<<<
 *         _eyeRenderDesc[eye].Fov.LeftTan,
 *         _eyeRenderDesc[eye].Fov.RightTan],
 */
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov.DownTan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "psychxr/libovr/_libovr.pyx":5044
 *         _eyeRenderDesc[eye].Fov.UpTan,
 *         _eyeRenderDesc[eye].Fov.DownTan,
 *         _eyeRenderDesc[eye].Fov.LeftTan,             # <<<<<<<<<<<<<<
 *         _eyeRenderDesc[eye].Fov.RightTan],
 *         dtype=np.float32)
 */
  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov.LeftTan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "psychxr/libovr/_libovr.pyx":5045
 *         _eyeRenderDesc[eye].Fov.DownTan,
 *         _eyeRenderDesc[eye].Fov.LeftTan,
 *         _eyeRenderDesc[eye].Fov.RightTan],             # <<<<<<<<<<<<<<
 *         dtype=np.float32)
 * 
 */
  __pyx_t_5 = PyFloat_FromDouble((__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov.RightTan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "psychxr/libovr/_libovr.pyx":5041
 *     """
 *     global _eyeRenderDesc
 *     cdef np.ndarray to_return = np.asarray([             # <<<<<<<<<<<<<<
 *         _eyeRenderDesc[eye].Fov.UpTan,
 *         _eyeRenderDesc[eye].Fov.DownTan,
 */
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":5046
 *         _eyeRenderDesc[eye].Fov.LeftTan,
 *         _eyeRenderDesc[eye].Fov.RightTan],
 *         dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 5046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":5041
 *     """
 *     global _eyeRenderDesc
 *     cdef np.ndarray to_return = np.asarray([             # <<<<<<<<<<<<<<
 *         _eyeRenderDesc[eye].Fov.UpTan,
 *         _eyeRenderDesc[eye].Fov.DownTan,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 5041, __pyx_L1_error)
  __pyx_v_to_return = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":5048
 *         dtype=np.float32)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5014
 * 
 * 
 * def getEyeRenderFov(int eye):             # <<<<<<<<<<<<<<
 *     """Get the field-of-view to use for rendering.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeRenderFov", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5051
 * 
 * 
 * def setEyeRenderFov(int eye, object fov):             # <<<<<<<<<<<<<<
 *     """Set the field-of-view of a given eye. This is used to compute the
 *     projection matrix.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_65setEyeRenderFov(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_64setEyeRenderFov[] = "setEyeRenderFov(int eye, fov)\nSet the field-of-view of a given eye. This is used to compute the\n    projection matrix.\n\n    By default, this function will return the default FOVs after :func:`create`\n    is called (see :py:attr:`LibOVRHmdInfo.defaultEyeFov`). You can override\n    these values using :py:attr:`LibOVRHmdInfo.maxEyeFov` and\n    :py:attr:`LibOVRHmdInfo.symmetricEyeFov`, or with custom values (see\n    Examples below).\n\n    Parameters\n    ----------\n    eye : int\n        Eye index. Values are ``EYE_LEFT`` and ``EYE_RIGHT``.\n    fov : array_like\n        Eye FOV tangent angles [UpTan, DownTan, LeftTan, RightTan].\n\n    Examples\n    --------\n\n    Setting eye render FOVs to symmetric (needed for mono rendering)::\n\n        leftFov, rightFov = getSymmetricEyeFOVs()\n        setEyeRenderFOV(EYE_LEFT, leftFov)\n        setEyeRenderFOV(EYE_RIGHT, rightFov)\n\n    Using custom values::\n\n        # Up, Down, Left, Right tan angles\n        setEyeRenderFOV(EYE_LEFT, [1.0, -1.0, -1.0, 1.0])\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_65setEyeRenderFov = {"setEyeRenderFov", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_65setEyeRenderFov, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_64setEyeRenderFov};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_65setEyeRenderFov(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  PyObject *__pyx_v_fov = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setEyeRenderFov (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_fov,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fov)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setEyeRenderFov", 1, 2, 2, 1); __PYX_ERR(0, 5051, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEyeRenderFov") < 0)) __PYX_ERR(0, 5051, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5051, __pyx_L3_error)
    __pyx_v_fov = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setEyeRenderFov", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5051, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setEyeRenderFov", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_64setEyeRenderFov(__pyx_self, __pyx_v_eye, __pyx_v_fov);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_64setEyeRenderFov(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyObject *__pyx_v_fov) {
  ovrFovPort __pyx_v_fov_in;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  float __pyx_t_2;
  ovrFovPort __pyx_t_3;
  __Pyx_RefNannySetupContext("setEyeRenderFov", 0);

  /* "psychxr/libovr/_libovr.pyx":5088
 * 
 *     cdef capi.ovrFovPort fov_in
 *     fov_in.UpTan = <float>fov[0]             # <<<<<<<<<<<<<<
 *     fov_in.DownTan = <float>fov[1]
 *     fov_in.LeftTan = <float>fov[2]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fov, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 5088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_fov_in.UpTan = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":5089
 *     cdef capi.ovrFovPort fov_in
 *     fov_in.UpTan = <float>fov[0]
 *     fov_in.DownTan = <float>fov[1]             # <<<<<<<<<<<<<<
 *     fov_in.LeftTan = <float>fov[2]
 *     fov_in.RightTan = <float>fov[3]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fov, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 5089, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_fov_in.DownTan = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":5090
 *     fov_in.UpTan = <float>fov[0]
 *     fov_in.DownTan = <float>fov[1]
 *     fov_in.LeftTan = <float>fov[2]             # <<<<<<<<<<<<<<
 *     fov_in.RightTan = <float>fov[3]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fov, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 5090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_fov_in.LeftTan = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":5091
 *     fov_in.DownTan = <float>fov[1]
 *     fov_in.LeftTan = <float>fov[2]
 *     fov_in.RightTan = <float>fov[3]             # <<<<<<<<<<<<<<
 * 
 *     _eyeRenderDesc[<int>eye] = capi.ovr_GetRenderDesc(
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fov, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 5091, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_fov_in.RightTan = ((float)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":5093
 *     fov_in.RightTan = <float>fov[3]
 * 
 *     _eyeRenderDesc[<int>eye] = capi.ovr_GetRenderDesc(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         <capi.ovrEyeType>eye,
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[((int)__pyx_v_eye)]) = ovr_GetRenderDesc(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrEyeType)__pyx_v_eye), __pyx_v_fov_in);

  /* "psychxr/libovr/_libovr.pyx":5099
 * 
 *     # set in eye layer too
 *     _eyeLayer.Fov[eye] = _eyeRenderDesc[eye].Fov             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov;
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Fov[__pyx_v_eye]) = __pyx_t_3;

  /* "psychxr/libovr/_libovr.pyx":5051
 * 
 * 
 * def setEyeRenderFov(int eye, object fov):             # <<<<<<<<<<<<<<
 *     """Set the field-of-view of a given eye. This is used to compute the
 *     projection matrix.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setEyeRenderFov", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5102
 * 
 * 
 * def getEyeAspectRatio(int eye):             # <<<<<<<<<<<<<<
 *     """Get the aspect ratio of an eye.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_67getEyeAspectRatio(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_66getEyeAspectRatio[] = "getEyeAspectRatio(int eye)\nGet the aspect ratio of an eye.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    float\n        Aspect ratio of the eye's FOV (width / height).\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_67getEyeAspectRatio = {"getEyeAspectRatio", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_67getEyeAspectRatio, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_66getEyeAspectRatio};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_67getEyeAspectRatio(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeAspectRatio (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5102, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeAspectRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_66getEyeAspectRatio(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_66getEyeAspectRatio(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  OVR::FovPort __pyx_v_fovPort;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  float __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getEyeAspectRatio", 0);

  /* "psychxr/libovr/_libovr.pyx":5117
 *     """
 *     cdef libovr_math.FovPort fovPort = \
 *         <libovr_math.FovPort>_eyeRenderDesc[eye].Fov             # <<<<<<<<<<<<<<
 * 
 *     return (fovPort.LeftTan + fovPort.RightTan) / \
 */
  __pyx_v_fovPort = ((OVR::FovPort)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov);

  /* "psychxr/libovr/_libovr.pyx":5119
 *         <libovr_math.FovPort>_eyeRenderDesc[eye].Fov
 * 
 *     return (fovPort.LeftTan + fovPort.RightTan) / \             # <<<<<<<<<<<<<<
 *            (fovPort.UpTan + fovPort.DownTan)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__pyx_v_fovPort.LeftTan + __pyx_v_fovPort.RightTan);

  /* "psychxr/libovr/_libovr.pyx":5120
 * 
 *     return (fovPort.LeftTan + fovPort.RightTan) / \
 *            (fovPort.UpTan + fovPort.DownTan)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (__pyx_v_fovPort.UpTan + __pyx_v_fovPort.DownTan);

  /* "psychxr/libovr/_libovr.pyx":5119
 *         <libovr_math.FovPort>_eyeRenderDesc[eye].Fov
 * 
 *     return (fovPort.LeftTan + fovPort.RightTan) / \             # <<<<<<<<<<<<<<
 *            (fovPort.UpTan + fovPort.DownTan)
 * 
 */
  if (unlikely(__pyx_t_2 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 5119, __pyx_L1_error)
  }
  __pyx_t_3 = PyFloat_FromDouble((__pyx_t_1 / __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5102
 * 
 * 
 * def getEyeAspectRatio(int eye):             # <<<<<<<<<<<<<<
 *     """Get the aspect ratio of an eye.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeAspectRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5123
 * 
 * 
 * def getEyeHorizontalFovRadians(int eye):             # <<<<<<<<<<<<<<
 *     """Get the angle of the horizontal field-of-view (FOV) for a given eye.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_69getEyeHorizontalFovRadians(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_68getEyeHorizontalFovRadians[] = "getEyeHorizontalFovRadians(int eye)\nGet the angle of the horizontal field-of-view (FOV) for a given eye.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    float\n        Horizontal FOV of a given eye in radians.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_69getEyeHorizontalFovRadians = {"getEyeHorizontalFovRadians", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_69getEyeHorizontalFovRadians, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_68getEyeHorizontalFovRadians};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_69getEyeHorizontalFovRadians(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeHorizontalFovRadians (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5123, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeHorizontalFovRadians", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_68getEyeHorizontalFovRadians(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_68getEyeHorizontalFovRadians(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  OVR::FovPort __pyx_v_fovPort;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getEyeHorizontalFovRadians", 0);

  /* "psychxr/libovr/_libovr.pyx":5138
 *     """
 *     cdef libovr_math.FovPort fovPort = \
 *         <libovr_math.FovPort>_eyeRenderDesc[eye].Fov             # <<<<<<<<<<<<<<
 * 
 *     return fovPort.GetHorizontalFovRadians()
 */
  __pyx_v_fovPort = ((OVR::FovPort)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov);

  /* "psychxr/libovr/_libovr.pyx":5140
 *         <libovr_math.FovPort>_eyeRenderDesc[eye].Fov
 * 
 *     return fovPort.GetHorizontalFovRadians()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_fovPort.GetHorizontalFovRadians()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5123
 * 
 * 
 * def getEyeHorizontalFovRadians(int eye):             # <<<<<<<<<<<<<<
 *     """Get the angle of the horizontal field-of-view (FOV) for a given eye.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeHorizontalFovRadians", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5143
 * 
 * 
 * def getEyeVerticalFovRadians(int eye):             # <<<<<<<<<<<<<<
 *     """Get the angle of the vertical field-of-view (FOV) for a given eye.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_71getEyeVerticalFovRadians(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_70getEyeVerticalFovRadians[] = "getEyeVerticalFovRadians(int eye)\nGet the angle of the vertical field-of-view (FOV) for a given eye.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    float\n        Vertical FOV of a given eye in radians.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_71getEyeVerticalFovRadians = {"getEyeVerticalFovRadians", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_71getEyeVerticalFovRadians, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_70getEyeVerticalFovRadians};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_71getEyeVerticalFovRadians(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeVerticalFovRadians (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5143, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeVerticalFovRadians", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_70getEyeVerticalFovRadians(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_70getEyeVerticalFovRadians(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  OVR::FovPort __pyx_v_fovPort;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getEyeVerticalFovRadians", 0);

  /* "psychxr/libovr/_libovr.pyx":5158
 *     """
 *     cdef libovr_math.FovPort fovPort = \
 *         <libovr_math.FovPort>_eyeRenderDesc[eye].Fov             # <<<<<<<<<<<<<<
 * 
 *     return fovPort.GetVerticalFovRadians()
 */
  __pyx_v_fovPort = ((OVR::FovPort)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov);

  /* "psychxr/libovr/_libovr.pyx":5160
 *         <libovr_math.FovPort>_eyeRenderDesc[eye].Fov
 * 
 *     return fovPort.GetVerticalFovRadians()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_fovPort.GetVerticalFovRadians()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5143
 * 
 * 
 * def getEyeVerticalFovRadians(int eye):             # <<<<<<<<<<<<<<
 *     """Get the angle of the vertical field-of-view (FOV) for a given eye.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeVerticalFovRadians", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5163
 * 
 * 
 * def getEyeFocalLength(int eye):             # <<<<<<<<<<<<<<
 *     """Get the focal length of the eye's frustum.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_73getEyeFocalLength(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_72getEyeFocalLength[] = "getEyeFocalLength(int eye)\nGet the focal length of the eye's frustum.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    float\n        Focal length in meters.\n\n    Notes\n    -----\n    * This does not reflect the optical focal length of the HMD.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_73getEyeFocalLength = {"getEyeFocalLength", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_73getEyeFocalLength, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_72getEyeFocalLength};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_73getEyeFocalLength(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeFocalLength (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5163, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeFocalLength", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_72getEyeFocalLength(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_72getEyeFocalLength(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  double __pyx_t_6;
  __Pyx_RefNannySetupContext("getEyeFocalLength", 0);

  /* "psychxr/libovr/_libovr.pyx":5181
 * 
 *     """
 *     return 1.0 / tan(getEyeHorizontalFovRadians(eye) / 2.0)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getEyeHorizontalFovRadians); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_eye); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_1, __pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = tan(__pyx_t_5);
  if (unlikely(__pyx_t_6 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 5181, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble((1.0 / __pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5163
 * 
 * 
 * def getEyeFocalLength(int eye):             # <<<<<<<<<<<<<<
 *     """Get the focal length of the eye's frustum.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeFocalLength", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5184
 * 
 * 
 * def calcEyeBufferSize(int eye, float texelsPerPixel=1.0):             # <<<<<<<<<<<<<<
 *     """Get the recommended buffer (texture) sizes for eye buffers.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_75calcEyeBufferSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_74calcEyeBufferSize[] = "calcEyeBufferSize(int eye, float texelsPerPixel=1.0)\nGet the recommended buffer (texture) sizes for eye buffers.\n\n    Should be called after :func:`setEyeRenderFov`. Returns buffer resolutions in\n    pixels (w, h). The values can be used when configuring a framebuffer or swap\n    chain for rendering.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n    texelsPerPixel : float, optional\n        Display pixels per texture pixels at the center of the display. Use a\n        value less than 1.0 to improve performance at the cost of resolution.\n        Specifying a larger texture is possible, but not recommended by the\n        manufacturer.\n\n    Returns\n    -------\n    tuple\n        Buffer widths and heights (w, h) for each eye.\n\n    Examples\n    --------\n\n    Getting the buffer size for the swap chain::\n\n        # get HMD info\n        hmdInfo = getHmdInfo()\n\n        # eye FOVs must be set first!\n        leftFov, rightFov = hmdInfo.defaultEyeFov\n        setEyeRenderFov(EYE_LEFT, leftFov)\n        setEyeRenderFov(EYE_RIGHT, rightFov)\n\n        leftBufferSize, rightBufferSize = calcEyeBufferSize()\n        leftW leftH = leftBufferSize\n        rightW, rightH = rightBufferSize\n        # combined size if using a single texture buffer for both eyes\n        bufferW, bufferH = leftW + rightW, max(leftH, rightH)\n\n        # create a swap chain\n        createTextureSwapChainGL(TEXTURE_SWAP_CHAIN0, bufferW, bufferH)\n\n    Notes\n    -----\n    * This function returns the recommended texture resolution for a specified\n      eye. If you are using a single buffer for both eyes, that buffer should be\n      as wide as the combined width of both eye's values.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_75calcEyeBufferSize = {"calcEyeBufferSize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_75calcEyeBufferSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_74calcEyeBufferSize};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_75calcEyeBufferSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED int __pyx_v_eye;
  float __pyx_v_texelsPerPixel;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calcEyeBufferSize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_texelsPerPixel,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texelsPerPixel);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calcEyeBufferSize") < 0)) __PYX_ERR(0, 5184, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5184, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_texelsPerPixel = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_texelsPerPixel == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 5184, __pyx_L3_error)
    } else {
      __pyx_v_texelsPerPixel = ((float)1.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calcEyeBufferSize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5184, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.calcEyeBufferSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_74calcEyeBufferSize(__pyx_self, __pyx_v_eye, __pyx_v_texelsPerPixel);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_74calcEyeBufferSize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED int __pyx_v_eye, float __pyx_v_texelsPerPixel) {
  ovrSizei __pyx_v_bufferSize;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("calcEyeBufferSize", 0);

  /* "psychxr/libovr/_libovr.pyx":5238
 *     global _eyeRenderDesc
 * 
 *     cdef capi.ovrSizei bufferSize = capi.ovr_GetFovTextureSize(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         <capi.ovrEyeType>0,
 */
  __pyx_v_bufferSize = ovr_GetFovTextureSize(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrEyeType)0), (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[0]).Fov, ((float)__pyx_v_texelsPerPixel));

  /* "psychxr/libovr/_libovr.pyx":5244
 *         <float>texelsPerPixel)
 * 
 *     return bufferSize.w, bufferSize.h             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_bufferSize.w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_bufferSize.h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5184
 * 
 * 
 * def calcEyeBufferSize(int eye, float texelsPerPixel=1.0):             # <<<<<<<<<<<<<<
 *     """Get the recommended buffer (texture) sizes for eye buffers.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.calcEyeBufferSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5247
 * 
 * 
 * def getLayerEyeFovFlags():             # <<<<<<<<<<<<<<
 *     """Get header flags for the render layer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_77getLayerEyeFovFlags(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_76getLayerEyeFovFlags[] = "getLayerEyeFovFlags()\nGet header flags for the render layer.\n\n    Returns\n    -------\n    unsigned int\n        Flags from ``OVR::ovrLayerEyeFov.Header.Flags``.\n\n    See Also\n    --------\n    setLayerEyeFovFlags : Set layer flags.\n\n    Examples\n    --------\n    Check if a flag is set::\n\n        layerFlags = getLayerEyeFovFlags()\n        if (layerFlags & LAYER_FLAG_HIGH_QUALITY) == LAYER_FLAG_HIGH_QUALITY:\n            print('high quality enabled!')\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_77getLayerEyeFovFlags = {"getLayerEyeFovFlags", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_77getLayerEyeFovFlags, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_76getLayerEyeFovFlags};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_77getLayerEyeFovFlags(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLayerEyeFovFlags (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_76getLayerEyeFovFlags(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_76getLayerEyeFovFlags(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getLayerEyeFovFlags", 0);

  /* "psychxr/libovr/_libovr.pyx":5269
 *     """
 *     global _eyeLayer
 *     return <unsigned int>_eyeLayer.Header.Flags             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(((unsigned int)__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5247
 * 
 * 
 * def getLayerEyeFovFlags():             # <<<<<<<<<<<<<<
 *     """Get header flags for the render layer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getLayerEyeFovFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5272
 * 
 * 
 * def setLayerEyeFovFlags(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """Set header flags for the render layer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_79setLayerEyeFovFlags(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_78setLayerEyeFovFlags[] = "setLayerEyeFovFlags(unsigned int flags)\nSet header flags for the render layer.\n\n    Parameters\n    ----------\n    flags : int\n        Flags to set. Flags can be ORed together to apply multiple settings.\n        Valid values for flags are:\n\n        * ``LAYER_FLAG_HIGH_QUALITY`` : Enable high quality mode which tells the\n          compositor to use 4x anisotropic filtering when sampling.\n        * ``LAYER_FLAG_TEXTURE_ORIGIN_AT_BOTTOM_LEFT`` : Tell the compositor the\n          texture origin is at the bottom left, required for using OpenGL\n          textures.\n        * ``LAYER_FLAG_HEAD_LOCKED`` : Enable head locking, which forces the\n          render layer transformations to be head referenced.\n\n    See Also\n    --------\n    getLayerEyeFovFlags : Get layer flags.\n\n    Notes\n    -----\n    * ``LAYER_FLAG_HIGH_QUALITY`` and\n      ``LAYER_FLAG_TEXTURE_ORIGIN_AT_BOTTOM_LEFT`` are recommended settings and\n      are enabled by default.\n\n    Examples\n    --------\n    Enable head-locked mode::\n\n        layerFlags = getLayerEyeFovFlags()  # get current flags\n        layerFlags |= LAYER_FLAG_HEAD_LOCKED  # set head-locking\n        setLayerEyeFovFlags(layerFlags)  # set the flags again\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_79setLayerEyeFovFlags = {"setLayerEyeFovFlags", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_79setLayerEyeFovFlags, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_78setLayerEyeFovFlags};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_79setLayerEyeFovFlags(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLayerEyeFovFlags (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5272, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setLayerEyeFovFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_78setLayerEyeFovFlags(__pyx_self, ((unsigned int)__pyx_v_flags));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_78setLayerEyeFovFlags(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLayerEyeFovFlags", 0);

  /* "psychxr/libovr/_libovr.pyx":5309
 *     """
 *     global _eyeLayer
 *     _eyeLayer.Header.Flags = <capi.ovrLayerFlags>flags             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags = ((ovrLayerFlags)__pyx_v_flags);

  /* "psychxr/libovr/_libovr.pyx":5272
 * 
 * 
 * def setLayerEyeFovFlags(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """Set header flags for the render layer.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5312
 * 
 * 
 * def createTextureSwapChainGL(int swapChain, int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int levels=1):             # <<<<<<<<<<<<<<
 *     """Create a texture swap chain for eye image buffers.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_81createTextureSwapChainGL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_80createTextureSwapChainGL[] = "createTextureSwapChainGL(int swapChain, int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int levels=1)\nCreate a texture swap chain for eye image buffers.\n\n    Parameters\n    ----------\n    swapChain : int\n        Swap chain handle to initialize, usually :data:`SWAP_CHAIN*`.\n    width : int\n        Width of texture in pixels.\n    height : int\n        Height of texture in pixels.\n    textureFormat : int\n        Texture format to use. Valid color texture formats are:\n\n        * ``FORMAT_R8G8B8A8_UNORM``\n        * ``FORMAT_R8G8B8A8_UNORM_SRGB``\n        * ``FORMAT_R16G16B16A16_FLOAT``\n        * ``FORMAT_R11G11B10_FLOAT``\n\n        Depth texture formats:\n\n        * ``FORMAT_D16_UNORM``\n        * ``FORMAT_D24_UNORM_S8_UINT``\n        * ``FORMAT_D32_FLOAT``\n\n    Other Parameters\n    ----------------\n    levels : int\n        Mip levels to use, default is 1.\n\n    Returns\n    -------\n    int\n        The result of the ``OVR::ovr_CreateTextureSwapChainGL`` API call.\n\n    Examples\n    --------\n\n    Create a texture swap chain::\n\n        result = createTextureSwapChainGL(TEXTURE_SWAP_CHAIN0,\n            texWidth, texHeight, FORMAT_R8G8B8A8_UNORM)\n        # set the swap chain for each eye buffer\n        for eye in range(EYE_COUNT):\n            setEyeColorTextureSwapChain(eye, TEXTURE_SWAP_CHAIN0)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_81createTextureSwapChainGL = {"createTextureSwapChainGL", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_81createTextureSwapChainGL, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_80createTextureSwapChainGL};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_81createTextureSwapChainGL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_swapChain;
  int __pyx_v_width;
  int __pyx_v_height;
  int __pyx_v_textureFormat;
  int __pyx_v_levels;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("createTextureSwapChainGL (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_swapChain,&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_textureFormat,&__pyx_n_s_levels,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_swapChain)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("createTextureSwapChainGL", 0, 3, 5, 1); __PYX_ERR(0, 5312, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("createTextureSwapChainGL", 0, 3, 5, 2); __PYX_ERR(0, 5312, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_textureFormat);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_levels);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createTextureSwapChainGL") < 0)) __PYX_ERR(0, 5312, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_swapChain = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_swapChain == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5312, __pyx_L3_error)
    __pyx_v_width = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5312, __pyx_L3_error)
    __pyx_v_height = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5312, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_textureFormat = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_textureFormat == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5312, __pyx_L3_error)
    } else {
      __pyx_v_textureFormat = __pyx_k__43;
    }
    if (values[4]) {
      __pyx_v_levels = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_levels == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5312, __pyx_L3_error)
    } else {
      __pyx_v_levels = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("createTextureSwapChainGL", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5312, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.createTextureSwapChainGL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_80createTextureSwapChainGL(__pyx_self, __pyx_v_swapChain, __pyx_v_width, __pyx_v_height, __pyx_v_textureFormat, __pyx_v_levels);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_80createTextureSwapChainGL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain, int __pyx_v_width, int __pyx_v_height, int __pyx_v_textureFormat, int __pyx_v_levels) {
  ovrTextureSwapChainDesc __pyx_v_swapConfig;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("createTextureSwapChainGL", 0);

  /* "psychxr/libovr/_libovr.pyx":5362
 *     global _ptrSession
 * 
 *     if _swapChains[swapChain] != NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError("Swap chain TEXTURE_SWAP_CHAIN{} already "
 *                          "initialized!".format(swapChain))
 */
  __pyx_t_1 = (((__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_swapChain]) != NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":5364
 *     if _swapChains[swapChain] != NULL:
 *         raise ValueError("Swap chain TEXTURE_SWAP_CHAIN{} already "
 *                          "initialized!".format(swapChain))             # <<<<<<<<<<<<<<
 * 
 *     # configure the texture
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Swap_chain_TEXTURE_SWAP_CHAIN_al, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_swapChain); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psychxr/libovr/_libovr.pyx":5363
 * 
 *     if _swapChains[swapChain] != NULL:
 *         raise ValueError("Swap chain TEXTURE_SWAP_CHAIN{} already "             # <<<<<<<<<<<<<<
 *                          "initialized!".format(swapChain))
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 5363, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":5362
 *     global _ptrSession
 * 
 *     if _swapChains[swapChain] != NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError("Swap chain TEXTURE_SWAP_CHAIN{} already "
 *                          "initialized!".format(swapChain))
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5368
 *     # configure the texture
 *     cdef capi.ovrTextureSwapChainDesc swapConfig
 *     swapConfig.Type = capi.ovrTexture_2D             # <<<<<<<<<<<<<<
 *     swapConfig.Format = <capi.ovrTextureFormat>textureFormat
 *     swapConfig.ArraySize = 1
 */
  __pyx_v_swapConfig.Type = ovrTexture_2D;

  /* "psychxr/libovr/_libovr.pyx":5369
 *     cdef capi.ovrTextureSwapChainDesc swapConfig
 *     swapConfig.Type = capi.ovrTexture_2D
 *     swapConfig.Format = <capi.ovrTextureFormat>textureFormat             # <<<<<<<<<<<<<<
 *     swapConfig.ArraySize = 1
 *     swapConfig.Width = <int>width
 */
  __pyx_v_swapConfig.Format = ((ovrTextureFormat)__pyx_v_textureFormat);

  /* "psychxr/libovr/_libovr.pyx":5370
 *     swapConfig.Type = capi.ovrTexture_2D
 *     swapConfig.Format = <capi.ovrTextureFormat>textureFormat
 *     swapConfig.ArraySize = 1             # <<<<<<<<<<<<<<
 *     swapConfig.Width = <int>width
 *     swapConfig.Height = <int>height
 */
  __pyx_v_swapConfig.ArraySize = 1;

  /* "psychxr/libovr/_libovr.pyx":5371
 *     swapConfig.Format = <capi.ovrTextureFormat>textureFormat
 *     swapConfig.ArraySize = 1
 *     swapConfig.Width = <int>width             # <<<<<<<<<<<<<<
 *     swapConfig.Height = <int>height
 *     swapConfig.MipLevels = <int>levels
 */
  __pyx_v_swapConfig.Width = ((int)__pyx_v_width);

  /* "psychxr/libovr/_libovr.pyx":5372
 *     swapConfig.ArraySize = 1
 *     swapConfig.Width = <int>width
 *     swapConfig.Height = <int>height             # <<<<<<<<<<<<<<
 *     swapConfig.MipLevels = <int>levels
 *     swapConfig.SampleCount = 1
 */
  __pyx_v_swapConfig.Height = ((int)__pyx_v_height);

  /* "psychxr/libovr/_libovr.pyx":5373
 *     swapConfig.Width = <int>width
 *     swapConfig.Height = <int>height
 *     swapConfig.MipLevels = <int>levels             # <<<<<<<<<<<<<<
 *     swapConfig.SampleCount = 1
 *     swapConfig.StaticImage = capi.ovrFalse  # always buffered
 */
  __pyx_v_swapConfig.MipLevels = ((int)__pyx_v_levels);

  /* "psychxr/libovr/_libovr.pyx":5374
 *     swapConfig.Height = <int>height
 *     swapConfig.MipLevels = <int>levels
 *     swapConfig.SampleCount = 1             # <<<<<<<<<<<<<<
 *     swapConfig.StaticImage = capi.ovrFalse  # always buffered
 *     swapConfig.MiscFlags = capi.ovrTextureMisc_None
 */
  __pyx_v_swapConfig.SampleCount = 1;

  /* "psychxr/libovr/_libovr.pyx":5375
 *     swapConfig.MipLevels = <int>levels
 *     swapConfig.SampleCount = 1
 *     swapConfig.StaticImage = capi.ovrFalse  # always buffered             # <<<<<<<<<<<<<<
 *     swapConfig.MiscFlags = capi.ovrTextureMisc_None
 *     swapConfig.BindFlags = capi.ovrTextureBind_None
 */
  __pyx_v_swapConfig.StaticImage = ovrFalse;

  /* "psychxr/libovr/_libovr.pyx":5376
 *     swapConfig.SampleCount = 1
 *     swapConfig.StaticImage = capi.ovrFalse  # always buffered
 *     swapConfig.MiscFlags = capi.ovrTextureMisc_None             # <<<<<<<<<<<<<<
 *     swapConfig.BindFlags = capi.ovrTextureBind_None
 * 
 */
  __pyx_v_swapConfig.MiscFlags = ovrTextureMisc_None;

  /* "psychxr/libovr/_libovr.pyx":5377
 *     swapConfig.StaticImage = capi.ovrFalse  # always buffered
 *     swapConfig.MiscFlags = capi.ovrTextureMisc_None
 *     swapConfig.BindFlags = capi.ovrTextureBind_None             # <<<<<<<<<<<<<<
 * 
 *     # create the swap chain
 */
  __pyx_v_swapConfig.BindFlags = ovrTextureBind_None;

  /* "psychxr/libovr/_libovr.pyx":5381
 *     # create the swap chain
 *     cdef capi.ovrResult result = \
 *         capi.ovr_CreateTextureSwapChainGL(             # <<<<<<<<<<<<<<
 *             _ptrSession,
 *             &swapConfig,
 */
  __pyx_v_result = ovr_CreateTextureSwapChainGL(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (&__pyx_v_swapConfig), (&(__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_swapChain])));

  /* "psychxr/libovr/_libovr.pyx":5388
 *     #_eyeLayer.ColorTexture[swapChain] = _swapChains[swapChain]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5312
 * 
 * 
 * def createTextureSwapChainGL(int swapChain, int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int levels=1):             # <<<<<<<<<<<<<<
 *     """Create a texture swap chain for eye image buffers.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.libovr._libovr.createTextureSwapChainGL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5391
 * 
 * 
 * def getTextureSwapChainLengthGL(int swapChain):             # <<<<<<<<<<<<<<
 *     """Get the length of a specified swap chain.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_83getTextureSwapChainLengthGL(PyObject *__pyx_self, PyObject *__pyx_arg_swapChain); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_82getTextureSwapChainLengthGL[] = "getTextureSwapChainLengthGL(int swapChain)\nGet the length of a specified swap chain.\n\n    Parameters\n    ----------\n    swapChain : int\n        Swap chain handle to query. Must be a swap chain initialized by a\n        previous call to :func:`createTextureSwapChainGL`.\n\n    Returns\n    -------\n    tuple of int\n        Result of the ``ovr_GetTextureSwapChainLength`` API call and the\n        length of that swap chain.\n\n    See Also\n    --------\n    getTextureSwapChainCurrentIndex : Get the current swap chain index.\n    getTextureSwapChainBufferGL : Get the current OpenGL swap chain buffer.\n\n    Examples\n    --------\n\n    Get the swap chain length for the previously created\n    ``TEXTURE_SWAP_CHAIN0``::\n\n        result, length = getTextureSwapChainLengthGL(TEXTURE_SWAP_CHAIN0)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_83getTextureSwapChainLengthGL = {"getTextureSwapChainLengthGL", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_83getTextureSwapChainLengthGL, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_82getTextureSwapChainLengthGL};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_83getTextureSwapChainLengthGL(PyObject *__pyx_self, PyObject *__pyx_arg_swapChain) {
  int __pyx_v_swapChain;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTextureSwapChainLengthGL (wrapper)", 0);
  assert(__pyx_arg_swapChain); {
    __pyx_v_swapChain = __Pyx_PyInt_As_int(__pyx_arg_swapChain); if (unlikely((__pyx_v_swapChain == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5391, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTextureSwapChainLengthGL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_82getTextureSwapChainLengthGL(__pyx_self, ((int)__pyx_v_swapChain));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_82getTextureSwapChainLengthGL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain) {
  int __pyx_v_outLength;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getTextureSwapChainLengthGL", 0);

  /* "psychxr/libovr/_libovr.pyx":5421
 *     """
 *     cdef int outLength
 *     cdef capi.ovrResult result = 0             # <<<<<<<<<<<<<<
 *     global _swapChains
 *     global _ptrSession
 */
  __pyx_v_result = 0;

  /* "psychxr/libovr/_libovr.pyx":5427
 * 
 *     # check if there is a swap chain in the slot
 *     if _eyeLayer.ColorTexture[swapChain] == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(
 *             "Cannot get swap chain length, NULL eye buffer texture.")
 */
  __pyx_t_1 = (((__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.ColorTexture[__pyx_v_swapChain]) == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":5428
 *     # check if there is a swap chain in the slot
 *     if _eyeLayer.ColorTexture[swapChain] == NULL:
 *         raise RuntimeError(             # <<<<<<<<<<<<<<
 *             "Cannot get swap chain length, NULL eye buffer texture.")
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 5428, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":5427
 * 
 *     # check if there is a swap chain in the slot
 *     if _eyeLayer.ColorTexture[swapChain] == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(
 *             "Cannot get swap chain length, NULL eye buffer texture.")
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5432
 * 
 *     # get the current texture index within the swap chain
 *     result = capi.ovr_GetTextureSwapChainLength(             # <<<<<<<<<<<<<<
 *         _ptrSession, _swapChains[swapChain], &outLength)
 * 
 */
  __pyx_v_result = ovr_GetTextureSwapChainLength(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_swapChain]), (&__pyx_v_outLength));

  /* "psychxr/libovr/_libovr.pyx":5435
 *         _ptrSession, _swapChains[swapChain], &outLength)
 * 
 *     return result, outLength             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_outLength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5391
 * 
 * 
 * def getTextureSwapChainLengthGL(int swapChain):             # <<<<<<<<<<<<<<
 *     """Get the length of a specified swap chain.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTextureSwapChainLengthGL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5438
 * 
 * 
 * def getTextureSwapChainCurrentIndex(int swapChain):             # <<<<<<<<<<<<<<
 *     """Get the current buffer index within the swap chain.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_85getTextureSwapChainCurrentIndex(PyObject *__pyx_self, PyObject *__pyx_arg_swapChain); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_84getTextureSwapChainCurrentIndex[] = "getTextureSwapChainCurrentIndex(int swapChain)\nGet the current buffer index within the swap chain.\n\n    Parameters\n    ----------\n    swapChain : int\n        Swap chain handle to query. Must be a swap chain initialized by a\n        previous call to :func:`createTextureSwapChainGL`.\n\n    Returns\n    -------\n    tuple of int\n        Result of the ``OVR::ovr_GetTextureSwapChainCurrentIndex`` API call and\n        the index of the buffer.\n\n    See Also\n    --------\n    getTextureSwapChainLengthGL : Get the length of a swap chain.\n    getTextureSwapChainBufferGL : Get the current OpenGL swap chain buffer.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_85getTextureSwapChainCurrentIndex = {"getTextureSwapChainCurrentIndex", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_85getTextureSwapChainCurrentIndex, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_84getTextureSwapChainCurrentIndex};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_85getTextureSwapChainCurrentIndex(PyObject *__pyx_self, PyObject *__pyx_arg_swapChain) {
  int __pyx_v_swapChain;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTextureSwapChainCurrentIndex (wrapper)", 0);
  assert(__pyx_arg_swapChain); {
    __pyx_v_swapChain = __Pyx_PyInt_As_int(__pyx_arg_swapChain); if (unlikely((__pyx_v_swapChain == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5438, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTextureSwapChainCurrentIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_84getTextureSwapChainCurrentIndex(__pyx_self, ((int)__pyx_v_swapChain));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_84getTextureSwapChainCurrentIndex(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain) {
  int __pyx_v_current_idx;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getTextureSwapChainCurrentIndex", 0);

  /* "psychxr/libovr/_libovr.pyx":5459
 * 
 *     """
 *     cdef int current_idx = 0             # <<<<<<<<<<<<<<
 *     global _swapChains
 *     global _eyeLayer
 */
  __pyx_v_current_idx = 0;

  /* "psychxr/libovr/_libovr.pyx":5465
 * 
 *     # check if there is a swap chain in the slot
 *     if _eyeLayer.ColorTexture[swapChain] == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(
 *             "Cannot get buffer ID, NULL eye buffer texture.")
 */
  __pyx_t_1 = (((__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.ColorTexture[__pyx_v_swapChain]) == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "psychxr/libovr/_libovr.pyx":5466
 *     # check if there is a swap chain in the slot
 *     if _eyeLayer.ColorTexture[swapChain] == NULL:
 *         raise RuntimeError(             # <<<<<<<<<<<<<<
 *             "Cannot get buffer ID, NULL eye buffer texture.")
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 5466, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":5465
 * 
 *     # check if there is a swap chain in the slot
 *     if _eyeLayer.ColorTexture[swapChain] == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(
 *             "Cannot get buffer ID, NULL eye buffer texture.")
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5470
 * 
 *     # get the current texture index within the swap chain
 *     cdef capi.ovrResult result = capi.ovr_GetTextureSwapChainCurrentIndex(             # <<<<<<<<<<<<<<
 *         _ptrSession, _swapChains[swapChain], &current_idx)
 * 
 */
  __pyx_v_result = ovr_GetTextureSwapChainCurrentIndex(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_swapChain]), (&__pyx_v_current_idx));

  /* "psychxr/libovr/_libovr.pyx":5473
 *         _ptrSession, _swapChains[swapChain], &current_idx)
 * 
 *     return result, current_idx             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_current_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5438
 * 
 * 
 * def getTextureSwapChainCurrentIndex(int swapChain):             # <<<<<<<<<<<<<<
 *     """Get the current buffer index within the swap chain.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTextureSwapChainCurrentIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5476
 * 
 * 
 * def getTextureSwapChainBufferGL(int swapChain, int index):             # <<<<<<<<<<<<<<
 *     """Get the texture buffer as an OpenGL name at a specific index in the
 *     swap chain for a given swapChain.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_87getTextureSwapChainBufferGL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_86getTextureSwapChainBufferGL[] = "getTextureSwapChainBufferGL(int swapChain, int index)\nGet the texture buffer as an OpenGL name at a specific index in the\n    swap chain for a given swapChain.\n\n    Parameters\n    ----------\n    swapChain : int\n        Swap chain handle to query. Must be a swap chain initialized by a\n        previous call to :func:`createTextureSwapChainGL`.\n    index : int\n        Index within the swap chain to retrieve its OpenGL texture name.\n\n    Returns\n    -------\n    tuple (int, int)\n        Result of the ``OVR::ovr_GetTextureSwapChainBufferGL`` API call and the\n        OpenGL texture buffer name. A OpenGL buffer name is invalid when 0,\n        check the returned API call result for an error condition.\n\n    Examples\n    --------\n\n    Get the OpenGL texture buffer name associated with the swap chain index::\n\n        # get the current available index\n        swapChain = TEXTURE_SWAP_CHAIN0\n        result, currentIdx = getSwapChainCurrentIndex(swapChain)\n\n        # get the OpenGL buffer name\n        result, texId = getTextureSwapChainBufferGL(swapChain, currentIdx)\n\n        # bind the texture\n        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,\n            GL_TEXTURE_2D, texId, 0)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_87getTextureSwapChainBufferGL = {"getTextureSwapChainBufferGL", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_87getTextureSwapChainBufferGL, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_86getTextureSwapChainBufferGL};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_87getTextureSwapChainBufferGL(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_swapChain;
  int __pyx_v_index;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTextureSwapChainBufferGL (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_swapChain,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_swapChain)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getTextureSwapChainBufferGL", 1, 2, 2, 1); __PYX_ERR(0, 5476, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTextureSwapChainBufferGL") < 0)) __PYX_ERR(0, 5476, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_swapChain = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_swapChain == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5476, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5476, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTextureSwapChainBufferGL", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5476, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTextureSwapChainBufferGL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_86getTextureSwapChainBufferGL(__pyx_self, __pyx_v_swapChain, __pyx_v_index);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_86getTextureSwapChainBufferGL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_swapChain, int __pyx_v_index) {
  unsigned int __pyx_v_tex_id;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getTextureSwapChainBufferGL", 0);

  /* "psychxr/libovr/_libovr.pyx":5512
 * 
 *     """
 *     cdef unsigned int tex_id = 0  # OpenGL texture handle             # <<<<<<<<<<<<<<
 *     global _swapChains
 *     global _eyeLayer
 */
  __pyx_v_tex_id = 0;

  /* "psychxr/libovr/_libovr.pyx":5518
 * 
 *     # get the next available texture ID from the swap chain
 *     cdef capi.ovrResult result = capi.ovr_GetTextureSwapChainBufferGL(             # <<<<<<<<<<<<<<
 *         _ptrSession, _swapChains[swapChain], index, &tex_id)
 * 
 */
  __pyx_v_result = ovr_GetTextureSwapChainBufferGL(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_swapChain]), __pyx_v_index, (&__pyx_v_tex_id));

  /* "psychxr/libovr/_libovr.pyx":5521
 *         _ptrSession, _swapChains[swapChain], index, &tex_id)
 * 
 *     return result, tex_id             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_tex_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5476
 * 
 * 
 * def getTextureSwapChainBufferGL(int swapChain, int index):             # <<<<<<<<<<<<<<
 *     """Get the texture buffer as an OpenGL name at a specific index in the
 *     swap chain for a given swapChain.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTextureSwapChainBufferGL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5524
 * 
 * 
 * def setEyeColorTextureSwapChain(int eye, int swapChain):             # <<<<<<<<<<<<<<
 *     """Set the color texture swap chain for a given eye.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_89setEyeColorTextureSwapChain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_88setEyeColorTextureSwapChain[] = "setEyeColorTextureSwapChain(int eye, int swapChain)\nSet the color texture swap chain for a given eye.\n\n    Should be called after a successful :func:`createTextureSwapChainGL` call\n    but before any rendering is done.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n    swapChain : int\n        Swap chain handle to query. Must be a swap chain initialized by a\n        previous call to :func:`createTextureSwapChainGL`.\n\n    See Also\n    --------\n    createTextureSwapChainGL : Create a OpenGL buffer swap chain.\n\n    Examples\n    --------\n\n    Associate the swap chain with both eyes (single buffer for stereo views)::\n\n        setEyeColorTextureSwapChain(EYE_LEFT, TEXTURE_SWAP_CHAIN0)\n        setEyeColorTextureSwapChain(EYE_RIGHT, TEXTURE_SWAP_CHAIN0)\n\n        # same as above but with a loop\n        for eye in range(EYE_COUNT):\n            setEyeColorTextureSwapChain(eye, TEXTURE_SWAP_CHAIN0)\n\n    Associate a swap chain with each eye (separate buffer for stereo views)::\n\n        setEyeColorTextureSwapChain(EYE_LEFT, TEXTURE_SWAP_CHAIN0)\n        setEyeColorTextureSwapChain(EYE_RIGHT, TEXTURE_SWAP_CHAIN1)\n\n        # with a loop ...\n        for eye in range(EYE_COUNT):\n            setEyeColorTextureSwapChain(eye, TEXTURE_SWAP_CHAIN0 + eye)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_89setEyeColorTextureSwapChain = {"setEyeColorTextureSwapChain", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_89setEyeColorTextureSwapChain, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_88setEyeColorTextureSwapChain};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_89setEyeColorTextureSwapChain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  int __pyx_v_swapChain;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setEyeColorTextureSwapChain (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_swapChain,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_swapChain)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setEyeColorTextureSwapChain", 1, 2, 2, 1); __PYX_ERR(0, 5524, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEyeColorTextureSwapChain") < 0)) __PYX_ERR(0, 5524, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5524, __pyx_L3_error)
    __pyx_v_swapChain = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_swapChain == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5524, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setEyeColorTextureSwapChain", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5524, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setEyeColorTextureSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_88setEyeColorTextureSwapChain(__pyx_self, __pyx_v_eye, __pyx_v_swapChain);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_88setEyeColorTextureSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, int __pyx_v_swapChain) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setEyeColorTextureSwapChain", 0);

  /* "psychxr/libovr/_libovr.pyx":5567
 *     global _eyeLayer
 * 
 *     _eyeLayer.ColorTexture[eye] = _swapChains[swapChain]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.ColorTexture[__pyx_v_eye]) = (__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_swapChain]);

  /* "psychxr/libovr/_libovr.pyx":5524
 * 
 * 
 * def setEyeColorTextureSwapChain(int eye, int swapChain):             # <<<<<<<<<<<<<<
 *     """Set the color texture swap chain for a given eye.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5570
 * 
 * 
 * def createMirrorTexture(int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int mirrorOptions=MIRROR_OPTION_DEFAULT):             # <<<<<<<<<<<<<<
 *     """Create a mirror texture.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_91createMirrorTexture(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_90createMirrorTexture[] = "createMirrorTexture(int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int mirrorOptions=MIRROR_OPTION_DEFAULT)\nCreate a mirror texture.\n\n    This displays the content of the rendered images being presented on the\n    HMD. The image is automatically refreshed to reflect the current content\n    on the display. This displays the post-distortion texture.\n\n    Parameters\n    ----------\n    width : int\n        Width of texture in pixels.\n    height : int\n        Height of texture in pixels.\n    textureFormat : int\n        Color texture format to use, valid texture formats are:\n\n        * ``FORMAT_R8G8B8A8_UNORM``\n        * ``FORMAT_R8G8B8A8_UNORM_SRGB``\n        * ``FORMAT_R16G16B16A16_FLOAT``\n        * ``FORMAT_R11G11B10_FLOAT``\n\n    mirrorOptions : int, optional\n        Mirror texture options. Specifies how to display the rendered content.\n        By default, ``MIRROR_OPTION_DEFAULT`` is used which displays the\n        post-distortion image of both eye buffers side-by-side. Other options\n        are available by specifying the following flags:\n\n        * ``MIRROR_OPTION_POST_DISTORTION`` - Barrel distorted eye buffer.\n        * ``MIRROR_OPTION_LEFT_EYE_ONLY`` and ``MIRROR_OPTION_RIGHT_EYE_ONLY`` -\n          show rectilinear images of either the left of right eye. These values\n          are mutually exclusive.\n        * ``MIRROR_OPTION_INCLUDE_GUARDIAN`` - Show guardian boundary system in\n          mirror texture.\n        * ``MIRROR_OPTION_INCLUDE_NOTIFICATIONS`` - Show notifications received\n          on the mirror texture.\n        * ``MIRROR_OPTION_INCLUDE_SYSTEM_GUI`` - Show the system menu when\n          accessed via the home button on the controller.\n        * ``MIRROR_OPTION_FORCE_SYMMETRIC_FOV`` - Force mirror output to use\n          symmetric FOVs. Only valid when ``MIRROR_OPTION_POST_DISTORTION`` is\n          not specified.\n\n        Multiple option flags can be combined by using the ``|`` operator and""\n        passed to `mirrorOptions`. However, some options cannot be used in\n        conjunction with each other, if so, this function may return\n        ``ERROR_INVALID_PARAMETER``.\n\n    Returns\n    -------\n    int\n        Result of API call ``OVR::ovr_CreateMirrorTextureWithOptionsGL``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_91createMirrorTexture = {"createMirrorTexture", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_91createMirrorTexture, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_90createMirrorTexture};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_91createMirrorTexture(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_width;
  int __pyx_v_height;
  int __pyx_v_textureFormat;
  int __pyx_v_mirrorOptions;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("createMirrorTexture (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_textureFormat,&__pyx_n_s_mirrorOptions,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("createMirrorTexture", 0, 2, 4, 1); __PYX_ERR(0, 5570, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_textureFormat);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mirrorOptions);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createMirrorTexture") < 0)) __PYX_ERR(0, 5570, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_width = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5570, __pyx_L3_error)
    __pyx_v_height = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5570, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_textureFormat = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_textureFormat == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5570, __pyx_L3_error)
    } else {
      __pyx_v_textureFormat = __pyx_k__46;
    }
    if (values[3]) {
      __pyx_v_mirrorOptions = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_mirrorOptions == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5570, __pyx_L3_error)
    } else {
      __pyx_v_mirrorOptions = __pyx_k__47;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("createMirrorTexture", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5570, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.createMirrorTexture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_90createMirrorTexture(__pyx_self, __pyx_v_width, __pyx_v_height, __pyx_v_textureFormat, __pyx_v_mirrorOptions);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_90createMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_width, int __pyx_v_height, int __pyx_v_textureFormat, int __pyx_v_mirrorOptions) {
  ovrMirrorTextureDesc __pyx_v_mirrorDesc;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("createMirrorTexture", 0);

  /* "psychxr/libovr/_libovr.pyx":5627
 *     global _mirrorTexture
 * 
 *     mirrorDesc.Format = <capi.ovrTextureFormat>textureFormat             # <<<<<<<<<<<<<<
 *     mirrorDesc.Width = <int>width
 *     mirrorDesc.Height = <int>height
 */
  __pyx_v_mirrorDesc.Format = ((ovrTextureFormat)__pyx_v_textureFormat);

  /* "psychxr/libovr/_libovr.pyx":5628
 * 
 *     mirrorDesc.Format = <capi.ovrTextureFormat>textureFormat
 *     mirrorDesc.Width = <int>width             # <<<<<<<<<<<<<<
 *     mirrorDesc.Height = <int>height
 *     mirrorDesc.MiscFlags = capi.ovrTextureMisc_None
 */
  __pyx_v_mirrorDesc.Width = ((int)__pyx_v_width);

  /* "psychxr/libovr/_libovr.pyx":5629
 *     mirrorDesc.Format = <capi.ovrTextureFormat>textureFormat
 *     mirrorDesc.Width = <int>width
 *     mirrorDesc.Height = <int>height             # <<<<<<<<<<<<<<
 *     mirrorDesc.MiscFlags = capi.ovrTextureMisc_None
 *     mirrorDesc.MirrorOptions = <capi.ovrMirrorOptions>mirrorOptions
 */
  __pyx_v_mirrorDesc.Height = ((int)__pyx_v_height);

  /* "psychxr/libovr/_libovr.pyx":5630
 *     mirrorDesc.Width = <int>width
 *     mirrorDesc.Height = <int>height
 *     mirrorDesc.MiscFlags = capi.ovrTextureMisc_None             # <<<<<<<<<<<<<<
 *     mirrorDesc.MirrorOptions = <capi.ovrMirrorOptions>mirrorOptions
 * 
 */
  __pyx_v_mirrorDesc.MiscFlags = ovrTextureMisc_None;

  /* "psychxr/libovr/_libovr.pyx":5631
 *     mirrorDesc.Height = <int>height
 *     mirrorDesc.MiscFlags = capi.ovrTextureMisc_None
 *     mirrorDesc.MirrorOptions = <capi.ovrMirrorOptions>mirrorOptions             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrResult result = capi.ovr_CreateMirrorTextureWithOptionsGL(
 */
  __pyx_v_mirrorDesc.MirrorOptions = ((ovrMirrorOptions)__pyx_v_mirrorOptions);

  /* "psychxr/libovr/_libovr.pyx":5633
 *     mirrorDesc.MirrorOptions = <capi.ovrMirrorOptions>mirrorOptions
 * 
 *     cdef capi.ovrResult result = capi.ovr_CreateMirrorTextureWithOptionsGL(             # <<<<<<<<<<<<<<
 *         _ptrSession, &mirrorDesc, &_mirrorTexture)
 * 
 */
  __pyx_v_result = ovr_CreateMirrorTextureWithOptionsGL(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (&__pyx_v_mirrorDesc), (&__pyx_v_7psychxr_6libovr_7_libovr__mirrorTexture));

  /* "psychxr/libovr/_libovr.pyx":5636
 *         _ptrSession, &mirrorDesc, &_mirrorTexture)
 * 
 *     return <int>result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_result)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5570
 * 
 * 
 * def createMirrorTexture(int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int mirrorOptions=MIRROR_OPTION_DEFAULT):             # <<<<<<<<<<<<<<
 *     """Create a mirror texture.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.createMirrorTexture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5639
 * 
 * 
 * def getMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Mirror texture ID.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_93getMirrorTexture(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_92getMirrorTexture[] = "getMirrorTexture()\nMirror texture ID.\n\n    Returns\n    -------\n    tuple (int, int)\n        Result of API call ``OVR::ovr_GetMirrorTextureBufferGL`` and the mirror\n        texture ID. A mirror texture ID == 0 is invalid.\n\n    Examples\n    --------\n\n    Getting the mirror texture for use::\n\n        # get the mirror texture\n        result, mirrorTexId = getMirrorTexture()\n        if failure(result):\n            # raise error ...\n\n        # bind the mirror texture texture to the framebuffer\n        glFramebufferTexture2D(\n            GL_READ_FRAMEBUFFER,\n            GL_COLOR_ATTACHMENT0,\n            GL_TEXTURE_2D, mirrorTexId, 0)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_93getMirrorTexture = {"getMirrorTexture", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_93getMirrorTexture, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_92getMirrorTexture};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_93getMirrorTexture(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMirrorTexture (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_92getMirrorTexture(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_92getMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self) {
  unsigned int __pyx_v_mirror_id;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getMirrorTexture", 0);

  /* "psychxr/libovr/_libovr.pyx":5670
 *     global _mirrorTexture
 * 
 *     if _mirrorTexture == NULL:  # no texture created             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_1 = ((__pyx_v_7psychxr_6libovr_7_libovr__mirrorTexture == NULL) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":5671
 * 
 *     if _mirrorTexture == NULL:  # no texture created
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrResult result = \
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":5670
 *     global _mirrorTexture
 * 
 *     if _mirrorTexture == NULL:  # no texture created             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5674
 * 
 *     cdef capi.ovrResult result = \
 *         capi.ovr_GetMirrorTextureBufferGL(             # <<<<<<<<<<<<<<
 *             _ptrSession,
 *             _mirrorTexture,
 */
  __pyx_v_result = ovr_GetMirrorTextureBufferGL(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_7psychxr_6libovr_7_libovr__mirrorTexture, (&__pyx_v_mirror_id));

  /* "psychxr/libovr/_libovr.pyx":5679
 *             &mirror_id)
 * 
 *     return <int>result, <unsigned int>mirror_id             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(((int)__pyx_v_result)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(((unsigned int)__pyx_v_mirror_id)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5639
 * 
 * 
 * def getMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Mirror texture ID.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getMirrorTexture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5682
 * 
 * 
 * def getSensorSampleTime():             # <<<<<<<<<<<<<<
 *     """Get the sensor sample timestamp.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_95getSensorSampleTime(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_94getSensorSampleTime[] = "getSensorSampleTime()\nGet the sensor sample timestamp.\n\n    The time when the source data used to compute the render pose was sampled.\n    This value is used to compute the motion-to-photon latency. This value is\n    set when :func:`getDevicePoses` and :func:`setSensorSampleTime` is called.\n    If :func:`getTrackingState` was called with `latencyMarker` set, sensor\n    sample time will be 0.0.\n\n    Returns\n    -------\n    float\n        Sample timestamp in seconds.\n\n    See Also\n    --------\n    setSensorSampleTime : Set sensor sample time.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_95getSensorSampleTime = {"getSensorSampleTime", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_95getSensorSampleTime, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_94getSensorSampleTime};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_95getSensorSampleTime(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSensorSampleTime (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_94getSensorSampleTime(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_94getSensorSampleTime(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getSensorSampleTime", 0);

  /* "psychxr/libovr/_libovr.pyx":5702
 *     """
 *     global _eyeLayer
 *     return _eyeLayer.SensorSampleTime             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.SensorSampleTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5682
 * 
 * 
 * def getSensorSampleTime():             # <<<<<<<<<<<<<<
 *     """Get the sensor sample timestamp.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getSensorSampleTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5705
 * 
 * 
 * def setSensorSampleTime(double absTime):             # <<<<<<<<<<<<<<
 *     """Set the sensor sample timestamp.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_97setSensorSampleTime(PyObject *__pyx_self, PyObject *__pyx_arg_absTime); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_96setSensorSampleTime[] = "setSensorSampleTime(double absTime)\nSet the sensor sample timestamp.\n\n    Specify the sensor sample time of the source data used to compute the render\n    poses of each eye. This value is used to compute motion-to-photon latency.\n\n    Parameters\n    ----------\n    absTime : float\n        Time in seconds.\n\n    See Also\n    --------\n    getSensorSampleTime : Get sensor sample time.\n    getTrackingState : Get the current tracking state.\n    getDevicePoses : Get device poses.\n\n    Examples\n    --------\n    Supplying sensor sample time from an external tracking source::\n\n        # get sensor time from the mocal system\n        sampleTime = timeInSeconds() - mocap.timeSinceMidExposure\n\n        # set sample time\n        setSensorSampleTime(sampleTime)\n        calcEyePoses(headRigidBody)\n\n        # get frame perf stats after calling `endFrame` to get last frame\n        # motion-to-photon latency\n        perfStats = getPerfStats()\n        m2p_latency = perfStats.frameStats[0].appMotionToPhotonLatency\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_97setSensorSampleTime = {"setSensorSampleTime", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_97setSensorSampleTime, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_96setSensorSampleTime};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_97setSensorSampleTime(PyObject *__pyx_self, PyObject *__pyx_arg_absTime) {
  double __pyx_v_absTime;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setSensorSampleTime (wrapper)", 0);
  assert(__pyx_arg_absTime); {
    __pyx_v_absTime = __pyx_PyFloat_AsDouble(__pyx_arg_absTime); if (unlikely((__pyx_v_absTime == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5705, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setSensorSampleTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_96setSensorSampleTime(__pyx_self, ((double)__pyx_v_absTime));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_96setSensorSampleTime(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_absTime) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setSensorSampleTime", 0);

  /* "psychxr/libovr/_libovr.pyx":5740
 *     """
 *     global _eyeLayer
 *     _eyeLayer.SensorSampleTime = absTime             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.SensorSampleTime = __pyx_v_absTime;

  /* "psychxr/libovr/_libovr.pyx":5705
 * 
 * 
 * def setSensorSampleTime(double absTime):             # <<<<<<<<<<<<<<
 *     """Set the sensor sample timestamp.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5743
 * 
 * 
 * def getTrackingState(double absTime, bint latencyMarker=True):             # <<<<<<<<<<<<<<
 *     """Get the current tracking state of the head and hands.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_99getTrackingState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_98getTrackingState[] = "getTrackingState(double absTime, bool latencyMarker=True)\nGet the current tracking state of the head and hands.\n\n    Parameters\n    ----------\n    absTime : float\n        Absolute time in seconds which the tracking state refers to.\n    latencyMarker : bool\n        Insert a latency marker for motion-to-photon calculation.\n\n    Returns\n    -------\n    LibOVRTrackingState\n        Tracking state at `absTime` for head and hands.\n\n    Examples\n    --------\n    Getting the head pose and calculating eye render poses::\n\n        t = hmd.getPredictedDisplayTime()\n        trackingState = hmd.getTrackingState(t)\n\n        # tracking state flags\n        flags = STATUS_ORIENTATION_TRACKED | STATUS_ORIENTATION_TRACKED\n\n        # check if tracking\n        if (flags & trackingState.statusFlags) == flags:\n            hmd.calcEyePose(trackingState.headPose.pose)  # calculate eye poses\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_99getTrackingState = {"getTrackingState", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_99getTrackingState, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_98getTrackingState};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_99getTrackingState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_absTime;
  int __pyx_v_latencyMarker;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackingState (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_absTime,&__pyx_n_s_latencyMarker,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_absTime)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_latencyMarker);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTrackingState") < 0)) __PYX_ERR(0, 5743, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_absTime = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_absTime == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5743, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_latencyMarker = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_latencyMarker == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5743, __pyx_L3_error)
    } else {
      __pyx_v_latencyMarker = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTrackingState", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5743, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTrackingState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_98getTrackingState(__pyx_self, __pyx_v_absTime, __pyx_v_latencyMarker);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_98getTrackingState(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_absTime, int __pyx_v_latencyMarker) {
  ovrBool __pyx_v_use_marker;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrBool __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getTrackingState", 0);

  /* "psychxr/libovr/_libovr.pyx":5777
 * 
 *     cdef capi.ovrBool use_marker = \
 *         capi.ovrTrue if latencyMarker else capi.ovrFalse             # <<<<<<<<<<<<<<
 * 
 *     # tracking state object that is actually returned to Python land
 */
  if ((__pyx_v_latencyMarker != 0)) {
    __pyx_t_1 = ovrTrue;
  } else {
    __pyx_t_1 = ovrFalse;
  }
  __pyx_v_use_marker = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":5780
 * 
 *     # tracking state object that is actually returned to Python land
 *     cdef LibOVRTrackingState to_return = LibOVRTrackingState()             # <<<<<<<<<<<<<<
 *     to_return.c_data[0] = capi.ovr_GetTrackingState(
 *         _ptrSession, absTime, use_marker)
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRTrackingState)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/libovr/_libovr.pyx":5781
 *     # tracking state object that is actually returned to Python land
 *     cdef LibOVRTrackingState to_return = LibOVRTrackingState()
 *     to_return.c_data[0] = capi.ovr_GetTrackingState(             # <<<<<<<<<<<<<<
 *         _ptrSession, absTime, use_marker)
 * 
 */
  (__pyx_v_to_return->c_data[0]) = ovr_GetTrackingState(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_absTime, __pyx_v_use_marker);

  /* "psychxr/libovr/_libovr.pyx":5784
 *         _ptrSession, absTime, use_marker)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5743
 * 
 * 
 * def getTrackingState(double absTime, bint latencyMarker=True):             # <<<<<<<<<<<<<<
 *     """Get the current tracking state of the head and hands.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTrackingState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5787
 * 
 * 
 * def getDevicePoses(object deviceTypes, double absTime, bint latencyMarker=True):             # <<<<<<<<<<<<<<
 *     """Get tracked device poses.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_101getDevicePoses(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_100getDevicePoses[] = "getDevicePoses(deviceTypes, double absTime, bool latencyMarker=True)\nGet tracked device poses.\n\n    Each pose in the returned array matches the device type at each index\n    specified in `deviceTypes`. You need to call this function to get the poses\n    for 'objects', which are additional Touch controllers that can be paired and\n    tracked in the scene.\n\n    It is recommended that :func:`getTrackingState` is used for obtaining the\n    head and hand poses.\n\n    Parameters\n    ----------\n    deviceTypes : list or tuple of int\n        List of device types. Valid device types identifiers are:\n\n        * ``TRACKED_DEVICE_TYPE_HMD`` : The head or HMD.\n        * ``TRACKED_DEVICE_TYPE_LTOUCH`` : Left touch controller or hand.\n        * ``TRACKED_DEVICE_TYPE_RTOUCH`` : Right touch controller or hand.\n        * ``TRACKED_DEVICE_TYPE_TOUCH`` : Both touch controllers.\n\n        Up to four additional touch controllers can be paired and tracked, they\n        are assigned as:\n\n        * ``TRACKED_DEVICE_TYPE_OBJECT0``\n        * ``TRACKED_DEVICE_TYPE_OBJECT1``\n        * ``TRACKED_DEVICE_TYPE_OBJECT2``\n        * ``TRACKED_DEVICE_TYPE_OBJECT3``\n\n    absTime : float\n        Absolute time in seconds poses refer to.\n    latencyMarker: bool, optional\n        Insert a marker for motion-to-photon latency calculation. Set this to\n        False if :func:`getTrackingState` was previously called and a latency\n        marker was set there. The latency marker is set to the absolute time\n        this function was called.\n\n    Returns\n    -------\n    tuple\n        Return code (`int`) of the ``OVR::ovr_GetDevicePoses`` API call and list \n        of tracked device poses (`list` of :py:class:`LibOVRPoseState`). If a\n        device cannot be tracked, the return code will be\n        ``ERROR_LOST_TRACKING``.\n\n    Warning\n    -------\n    If multiple devices were specified with `deviceTypes`, the return code will\n    be ``ERROR_LOST_TRACKING`` if ANY of the ""devices lost tracking.\n\n    Examples\n    --------\n\n    Get HMD and touch controller poses::\n\n        deviceTypes = (TRACKED_DEVICE_TYPE_HMD,\n                       TRACKED_DEVICE_TYPE_LTOUCH,\n                       TRACKED_DEVICE_TYPE_RTOUCH)\n        headPose, leftHandPose, rightHandPose = getDevicePoses(\n            deviceTypes, absTime)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_101getDevicePoses = {"getDevicePoses", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_101getDevicePoses, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_100getDevicePoses};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_101getDevicePoses(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_deviceTypes = 0;
  double __pyx_v_absTime;
  int __pyx_v_latencyMarker;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDevicePoses (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_deviceTypes,&__pyx_n_s_absTime,&__pyx_n_s_latencyMarker,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deviceTypes)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_absTime)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getDevicePoses", 0, 2, 3, 1); __PYX_ERR(0, 5787, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_latencyMarker);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDevicePoses") < 0)) __PYX_ERR(0, 5787, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_deviceTypes = values[0];
    __pyx_v_absTime = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_absTime == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 5787, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_latencyMarker = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_latencyMarker == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5787, __pyx_L3_error)
    } else {
      __pyx_v_latencyMarker = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getDevicePoses", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5787, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getDevicePoses", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_100getDevicePoses(__pyx_self, __pyx_v_deviceTypes, __pyx_v_absTime, __pyx_v_latencyMarker);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_100getDevicePoses(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_deviceTypes, double __pyx_v_absTime, int __pyx_v_latencyMarker) {
  int __pyx_v_count;
  ovrTrackedDeviceType *__pyx_v_devices;
  int __pyx_v_i;
  ovrPoseStatef *__pyx_v_devicePoses;
  ovrResult __pyx_v_result;
  PyObject *__pyx_v_outPoses = 0;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *__pyx_v_thisPose = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  ovrTrackedDeviceType __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("getDevicePoses", 0);

  /* "psychxr/libovr/_libovr.pyx":5853
 *     global _eyeLayer
 * 
 *     if not deviceTypes:             # <<<<<<<<<<<<<<
 *         if latencyMarker:
 *             _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_deviceTypes); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5853, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":5854
 * 
 *     if not deviceTypes:
 *         if latencyMarker:             # <<<<<<<<<<<<<<
 *             _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()
 *         return capi.ovrSuccess, []
 */
    __pyx_t_2 = (__pyx_v_latencyMarker != 0);
    if (__pyx_t_2) {

      /* "psychxr/libovr/_libovr.pyx":5855
 *     if not deviceTypes:
 *         if latencyMarker:
 *             _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()             # <<<<<<<<<<<<<<
 *         return capi.ovrSuccess, []
 * 
 */
      __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.SensorSampleTime = ovr_GetTimeInSeconds();

      /* "psychxr/libovr/_libovr.pyx":5854
 * 
 *     if not deviceTypes:
 *         if latencyMarker:             # <<<<<<<<<<<<<<
 *             _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()
 *         return capi.ovrSuccess, []
 */
    }

    /* "psychxr/libovr/_libovr.pyx":5856
 *         if latencyMarker:
 *             _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()
 *         return capi.ovrSuccess, []             # <<<<<<<<<<<<<<
 * 
 *     # allocate arrays to store pose types and poses
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_ovrSuccessType(ovrSuccess); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":5853
 *     global _eyeLayer
 * 
 *     if not deviceTypes:             # <<<<<<<<<<<<<<
 *         if latencyMarker:
 *             _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5859
 * 
 *     # allocate arrays to store pose types and poses
 *     cdef int count = <int>len(deviceTypes)             # <<<<<<<<<<<<<<
 *     cdef capi.ovrTrackedDeviceType* devices = \
 *         <capi.ovrTrackedDeviceType*>PyMem_Malloc(
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_deviceTypes); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5859, __pyx_L1_error)
  __pyx_v_count = ((int)__pyx_t_6);

  /* "psychxr/libovr/_libovr.pyx":5861
 *     cdef int count = <int>len(deviceTypes)
 *     cdef capi.ovrTrackedDeviceType* devices = \
 *         <capi.ovrTrackedDeviceType*>PyMem_Malloc(             # <<<<<<<<<<<<<<
 *             count * sizeof(capi.ovrTrackedDeviceType))
 *     if not devices:
 */
  __pyx_v_devices = ((ovrTrackedDeviceType *)PyMem_Malloc((__pyx_v_count * (sizeof(ovrTrackedDeviceType)))));

  /* "psychxr/libovr/_libovr.pyx":5863
 *         <capi.ovrTrackedDeviceType*>PyMem_Malloc(
 *             count * sizeof(capi.ovrTrackedDeviceType))
 *     if not devices:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate array 'devices'.")
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_devices != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psychxr/libovr/_libovr.pyx":5864
 *             count * sizeof(capi.ovrTrackedDeviceType))
 *     if not devices:
 *         raise MemoryError("Failed to allocate array 'devices'.")             # <<<<<<<<<<<<<<
 * 
 *     cdef int i = 0
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 5864, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":5863
 *         <capi.ovrTrackedDeviceType*>PyMem_Malloc(
 *             count * sizeof(capi.ovrTrackedDeviceType))
 *     if not devices:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate array 'devices'.")
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5866
 *         raise MemoryError("Failed to allocate array 'devices'.")
 * 
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     for i in range(count):
 *         devices[i] = <capi.ovrTrackedDeviceType>deviceTypes[i]
 */
  __pyx_v_i = 0;

  /* "psychxr/libovr/_libovr.pyx":5867
 * 
 *     cdef int i = 0
 *     for i in range(count):             # <<<<<<<<<<<<<<
 *         devices[i] = <capi.ovrTrackedDeviceType>deviceTypes[i]
 * 
 */
  __pyx_t_7 = __pyx_v_count;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "psychxr/libovr/_libovr.pyx":5868
 *     cdef int i = 0
 *     for i in range(count):
 *         devices[i] = <capi.ovrTrackedDeviceType>deviceTypes[i]             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrPoseStatef* devicePoses = \
 */
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_deviceTypes, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = ((ovrTrackedDeviceType)__Pyx_PyInt_As_ovrTrackedDeviceType(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5868, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    (__pyx_v_devices[__pyx_v_i]) = ((ovrTrackedDeviceType)__pyx_t_10);
  }

  /* "psychxr/libovr/_libovr.pyx":5871
 * 
 *     cdef capi.ovrPoseStatef* devicePoses = \
 *         <capi.ovrPoseStatef*>PyMem_Malloc(             # <<<<<<<<<<<<<<
 *             count * sizeof(capi.ovrPoseStatef))
 *     if not devicePoses:
 */
  __pyx_v_devicePoses = ((ovrPoseStatef *)PyMem_Malloc((__pyx_v_count * (sizeof(ovrPoseStatef)))));

  /* "psychxr/libovr/_libovr.pyx":5873
 *         <capi.ovrPoseStatef*>PyMem_Malloc(
 *             count * sizeof(capi.ovrPoseStatef))
 *     if not devicePoses:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate array 'devicePoses'.")
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_devicePoses != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psychxr/libovr/_libovr.pyx":5874
 *             count * sizeof(capi.ovrPoseStatef))
 *     if not devicePoses:
 *         raise MemoryError("Failed to allocate array 'devicePoses'.")             # <<<<<<<<<<<<<<
 * 
 *     # get the device poses
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 5874, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":5873
 *         <capi.ovrPoseStatef*>PyMem_Malloc(
 *             count * sizeof(capi.ovrPoseStatef))
 *     if not devicePoses:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate array 'devicePoses'.")
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5877
 * 
 *     # get the device poses
 *     cdef capi.ovrResult result = capi.ovr_GetDevicePoses(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         devices,
 */
  __pyx_v_result = ovr_GetDevicePoses(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_devices, __pyx_v_count, __pyx_v_absTime, __pyx_v_devicePoses);

  /* "psychxr/libovr/_libovr.pyx":5885
 * 
 *     # for computing app photon-to-motion latency
 *     if latencyMarker:             # <<<<<<<<<<<<<<
 *         _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()
 * 
 */
  __pyx_t_2 = (__pyx_v_latencyMarker != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":5886
 *     # for computing app photon-to-motion latency
 *     if latencyMarker:
 *         _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()             # <<<<<<<<<<<<<<
 * 
 *     # build list of device poses
 */
    __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.SensorSampleTime = ovr_GetTimeInSeconds();

    /* "psychxr/libovr/_libovr.pyx":5885
 * 
 *     # for computing app photon-to-motion latency
 *     if latencyMarker:             # <<<<<<<<<<<<<<
 *         _eyeLayer.SensorSampleTime = capi.ovr_GetTimeInSeconds()
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5889
 * 
 *     # build list of device poses
 *     cdef list outPoses = list()             # <<<<<<<<<<<<<<
 *     cdef LibOVRPoseState thisPose
 *     for i in range(count):
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_outPoses = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "psychxr/libovr/_libovr.pyx":5891
 *     cdef list outPoses = list()
 *     cdef LibOVRPoseState thisPose
 *     for i in range(count):             # <<<<<<<<<<<<<<
 *         thisPose = LibOVRPoseState()  # new
 *         thisPose.c_data[0] = devicePoses[i]
 */
  __pyx_t_7 = __pyx_v_count;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "psychxr/libovr/_libovr.pyx":5892
 *     cdef LibOVRPoseState thisPose
 *     for i in range(count):
 *         thisPose = LibOVRPoseState()  # new             # <<<<<<<<<<<<<<
 *         thisPose.c_data[0] = devicePoses[i]
 *         outPoses.append(thisPose)
 */
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPoseState)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_thisPose, ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "psychxr/libovr/_libovr.pyx":5893
 *     for i in range(count):
 *         thisPose = LibOVRPoseState()  # new
 *         thisPose.c_data[0] = devicePoses[i]             # <<<<<<<<<<<<<<
 *         outPoses.append(thisPose)
 * 
 */
    (__pyx_v_thisPose->c_data[0]) = (__pyx_v_devicePoses[__pyx_v_i]);

    /* "psychxr/libovr/_libovr.pyx":5894
 *         thisPose = LibOVRPoseState()  # new
 *         thisPose.c_data[0] = devicePoses[i]
 *         outPoses.append(thisPose)             # <<<<<<<<<<<<<<
 * 
 *     # free the allocated arrays
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_outPoses, ((PyObject *)__pyx_v_thisPose)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 5894, __pyx_L1_error)
  }

  /* "psychxr/libovr/_libovr.pyx":5897
 * 
 *     # free the allocated arrays
 *     PyMem_Free(devices)             # <<<<<<<<<<<<<<
 *     PyMem_Free(devicePoses)
 * 
 */
  PyMem_Free(__pyx_v_devices);

  /* "psychxr/libovr/_libovr.pyx":5898
 *     # free the allocated arrays
 *     PyMem_Free(devices)
 *     PyMem_Free(devicePoses)             # <<<<<<<<<<<<<<
 * 
 *     return result, outPoses
 */
  PyMem_Free(__pyx_v_devicePoses);

  /* "psychxr/libovr/_libovr.pyx":5900
 *     PyMem_Free(devicePoses)
 * 
 *     return result, outPoses             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_INCREF(__pyx_v_outPoses);
  __Pyx_GIVEREF(__pyx_v_outPoses);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_outPoses);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":5787
 * 
 * 
 * def getDevicePoses(object deviceTypes, double absTime, bint latencyMarker=True):             # <<<<<<<<<<<<<<
 *     """Get tracked device poses.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getDevicePoses", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_outPoses);
  __Pyx_XDECREF((PyObject *)__pyx_v_thisPose);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":5903
 * 
 * 
 * def calcEyePoses(LibOVRPose headPose, object originPose=None):             # <<<<<<<<<<<<<<
 *     """Calculate eye poses using a given head pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_103calcEyePoses(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_102calcEyePoses[] = "calcEyePoses(LibOVRPose headPose, originPose=None)\nCalculate eye poses using a given head pose.\n\n    Eye poses are derived from the specified head pose, relative eye poses, and\n    the scene tracking origin.\n\n    Calculated eye poses are stored and passed to the compositor when\n    :func:`endFrame` is called unless ``LAYER_FLAG_HEAD_LOCKED`` is set. You can\n    access the computed poses via the :func:`getEyeRenderPose` function. If\n    using custom head poses, ensure :func:`setHeadLocked` is ``True`` or the\n    ``LAYER_FLAG_HEAD_LOCKED`` render layer flag is set.\n\n    Parameters\n    ----------\n    headPose : :py:class:`LibOVRPose`\n        Head pose.\n    originPose : :py:class:`LibOVRPose`, optional\n        Optional world origin pose to transform head pose. You can apply\n        transformations to this pose to simulate movement through a scene.\n\n    Examples\n    --------\n\n    Compute the eye poses from tracker data::\n\n        abs_time = getPredictedDisplayTime()\n        tracking_state, calibrated_origin = getTrackingState(abs_time, True)\n        headPoseState, status = tracking_state[TRACKED_DEVICE_TYPE_HMD]\n\n        # calculate head pose\n        hmd.calcEyePoses(headPoseState.pose)\n\n        # computed render poses appear here\n        renderPoseLeft, renderPoseRight = hmd.getEyeRenderPoses()\n\n    Using external data to set the head pose from a motion capture system::\n\n        # rigid body in the scene defining the scene origin\n        rbHead = LibOVRPose(*headRb.posOri)\n        calcEyePoses(rbHead)\n\n    Note that the external tracker latency might be larger than builtin\n    tracking. To get around this, enable forward prediction in your mocap\n    software to equal roughly to average `getPredictedDisplayTime() -\n    mocapMidExposureTime`, or time integrate poses to mid-frame time.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_103calcEyePoses = {"calcEyePoses", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_103calcEyePoses, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_102calcEyePoses};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_103calcEyePoses(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_headPose = 0;
  PyObject *__pyx_v_originPose = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calcEyePoses (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_headPose,&__pyx_n_s_originPose,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_headPose)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_originPose);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calcEyePoses") < 0)) __PYX_ERR(0, 5903, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_headPose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)values[0]);
    __pyx_v_originPose = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calcEyePoses", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5903, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.calcEyePoses", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_headPose), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "headPose", 0))) __PYX_ERR(0, 5903, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_102calcEyePoses(__pyx_self, __pyx_v_headPose, __pyx_v_originPose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_102calcEyePoses(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_headPose, PyObject *__pyx_v_originPose) {
  ovrPosef __pyx_v_hmdToEyePoses[2];
  OVR::Vector3f __pyx_v_pos;
  OVR::Vector3f __pyx_v_originPos;
  OVR::Quatf __pyx_v_ori;
  OVR::Quatf __pyx_v_originOri;
  OVR::Vector3f __pyx_v_up;
  OVR::Vector3f __pyx_v_forward;
  OVR::Matrix4f __pyx_v_rm;
  int __pyx_v_eye;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrPosef __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  ovrEyeType __pyx_t_4;
  ovrEyeType __pyx_t_5;
  int __pyx_t_6;
  OVR::Vector3f __pyx_t_7;
  __Pyx_RefNannySetupContext("calcEyePoses", 0);

  /* "psychxr/libovr/_libovr.pyx":5959
 * 
 *     cdef capi.ovrPosef[2] hmdToEyePoses
 *     hmdToEyePoses[0] = _eyeRenderDesc[0].HmdToEyePose             # <<<<<<<<<<<<<<
 *     hmdToEyePoses[1] = _eyeRenderDesc[1].HmdToEyePose
 * 
 */
  __pyx_t_1 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[0]).HmdToEyePose;
  (__pyx_v_hmdToEyePoses[0]) = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":5960
 *     cdef capi.ovrPosef[2] hmdToEyePoses
 *     hmdToEyePoses[0] = _eyeRenderDesc[0].HmdToEyePose
 *     hmdToEyePoses[1] = _eyeRenderDesc[1].HmdToEyePose             # <<<<<<<<<<<<<<
 * 
 *     # calculate the eye poses
 */
  __pyx_t_1 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[1]).HmdToEyePose;
  (__pyx_v_hmdToEyePoses[1]) = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":5963
 * 
 *     # calculate the eye poses
 *     capi.ovr_CalcEyePoses2(headPose.c_data[0], hmdToEyePoses, _eyeRenderPoses)             # <<<<<<<<<<<<<<
 * 
 *     # compute the eye transformation matrices from poses
 */
  ovr_CalcEyePoses2((__pyx_v_headPose->c_data[0]), __pyx_v_hmdToEyePoses, __pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses);

  /* "psychxr/libovr/_libovr.pyx":5973
 * 
 *     # get origin pose components
 *     if originPose is not None:             # <<<<<<<<<<<<<<
 *         originPos = <libovr_math.Vector3f>(<LibOVRPose>originPose).c_data.Position
 *         originOri = <libovr_math.Quatf>(<LibOVRPose>originPose).c_data.Orientation
 */
  __pyx_t_2 = (__pyx_v_originPose != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "psychxr/libovr/_libovr.pyx":5974
 *     # get origin pose components
 *     if originPose is not None:
 *         originPos = <libovr_math.Vector3f>(<LibOVRPose>originPose).c_data.Position             # <<<<<<<<<<<<<<
 *         originOri = <libovr_math.Quatf>(<LibOVRPose>originPose).c_data.Orientation
 *         if not originOri.IsNormalized():  # make sure orientation is normalized
 */
    __pyx_v_originPos = ((OVR::Vector3f)((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_originPose)->c_data->Position);

    /* "psychxr/libovr/_libovr.pyx":5975
 *     if originPose is not None:
 *         originPos = <libovr_math.Vector3f>(<LibOVRPose>originPose).c_data.Position
 *         originOri = <libovr_math.Quatf>(<LibOVRPose>originPose).c_data.Orientation             # <<<<<<<<<<<<<<
 *         if not originOri.IsNormalized():  # make sure orientation is normalized
 *             originOri.Normalize()
 */
    __pyx_v_originOri = ((OVR::Quatf)((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_originPose)->c_data->Orientation);

    /* "psychxr/libovr/_libovr.pyx":5976
 *         originPos = <libovr_math.Vector3f>(<LibOVRPose>originPose).c_data.Position
 *         originOri = <libovr_math.Quatf>(<LibOVRPose>originPose).c_data.Orientation
 *         if not originOri.IsNormalized():  # make sure orientation is normalized             # <<<<<<<<<<<<<<
 *             originOri.Normalize()
 * 
 */
    __pyx_t_3 = ((!(__pyx_v_originOri.IsNormalized() != 0)) != 0);
    if (__pyx_t_3) {

      /* "psychxr/libovr/_libovr.pyx":5977
 *         originOri = <libovr_math.Quatf>(<LibOVRPose>originPose).c_data.Orientation
 *         if not originOri.IsNormalized():  # make sure orientation is normalized
 *             originOri.Normalize()             # <<<<<<<<<<<<<<
 * 
 *     cdef int eye = 0
 */
      __pyx_v_originOri.Normalize();

      /* "psychxr/libovr/_libovr.pyx":5976
 *         originPos = <libovr_math.Vector3f>(<LibOVRPose>originPose).c_data.Position
 *         originOri = <libovr_math.Quatf>(<LibOVRPose>originPose).c_data.Orientation
 *         if not originOri.IsNormalized():  # make sure orientation is normalized             # <<<<<<<<<<<<<<
 *             originOri.Normalize()
 * 
 */
    }

    /* "psychxr/libovr/_libovr.pyx":5973
 * 
 *     # get origin pose components
 *     if originPose is not None:             # <<<<<<<<<<<<<<
 *         originPos = <libovr_math.Vector3f>(<LibOVRPose>originPose).c_data.Position
 *         originOri = <libovr_math.Quatf>(<LibOVRPose>originPose).c_data.Orientation
 */
  }

  /* "psychxr/libovr/_libovr.pyx":5979
 *             originOri.Normalize()
 * 
 *     cdef int eye = 0             # <<<<<<<<<<<<<<
 *     for eye in range(capi.ovrEye_Count):
 *         if originPose is not None:
 */
  __pyx_v_eye = 0;

  /* "psychxr/libovr/_libovr.pyx":5980
 * 
 *     cdef int eye = 0
 *     for eye in range(capi.ovrEye_Count):             # <<<<<<<<<<<<<<
 *         if originPose is not None:
 *             pos = originPos + <libovr_math.Vector3f>_eyeRenderPoses[eye].Position
 */
  __pyx_t_4 = ovrEye_Count;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_eye = __pyx_t_6;

    /* "psychxr/libovr/_libovr.pyx":5981
 *     cdef int eye = 0
 *     for eye in range(capi.ovrEye_Count):
 *         if originPose is not None:             # <<<<<<<<<<<<<<
 *             pos = originPos + <libovr_math.Vector3f>_eyeRenderPoses[eye].Position
 *             ori = originOri * <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 */
    __pyx_t_3 = (__pyx_v_originPose != Py_None);
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "psychxr/libovr/_libovr.pyx":5982
 *     for eye in range(capi.ovrEye_Count):
 *         if originPose is not None:
 *             pos = originPos + <libovr_math.Vector3f>_eyeRenderPoses[eye].Position             # <<<<<<<<<<<<<<
 *             ori = originOri * <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 *         else:
 */
      __pyx_v_pos = (__pyx_v_originPos + ((OVR::Vector3f)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[__pyx_v_eye]).Position));

      /* "psychxr/libovr/_libovr.pyx":5983
 *         if originPose is not None:
 *             pos = originPos + <libovr_math.Vector3f>_eyeRenderPoses[eye].Position
 *             ori = originOri * <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation             # <<<<<<<<<<<<<<
 *         else:
 *             pos = <libovr_math.Vector3f>_eyeRenderPoses[eye].Position
 */
      __pyx_v_ori = (__pyx_v_originOri * ((OVR::Quatf)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[__pyx_v_eye]).Orientation));

      /* "psychxr/libovr/_libovr.pyx":5981
 *     cdef int eye = 0
 *     for eye in range(capi.ovrEye_Count):
 *         if originPose is not None:             # <<<<<<<<<<<<<<
 *             pos = originPos + <libovr_math.Vector3f>_eyeRenderPoses[eye].Position
 *             ori = originOri * <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 */
      goto __pyx_L7;
    }

    /* "psychxr/libovr/_libovr.pyx":5985
 *             ori = originOri * <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 *         else:
 *             pos = <libovr_math.Vector3f>_eyeRenderPoses[eye].Position             # <<<<<<<<<<<<<<
 *             ori = <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 * 
 */
    /*else*/ {
      __pyx_v_pos = ((OVR::Vector3f)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[__pyx_v_eye]).Position);

      /* "psychxr/libovr/_libovr.pyx":5986
 *         else:
 *             pos = <libovr_math.Vector3f>_eyeRenderPoses[eye].Position
 *             ori = <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation             # <<<<<<<<<<<<<<
 * 
 *         if not ori.IsNormalized():  # make sure orientation is normalized
 */
      __pyx_v_ori = ((OVR::Quatf)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[__pyx_v_eye]).Orientation);
    }
    __pyx_L7:;

    /* "psychxr/libovr/_libovr.pyx":5988
 *             ori = <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 * 
 *         if not ori.IsNormalized():  # make sure orientation is normalized             # <<<<<<<<<<<<<<
 *             ori.Normalize()
 * 
 */
    __pyx_t_2 = ((!(__pyx_v_ori.IsNormalized() != 0)) != 0);
    if (__pyx_t_2) {

      /* "psychxr/libovr/_libovr.pyx":5989
 * 
 *         if not ori.IsNormalized():  # make sure orientation is normalized
 *             ori.Normalize()             # <<<<<<<<<<<<<<
 * 
 *         rm = libovr_math.Matrix4f(ori)
 */
      __pyx_v_ori.Normalize();

      /* "psychxr/libovr/_libovr.pyx":5988
 *             ori = <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 * 
 *         if not ori.IsNormalized():  # make sure orientation is normalized             # <<<<<<<<<<<<<<
 *             ori.Normalize()
 * 
 */
    }

    /* "psychxr/libovr/_libovr.pyx":5991
 *             ori.Normalize()
 * 
 *         rm = libovr_math.Matrix4f(ori)             # <<<<<<<<<<<<<<
 *         up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *         forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 */
    __pyx_v_rm = OVR::Matrix4f(__pyx_v_ori);

    /* "psychxr/libovr/_libovr.pyx":5992
 * 
 *         rm = libovr_math.Matrix4f(ori)
 *         up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))             # <<<<<<<<<<<<<<
 *         forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 *         _eyeViewMatrix[eye] = \
 */
    try {
      __pyx_t_7 = OVR::Vector3f(0., 1., 0.);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5992, __pyx_L1_error)
    }
    __pyx_v_up = __pyx_v_rm.Transform(__pyx_t_7);

    /* "psychxr/libovr/_libovr.pyx":5993
 *         rm = libovr_math.Matrix4f(ori)
 *         up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *         forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))             # <<<<<<<<<<<<<<
 *         _eyeViewMatrix[eye] = \
 *             libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 */
    try {
      __pyx_t_7 = OVR::Vector3f(0., 0., -1.);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5993, __pyx_L1_error)
    }
    __pyx_v_forward = __pyx_v_rm.Transform(__pyx_t_7);

    /* "psychxr/libovr/_libovr.pyx":5994
 *         up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *         forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 *         _eyeViewMatrix[eye] = \             # <<<<<<<<<<<<<<
 *             libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 *         _eyeViewProjectionMatrix[eye] = \
 */
    (__pyx_v_7psychxr_6libovr_7_libovr__eyeViewMatrix[__pyx_v_eye]) = OVR::Matrix4f::LookAtRH(__pyx_v_pos, (__pyx_v_pos + __pyx_v_forward), __pyx_v_up);

    /* "psychxr/libovr/_libovr.pyx":5996
 *         _eyeViewMatrix[eye] = \
 *             libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 *         _eyeViewProjectionMatrix[eye] = \             # <<<<<<<<<<<<<<
 *             _eyeProjectionMatrix[eye] * _eyeViewMatrix[eye]
 * 
 */
    (__pyx_v_7psychxr_6libovr_7_libovr__eyeViewProjectionMatrix[__pyx_v_eye]) = ((__pyx_v_7psychxr_6libovr_7_libovr__eyeProjectionMatrix[__pyx_v_eye]) * (__pyx_v_7psychxr_6libovr_7_libovr__eyeViewMatrix[__pyx_v_eye]));
  }

  /* "psychxr/libovr/_libovr.pyx":5903
 * 
 * 
 * def calcEyePoses(LibOVRPose headPose, object originPose=None):             # <<<<<<<<<<<<<<
 *     """Calculate eye poses using a given head pose.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.calcEyePoses", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6000
 * 
 * 
 * def getHmdToEyePose(int eye):             # <<<<<<<<<<<<<<
 *     """HMD to eye pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_105getHmdToEyePose(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_104getHmdToEyePose[] = "getHmdToEyePose(int eye)\nHMD to eye pose.\n\n    These are the prototype eye poses specified by LibOVR, defined only\n    after :func:`create` is called. These poses are referenced to the HMD\n    origin. Poses are transformed by calling :func:`calcEyePoses`, updating the\n    values returned by :func:`getEyeRenderPose`.\n\n    The horizontal (x-axis) separation of the eye poses are determined by the\n    configured lens spacing (slider adjustment). This spacing is supposed to\n    correspond to the actual inter-ocular distance (IOD) of the user. You can\n    get the IOD used for rendering by adding up the absolute values of the\n    x-components of the eye poses, or by multiplying the value of\n    :func:`getEyeToNoseDist` by two. Furthermore, the IOD values can be altered,\n    prior to calling :func`calcEyePoses`, to override the values specified by\n    LibOVR.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    tuple (LibOVRPose, LibOVRPose)\n        Copy of the HMD to eye pose.\n\n    See Also\n    --------\n    setHmdToEyePose : Set the HMD to eye pose.\n\n    Examples\n    --------\n    Get the HMD to eye poses::\n\n        leftPose = getHmdToEyePose(EYE_LEFT)\n        rightPose = getHmdToEyePose(EYE_RIGHT)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_105getHmdToEyePose = {"getHmdToEyePose", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_105getHmdToEyePose, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_104getHmdToEyePose};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_105getHmdToEyePose(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getHmdToEyePose (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6000, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getHmdToEyePose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_104getHmdToEyePose(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_104getHmdToEyePose(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getHmdToEyePose", 0);

  /* "psychxr/libovr/_libovr.pyx":6040
 *     """
 *     global _eyeRenderDesc
 *     return LibOVRPose.fromPtr(&_eyeRenderDesc[eye].HmdToEyePose)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr((&(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).HmdToEyePose), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6000
 * 
 * 
 * def getHmdToEyePose(int eye):             # <<<<<<<<<<<<<<
 *     """HMD to eye pose.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getHmdToEyePose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6043
 * 
 * 
 * def setHmdToEyePose(int eye, LibOVRPose eyePose):             # <<<<<<<<<<<<<<
 *     """Set the HMD eye poses.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_107setHmdToEyePose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_106setHmdToEyePose[] = "setHmdToEyePose(int eye, LibOVRPose eyePose)\nSet the HMD eye poses.\n\n    This overwrites the values returned by LibOVR and will be used in successive\n    calls of :func:`calcEyePoses` to compute eye render poses. Note that the\n    poses store the view space translations, not the relative position in the\n    scene.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    See Also\n    --------\n    getHmdToEyePose : Get the current HMD to eye pose.\n\n    Examples\n    --------\n    Set both HMD to eye poses::\n\n        eyePoses = [LibOVRPose((0.035, 0.0, 0.0)), LibOVRPose((-0.035, 0.0, 0.0))]\n        for eye in enumerate(eyePoses):\n            setHmdToEyePose(eye, eyePoses[eye])\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_107setHmdToEyePose = {"setHmdToEyePose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_107setHmdToEyePose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_106setHmdToEyePose};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_107setHmdToEyePose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED int __pyx_v_eye;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_eyePose = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setHmdToEyePose (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_eyePose,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eyePose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setHmdToEyePose", 1, 2, 2, 1); __PYX_ERR(0, 6043, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setHmdToEyePose") < 0)) __PYX_ERR(0, 6043, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6043, __pyx_L3_error)
    __pyx_v_eyePose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setHmdToEyePose", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6043, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setHmdToEyePose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eyePose), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "eyePose", 0))) __PYX_ERR(0, 6043, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_106setHmdToEyePose(__pyx_self, __pyx_v_eye, __pyx_v_eyePose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_106setHmdToEyePose(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED int __pyx_v_eye, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_eyePose) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setHmdToEyePose", 0);

  /* "psychxr/libovr/_libovr.pyx":6070
 *     """
 *     global _eyeRenderDesc
 *     _eyeRenderDesc[0].HmdToEyePose = eyePose.c_data[0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[0]).HmdToEyePose = (__pyx_v_eyePose->c_data[0]);

  /* "psychxr/libovr/_libovr.pyx":6043
 * 
 * 
 * def setHmdToEyePose(int eye, LibOVRPose eyePose):             # <<<<<<<<<<<<<<
 *     """Set the HMD eye poses.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6073
 * 
 * 
 * def getEyeRenderPose(int eye):             # <<<<<<<<<<<<<<
 *     """Get eye render poses.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_109getEyeRenderPose(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_108getEyeRenderPose[] = "getEyeRenderPose(int eye)\nGet eye render poses.\n\n    Pose are those computed by the last :func:`calcEyePoses` call. Returned\n    objects are copies of the data stored internally by the session\n    instance. These poses are used to derive the view matrix when rendering\n    for each eye, and used for visibility culling.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    Returns\n    -------\n    tuple (LibOVRPose, LibOVRPose)\n        Copies of the HMD to eye poses for the left and right eye.\n\n    See Also\n    --------\n    setEyeRenderPose : Set an eye's render pose.\n\n    Examples\n    --------\n\n    Get the eye render poses::\n\n        leftPose = getHmdToEyePose(EYE_LEFT)\n        rightPose = getHmdToEyePose(EYE_RIGHT)\n\n    Get the left and right view matrices::\n\n        eyeViewMatrices = []\n        for eye in enumerate(EYE_COUNT):\n            eyeViewMatrices.append(getHmdToEyePose(eye).asMatrix())\n\n    Same as above, but overwrites existing view matrices::\n\n        # identity 4x4 matrices\n        eyeViewMatrices = [\n            numpy.identity(4, dtype=numpy.float32),\n            numpy.identity(4, dtype=numpy.float32)]\n        for eye in range(EYE_COUNT):\n            getHmdToEyePose(eye).asMatrix(eyeViewMatrices[eye])\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_109getEyeRenderPose = {"getEyeRenderPose", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_109getEyeRenderPose, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_108getEyeRenderPose};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_109getEyeRenderPose(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeRenderPose (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6073, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeRenderPose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_108getEyeRenderPose(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_108getEyeRenderPose(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getEyeRenderPose", 0);

  /* "psychxr/libovr/_libovr.pyx":6120
 *     """
 *     global _eyeRenderPoses
 *     return LibOVRPose.fromPtr(&_eyeRenderPoses[eye])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose->fromPtr((&(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[__pyx_v_eye])), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6073
 * 
 * 
 * def getEyeRenderPose(int eye):             # <<<<<<<<<<<<<<
 *     """Get eye render poses.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeRenderPose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6123
 * 
 * 
 * def setEyeRenderPose(int eye, LibOVRPose eyePose):             # <<<<<<<<<<<<<<
 *     """Set eye render pose.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_111setEyeRenderPose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_110setEyeRenderPose[] = "setEyeRenderPose(int eye, LibOVRPose eyePose)\nSet eye render pose.\n\n    Setting the eye render pose will update the values returned by\n    :func:`getEyeRenderPose`.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n\n    See Also\n    --------\n    getEyeRenderPose : Get an eye's render pose.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_111setEyeRenderPose = {"setEyeRenderPose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_111setEyeRenderPose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_110setEyeRenderPose};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_111setEyeRenderPose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_eyePose = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setEyeRenderPose (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_eyePose,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eyePose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setEyeRenderPose", 1, 2, 2, 1); __PYX_ERR(0, 6123, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEyeRenderPose") < 0)) __PYX_ERR(0, 6123, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6123, __pyx_L3_error)
    __pyx_v_eyePose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setEyeRenderPose", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6123, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setEyeRenderPose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eyePose), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "eyePose", 0))) __PYX_ERR(0, 6123, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_110setEyeRenderPose(__pyx_self, __pyx_v_eye, __pyx_v_eyePose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_110setEyeRenderPose(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_eyePose) {
  OVR::Vector3f __pyx_v_pos;
  OVR::Quatf __pyx_v_ori;
  OVR::Vector3f __pyx_v_up;
  OVR::Vector3f __pyx_v_forward;
  OVR::Matrix4f __pyx_v_rm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  OVR::Vector3f __pyx_t_2;
  __Pyx_RefNannySetupContext("setEyeRenderPose", 0);

  /* "psychxr/libovr/_libovr.pyx":6143
 *     global _eyeViewProjectionMatrix
 * 
 *     _eyeRenderPoses[eye] = eyePose.c_data[0]             # <<<<<<<<<<<<<<
 * 
 *     # re-compute the eye transformation matrices from poses
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[__pyx_v_eye]) = (__pyx_v_eyePose->c_data[0]);

  /* "psychxr/libovr/_libovr.pyx":6152
 *     cdef libovr_math.Matrix4f rm
 * 
 *     pos = <libovr_math.Vector3f>_eyeRenderPoses[eye].Position             # <<<<<<<<<<<<<<
 *     ori = <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 * 
 */
  __pyx_v_pos = ((OVR::Vector3f)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[__pyx_v_eye]).Position);

  /* "psychxr/libovr/_libovr.pyx":6153
 * 
 *     pos = <libovr_math.Vector3f>_eyeRenderPoses[eye].Position
 *     ori = <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation             # <<<<<<<<<<<<<<
 * 
 *     if not ori.IsNormalized():  # make sure orientation is normalized
 */
  __pyx_v_ori = ((OVR::Quatf)(__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses[__pyx_v_eye]).Orientation);

  /* "psychxr/libovr/_libovr.pyx":6155
 *     ori = <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 * 
 *     if not ori.IsNormalized():  # make sure orientation is normalized             # <<<<<<<<<<<<<<
 *         ori.Normalize()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_ori.IsNormalized() != 0)) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":6156
 * 
 *     if not ori.IsNormalized():  # make sure orientation is normalized
 *         ori.Normalize()             # <<<<<<<<<<<<<<
 * 
 *     rm = libovr_math.Matrix4f(ori)
 */
    __pyx_v_ori.Normalize();

    /* "psychxr/libovr/_libovr.pyx":6155
 *     ori = <libovr_math.Quatf>_eyeRenderPoses[eye].Orientation
 * 
 *     if not ori.IsNormalized():  # make sure orientation is normalized             # <<<<<<<<<<<<<<
 *         ori.Normalize()
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":6158
 *         ori.Normalize()
 * 
 *     rm = libovr_math.Matrix4f(ori)             # <<<<<<<<<<<<<<
 *     up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *     forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 */
  __pyx_v_rm = OVR::Matrix4f(__pyx_v_ori);

  /* "psychxr/libovr/_libovr.pyx":6159
 * 
 *     rm = libovr_math.Matrix4f(ori)
 *     up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))             # <<<<<<<<<<<<<<
 *     forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 *     _eyeViewMatrix[eye] = \
 */
  try {
    __pyx_t_2 = OVR::Vector3f(0., 1., 0.);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 6159, __pyx_L1_error)
  }
  __pyx_v_up = __pyx_v_rm.Transform(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":6160
 *     rm = libovr_math.Matrix4f(ori)
 *     up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *     forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))             # <<<<<<<<<<<<<<
 *     _eyeViewMatrix[eye] = \
 *         libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 */
  try {
    __pyx_t_2 = OVR::Vector3f(0., 0., -1.);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 6160, __pyx_L1_error)
  }
  __pyx_v_forward = __pyx_v_rm.Transform(__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":6161
 *     up = rm.Transform(libovr_math.Vector3f(0., 1., 0.))
 *     forward = rm.Transform(libovr_math.Vector3f(0., 0., -1.))
 *     _eyeViewMatrix[eye] = \             # <<<<<<<<<<<<<<
 *         libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 *     # VP matrix
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeViewMatrix[__pyx_v_eye]) = OVR::Matrix4f::LookAtRH(__pyx_v_pos, (__pyx_v_pos + __pyx_v_forward), __pyx_v_up);

  /* "psychxr/libovr/_libovr.pyx":6164
 *         libovr_math.Matrix4f.LookAtRH(pos, pos + forward, up)
 *     # VP matrix
 *     _eyeViewProjectionMatrix[eye] = \             # <<<<<<<<<<<<<<
 *         _eyeProjectionMatrix[eye] * _eyeViewMatrix[eye]
 * 
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeViewProjectionMatrix[__pyx_v_eye]) = ((__pyx_v_7psychxr_6libovr_7_libovr__eyeProjectionMatrix[__pyx_v_eye]) * (__pyx_v_7psychxr_6libovr_7_libovr__eyeViewMatrix[__pyx_v_eye]));

  /* "psychxr/libovr/_libovr.pyx":6123
 * 
 * 
 * def setEyeRenderPose(int eye, LibOVRPose eyePose):             # <<<<<<<<<<<<<<
 *     """Set eye render pose.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setEyeRenderPose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6168
 * 
 * 
 * def getEyeProjectionMatrix(int eye, float nearClip=0.01, float farClip=1000.0, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *     """Compute the projection matrix.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_113getEyeProjectionMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_112getEyeProjectionMatrix[] = "getEyeProjectionMatrix(int eye, float nearClip=0.01, float farClip=1000.0, ndarray out=None)\nCompute the projection matrix.\n\n    The projection matrix is computed by the runtime using the eye FOV\n    parameters set with :py:attr:`libovr.LibOVRSession.setEyeRenderFov` calls.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n    nearClip : `float`, optional\n        Near clipping plane in meters.\n    farClip : `float`, optional\n        Far clipping plane in meters.\n    out : `ndarray` or `None`, optional\n        Alternative matrix to write values to instead of returning a new one.\n\n    Returns\n    -------\n    ndarray\n        4x4 projection matrix.\n\n    Examples\n    --------\n\n    Get the left and right projection matrices as a list::\n\n        eyeProjectionMatrices = []\n        for eye in range(EYE_COUNT):\n            eyeProjectionMatrices.append(getEyeProjectionMatrix(eye))\n\n    Same as above, but overwrites existing view matrices::\n\n        # identity 4x4 matrices\n        eyeProjectionMatrices = [\n            numpy.identity(4, dtype=numpy.float32),\n            numpy.identity(4, dtype=numpy.float32)]\n\n        # for eye in range(EYE_COUNT) also works\n        for eye in enumerate(eyeProjectionMatrices):\n            getEyeProjectionMatrix(eye, out=eyeProjectionMatrices[eye])\n\n    Using eye projection matrices with PyOpenGL (fixed-function)::\n\n        P = getEyeProjectionMatrix(eye)\n        glMatrixMode(GL.GL_PROJECTION)\n        glLoadTransposeMatrixf(P)\n\n    For `Pyglet` (which is the stardard GL interface for `PsychoPy`), you need\n    to convert the matrix to a C-types pointer before passing it to\n    `glLoadTransposeMatrixf`::\n\n        P = getEyeProjectionMatrix(eye)\n        P = P.ctypes.data_as(ctypes.POINTER(ctypes.c_float))\n        glMatrixMode(GL.GL_PROJECTION)\n        glLoadTransposeMatrixf(P)\n\n    If using fragment shaders, the matrix can be passed on to ""them as such::\n\n        P = getEyeProjectionMatrix(eye)\n        P = P.ctypes.data_as(ctypes.POINTER(ctypes.c_float))\n\n        # after the program was installed in the current rendering state via\n        # `glUseProgram` ...\n        loc = glGetUniformLocation(program, b\"m_Projection\")\n        glUniformMatrix4fv(loc, 1, GL_TRUE, P)  # `transpose` must be `True`\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_113getEyeProjectionMatrix = {"getEyeProjectionMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_113getEyeProjectionMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_112getEyeProjectionMatrix};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_113getEyeProjectionMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  float __pyx_v_nearClip;
  float __pyx_v_farClip;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeProjectionMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_nearClip,&__pyx_n_s_farClip,&__pyx_n_s_out,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nearClip);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_farClip);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEyeProjectionMatrix") < 0)) __PYX_ERR(0, 6168, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6168, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_nearClip = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_nearClip == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 6168, __pyx_L3_error)
    } else {
      __pyx_v_nearClip = ((float)0.01);
    }
    if (values[2]) {
      __pyx_v_farClip = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_farClip == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 6168, __pyx_L3_error)
    } else {
      __pyx_v_farClip = ((float)1000.0);
    }
    __pyx_v_out = ((PyArrayObject *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEyeProjectionMatrix", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6168, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeProjectionMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 6168, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_112getEyeProjectionMatrix(__pyx_self, __pyx_v_eye, __pyx_v_nearClip, __pyx_v_farClip, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_112getEyeProjectionMatrix(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, float __pyx_v_nearClip, float __pyx_v_farClip, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_to_return = 0;
  __Pyx_memviewslice __pyx_v_mv = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_to_return;
  __Pyx_Buffer __pyx_pybuffer_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  __Pyx_RefNannySetupContext("getEyeProjectionMatrix", 0);
  __pyx_pybuffer_to_return.pybuffer.buf = NULL;
  __pyx_pybuffer_to_return.refcount = 0;
  __pyx_pybuffernd_to_return.data = NULL;
  __pyx_pybuffernd_to_return.rcbuffer = &__pyx_pybuffer_to_return;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 6168, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];

  /* "psychxr/libovr/_libovr.pyx":6241
 *     cdef np.ndarray[np.float32_t, ndim=2] to_return
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         to_return = np.zeros((4, 4), dtype=np.float32)
 *     else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":6242
 * 
 *     if out is None:
 *         to_return = np.zeros((4, 4), dtype=np.float32)             # <<<<<<<<<<<<<<
 *     else:
 *         to_return = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 6242, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6242, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_v_to_return, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_to_return.diminfo[1].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_to_return.diminfo[1].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 6242, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_to_return = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":6241
 *     cdef np.ndarray[np.float32_t, ndim=2] to_return
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         to_return = np.zeros((4, 4), dtype=np.float32)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":6244
 *         to_return = np.zeros((4, 4), dtype=np.float32)
 *     else:
 *         to_return = out             # <<<<<<<<<<<<<<
 * 
 *     _eyeProjectionMatrix[eye] = \
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_v_to_return, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_to_return.diminfo[1].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_to_return.diminfo[1].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 6244, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_to_return = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":6246
 *         to_return = out
 * 
 *     _eyeProjectionMatrix[eye] = \             # <<<<<<<<<<<<<<
 *         <libovr_math.Matrix4f>capi.ovrMatrix4f_Projection(
 *             _eyeRenderDesc[eye].Fov,
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeProjectionMatrix[__pyx_v_eye]) = ((OVR::Matrix4f)ovrMatrix4f_Projection((__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[__pyx_v_eye]).Fov, __pyx_v_nearClip, __pyx_v_farClip, ovrProjection_ClipRangeOpenGL));

  /* "psychxr/libovr/_libovr.pyx":6254
 * 
 *     # fast copy matrix to numpy array
 *     cdef float [:, :] mv = to_return             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j
 *     cdef Py_ssize_t N = 4
 */
  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_float(((PyObject *)__pyx_v_to_return), PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 6254, __pyx_L1_error)
  __pyx_v_mv = __pyx_t_12;
  __pyx_t_12.memview = NULL;
  __pyx_t_12.data = NULL;

  /* "psychxr/libovr/_libovr.pyx":6256
 *     cdef float [:, :] mv = to_return
 *     cdef Py_ssize_t i, j
 *     cdef Py_ssize_t N = 4             # <<<<<<<<<<<<<<
 *     i = j = 0
 *     for i in range(N):
 */
  __pyx_v_N = 4;

  /* "psychxr/libovr/_libovr.pyx":6257
 *     cdef Py_ssize_t i, j
 *     cdef Py_ssize_t N = 4
 *     i = j = 0             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         for j in range(N):
 */
  __pyx_v_i = 0;
  __pyx_v_j = 0;

  /* "psychxr/libovr/_libovr.pyx":6258
 *     cdef Py_ssize_t N = 4
 *     i = j = 0
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         for j in range(N):
 *             mv[i, j] = _eyeProjectionMatrix[eye].M[i][j]
 */
  __pyx_t_13 = __pyx_v_N;
  __pyx_t_14 = __pyx_t_13;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "psychxr/libovr/_libovr.pyx":6259
 *     i = j = 0
 *     for i in range(N):
 *         for j in range(N):             # <<<<<<<<<<<<<<
 *             mv[i, j] = _eyeProjectionMatrix[eye].M[i][j]
 * 
 */
    __pyx_t_16 = __pyx_v_N;
    __pyx_t_17 = __pyx_t_16;
    for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
      __pyx_v_j = __pyx_t_18;

      /* "psychxr/libovr/_libovr.pyx":6260
 *     for i in range(N):
 *         for j in range(N):
 *             mv[i, j] = _eyeProjectionMatrix[eye].M[i][j]             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_20 = __pyx_v_j;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_v_mv.shape[0];
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_v_mv.shape[0])) __pyx_t_8 = 0;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_v_mv.shape[1];
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 1;
      } else if (unlikely(__pyx_t_20 >= __pyx_v_mv.shape[1])) __pyx_t_8 = 1;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        __PYX_ERR(0, 6260, __pyx_L1_error)
      }
      *((float *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_mv.data + __pyx_t_19 * __pyx_v_mv.strides[0]) ) + __pyx_t_20 * __pyx_v_mv.strides[1]) )) = (((__pyx_v_7psychxr_6libovr_7_libovr__eyeProjectionMatrix[__pyx_v_eye]).M[__pyx_v_i])[__pyx_v_j]);
    }
  }

  /* "psychxr/libovr/_libovr.pyx":6262
 *             mv[i, j] = _eyeProjectionMatrix[eye].M[i][j]
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6168
 * 
 * 
 * def getEyeProjectionMatrix(int eye, float nearClip=0.01, float farClip=1000.0, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *     """Compute the projection matrix.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeProjectionMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __PYX_XDEC_MEMVIEW(&__pyx_v_mv, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6265
 * 
 * 
 * def getEyeRenderViewport(int eye, np.ndarray[np.int_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *     """Get the eye render viewport.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_115getEyeRenderViewport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_114getEyeRenderViewport[] = "getEyeRenderViewport(int eye, ndarray out=None)\nGet the eye render viewport.\n\n    The viewport defines the region on the swap texture a given eye's image is\n    drawn to.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n    out : `ndarray`, optional\n        Optional NumPy array to place values. If None, this function will return\n        a new array. Must be dtype=int and length 4.\n\n    Returns\n    -------\n    ndarray\n        Viewport rectangle [x, y, w, h].\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_115getEyeRenderViewport = {"getEyeRenderViewport", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_115getEyeRenderViewport, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_114getEyeRenderViewport};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_115getEyeRenderViewport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeRenderViewport (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEyeRenderViewport") < 0)) __PYX_ERR(0, 6265, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6265, __pyx_L3_error)
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEyeRenderViewport", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6265, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeRenderViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 6265, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_114getEyeRenderViewport(__pyx_self, __pyx_v_eye, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_114getEyeRenderViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_to_return = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_to_return;
  __Pyx_Buffer __pyx_pybuffer_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __Pyx_RefNannySetupContext("getEyeRenderViewport", 0);
  __pyx_pybuffer_to_return.pybuffer.buf = NULL;
  __pyx_pybuffer_to_return.refcount = 0;
  __pyx_pybuffernd_to_return.data = NULL;
  __pyx_pybuffernd_to_return.rcbuffer = &__pyx_pybuffer_to_return;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 6265, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];

  /* "psychxr/libovr/_libovr.pyx":6288
 *     cdef np.ndarray[np.int_t, ndim=1] to_return
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         to_return = np.zeros((4,), dtype=np.int)
 *     else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":6289
 * 
 *     if out is None:
 *         to_return = np.zeros((4,), dtype=np.int)             # <<<<<<<<<<<<<<
 *     else:
 *         to_return = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 6289, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6289, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_v_to_return, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 6289, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_to_return = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":6288
 *     cdef np.ndarray[np.int_t, ndim=1] to_return
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         to_return = np.zeros((4,), dtype=np.int)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":6291
 *         to_return = np.zeros((4,), dtype=np.int)
 *     else:
 *         to_return = out             # <<<<<<<<<<<<<<
 * 
 *     to_return[0] = _eyeLayer.Viewport[eye].Pos.x
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_v_to_return, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 6291, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_to_return = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":6293
 *         to_return = out
 * 
 *     to_return[0] = _eyeLayer.Viewport[eye].Pos.x             # <<<<<<<<<<<<<<
 *     to_return[1] = _eyeLayer.Viewport[eye].Pos.y
 *     to_return[2] = _eyeLayer.Viewport[eye].Size.w
 */
  __pyx_t_8 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Viewport[__pyx_v_eye]).Pos.x;
  __pyx_t_12 = 0;
  __pyx_t_13 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_pybuffernd_to_return.diminfo[0].shape;
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_to_return.diminfo[0].shape)) __pyx_t_13 = 0;
  if (unlikely(__pyx_t_13 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_13);
    __PYX_ERR(0, 6293, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_to_return.diminfo[0].strides) = __pyx_t_8;

  /* "psychxr/libovr/_libovr.pyx":6294
 * 
 *     to_return[0] = _eyeLayer.Viewport[eye].Pos.x
 *     to_return[1] = _eyeLayer.Viewport[eye].Pos.y             # <<<<<<<<<<<<<<
 *     to_return[2] = _eyeLayer.Viewport[eye].Size.w
 *     to_return[3] = _eyeLayer.Viewport[eye].Size.h
 */
  __pyx_t_8 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Viewport[__pyx_v_eye]).Pos.y;
  __pyx_t_14 = 1;
  __pyx_t_13 = -1;
  if (__pyx_t_14 < 0) {
    __pyx_t_14 += __pyx_pybuffernd_to_return.diminfo[0].shape;
    if (unlikely(__pyx_t_14 < 0)) __pyx_t_13 = 0;
  } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_to_return.diminfo[0].shape)) __pyx_t_13 = 0;
  if (unlikely(__pyx_t_13 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_13);
    __PYX_ERR(0, 6294, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_to_return.diminfo[0].strides) = __pyx_t_8;

  /* "psychxr/libovr/_libovr.pyx":6295
 *     to_return[0] = _eyeLayer.Viewport[eye].Pos.x
 *     to_return[1] = _eyeLayer.Viewport[eye].Pos.y
 *     to_return[2] = _eyeLayer.Viewport[eye].Size.w             # <<<<<<<<<<<<<<
 *     to_return[3] = _eyeLayer.Viewport[eye].Size.h
 * 
 */
  __pyx_t_8 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Viewport[__pyx_v_eye]).Size.w;
  __pyx_t_15 = 2;
  __pyx_t_13 = -1;
  if (__pyx_t_15 < 0) {
    __pyx_t_15 += __pyx_pybuffernd_to_return.diminfo[0].shape;
    if (unlikely(__pyx_t_15 < 0)) __pyx_t_13 = 0;
  } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_to_return.diminfo[0].shape)) __pyx_t_13 = 0;
  if (unlikely(__pyx_t_13 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_13);
    __PYX_ERR(0, 6295, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_to_return.diminfo[0].strides) = __pyx_t_8;

  /* "psychxr/libovr/_libovr.pyx":6296
 *     to_return[1] = _eyeLayer.Viewport[eye].Pos.y
 *     to_return[2] = _eyeLayer.Viewport[eye].Size.w
 *     to_return[3] = _eyeLayer.Viewport[eye].Size.h             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
  __pyx_t_8 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Viewport[__pyx_v_eye]).Size.h;
  __pyx_t_16 = 3;
  __pyx_t_13 = -1;
  if (__pyx_t_16 < 0) {
    __pyx_t_16 += __pyx_pybuffernd_to_return.diminfo[0].shape;
    if (unlikely(__pyx_t_16 < 0)) __pyx_t_13 = 0;
  } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_to_return.diminfo[0].shape)) __pyx_t_13 = 0;
  if (unlikely(__pyx_t_13 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_13);
    __PYX_ERR(0, 6296, __pyx_L1_error)
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_to_return.diminfo[0].strides) = __pyx_t_8;

  /* "psychxr/libovr/_libovr.pyx":6298
 *     to_return[3] = _eyeLayer.Viewport[eye].Size.h
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6265
 * 
 * 
 * def getEyeRenderViewport(int eye, np.ndarray[np.int_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *     """Get the eye render viewport.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeRenderViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6301
 * 
 * 
 * def setEyeRenderViewport(int eye, object values):             # <<<<<<<<<<<<<<
 *     """Set the eye render viewport.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_117setEyeRenderViewport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_116setEyeRenderViewport[] = "setEyeRenderViewport(int eye, values)\nSet the eye render viewport.\n\n    The viewport defines the region on the swap texture a given eye's image is\n    drawn to.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n    values : array_like\n        Viewport rectangle [x, y, w, h].\n\n    Examples\n    --------\n\n    Setting the viewports for both eyes on a single swap chain buffer::\n\n        # Calculate the optimal eye buffer sizes for the FOVs, these will define\n        # the dimensions of the render target.\n        leftBufferSize, rightBufferSize = calcEyeBufferSizes()\n\n        # Define the viewports, which specifies the region on the render target a\n        # eye's image will be drawn to and accessed from. Viewports are rectangles\n        # defined like [x, y, w, h]. The x-position of the rightViewport is offset\n        # by the width of the left viewport.\n        leftViewport = [0, 0, leftBufferSize[0], leftBufferSize[1]]\n        rightViewport = [leftBufferSize[0], 0,\n                         rightBufferSize[0], rightBufferSize[1]]\n\n        # set both viewports\n        setEyeRenderViewport(EYE_LEFT, leftViewport)\n        setEyeRenderViewport(EYE_RIGHT, rightViewport)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_117setEyeRenderViewport = {"setEyeRenderViewport", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_117setEyeRenderViewport, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_116setEyeRenderViewport};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_117setEyeRenderViewport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setEyeRenderViewport (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setEyeRenderViewport", 1, 2, 2, 1); __PYX_ERR(0, 6301, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEyeRenderViewport") < 0)) __PYX_ERR(0, 6301, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6301, __pyx_L3_error)
    __pyx_v_values = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setEyeRenderViewport", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6301, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setEyeRenderViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_116setEyeRenderViewport(__pyx_self, __pyx_v_eye, __pyx_v_values);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_116setEyeRenderViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setEyeRenderViewport", 0);

  /* "psychxr/libovr/_libovr.pyx":6337
 *     """
 *     global _eyeLayer
 *     _eyeLayer.Viewport[eye].Pos.x = <int>values[0]             # <<<<<<<<<<<<<<
 *     _eyeLayer.Viewport[eye].Pos.y = <int>values[1]
 *     _eyeLayer.Viewport[eye].Size.w = <int>values[2]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Viewport[__pyx_v_eye]).Pos.x = ((int)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":6338
 *     global _eyeLayer
 *     _eyeLayer.Viewport[eye].Pos.x = <int>values[0]
 *     _eyeLayer.Viewport[eye].Pos.y = <int>values[1]             # <<<<<<<<<<<<<<
 *     _eyeLayer.Viewport[eye].Size.w = <int>values[2]
 *     _eyeLayer.Viewport[eye].Size.h = <int>values[3]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Viewport[__pyx_v_eye]).Pos.y = ((int)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":6339
 *     _eyeLayer.Viewport[eye].Pos.x = <int>values[0]
 *     _eyeLayer.Viewport[eye].Pos.y = <int>values[1]
 *     _eyeLayer.Viewport[eye].Size.w = <int>values[2]             # <<<<<<<<<<<<<<
 *     _eyeLayer.Viewport[eye].Size.h = <int>values[3]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Viewport[__pyx_v_eye]).Size.w = ((int)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":6340
 *     _eyeLayer.Viewport[eye].Pos.y = <int>values[1]
 *     _eyeLayer.Viewport[eye].Size.w = <int>values[2]
 *     _eyeLayer.Viewport[eye].Size.h = <int>values[3]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Viewport[__pyx_v_eye]).Size.h = ((int)__pyx_t_2);

  /* "psychxr/libovr/_libovr.pyx":6301
 * 
 * 
 * def setEyeRenderViewport(int eye, object values):             # <<<<<<<<<<<<<<
 *     """Set the eye render viewport.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setEyeRenderViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6343
 * 
 * 
 * def getEyeViewMatrix(int eye, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *     """Compute a view matrix for a specified eye.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_119getEyeViewMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_118getEyeViewMatrix[] = "getEyeViewMatrix(int eye, ndarray out=None)\nCompute a view matrix for a specified eye.\n\n    View matrices are derived from the eye render poses calculated by the\n    last :func:`calcEyePoses` call or update by :func:`setEyeRenderPose`.\n\n    Parameters\n    ----------\n    eye: int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n    out : ndarray or None, optional\n        Optional array to write to. Must have ndim=2, dtype=np.float32, and\n        shape == (4,4).\n\n    Returns\n    -------\n    ndarray\n        4x4 view matrix. Object `out` will be returned if specified.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_119getEyeViewMatrix = {"getEyeViewMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_119getEyeViewMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_118getEyeViewMatrix};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_119getEyeViewMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeViewMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_out,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((PyArrayObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEyeViewMatrix") < 0)) __PYX_ERR(0, 6343, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6343, __pyx_L3_error)
    __pyx_v_out = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEyeViewMatrix", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6343, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeViewMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) __PYX_ERR(0, 6343, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_118getEyeViewMatrix(__pyx_self, __pyx_v_eye, __pyx_v_out);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_118getEyeViewMatrix(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyArrayObject *__pyx_v_out) {
  PyArrayObject *__pyx_v_to_return = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_to_return;
  __Pyx_Buffer __pyx_pybuffer_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __Pyx_RefNannySetupContext("getEyeViewMatrix", 0);
  __pyx_pybuffer_to_return.pybuffer.buf = NULL;
  __pyx_pybuffer_to_return.refcount = 0;
  __pyx_pybuffernd_to_return.data = NULL;
  __pyx_pybuffernd_to_return.rcbuffer = &__pyx_pybuffer_to_return;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 6343, __pyx_L1_error)
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];

  /* "psychxr/libovr/_libovr.pyx":6366
 *     cdef np.ndarray[np.float32_t, ndim=2] to_return
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         to_return = np.zeros((4, 4), dtype=np.float32)
 *     else:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_out) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":6367
 * 
 *     if out is None:
 *         to_return = np.zeros((4, 4), dtype=np.float32)             # <<<<<<<<<<<<<<
 *     else:
 *         to_return = out
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 6367, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6367, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_v_to_return, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0;
      }
      __pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_to_return.diminfo[1].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_to_return.diminfo[1].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 6367, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_to_return = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":6366
 *     cdef np.ndarray[np.float32_t, ndim=2] to_return
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         to_return = np.zeros((4, 4), dtype=np.float32)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":6369
 *         to_return = np.zeros((4, 4), dtype=np.float32)
 *     else:
 *         to_return = out             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t i, j, N
 */
  /*else*/ {
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_out), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_v_to_return, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0;
      }
      __pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_to_return.diminfo[1].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_to_return.diminfo[1].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 6369, __pyx_L1_error)
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_v_to_return = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":6372
 * 
 *     cdef Py_ssize_t i, j, N
 *     i = j = 0             # <<<<<<<<<<<<<<
 *     N = 4
 *     for i in range(N):
 */
  __pyx_v_i = 0;
  __pyx_v_j = 0;

  /* "psychxr/libovr/_libovr.pyx":6373
 *     cdef Py_ssize_t i, j, N
 *     i = j = 0
 *     N = 4             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         for j in range(N):
 */
  __pyx_v_N = 4;

  /* "psychxr/libovr/_libovr.pyx":6374
 *     i = j = 0
 *     N = 4
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         for j in range(N):
 *             to_return[i, j] = _eyeViewMatrix[eye].M[i][j]
 */
  __pyx_t_12 = __pyx_v_N;
  __pyx_t_13 = __pyx_t_12;
  for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
    __pyx_v_i = __pyx_t_14;

    /* "psychxr/libovr/_libovr.pyx":6375
 *     N = 4
 *     for i in range(N):
 *         for j in range(N):             # <<<<<<<<<<<<<<
 *             to_return[i, j] = _eyeViewMatrix[eye].M[i][j]
 * 
 */
    __pyx_t_15 = __pyx_v_N;
    __pyx_t_16 = __pyx_t_15;
    for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
      __pyx_v_j = __pyx_t_17;

      /* "psychxr/libovr/_libovr.pyx":6376
 *     for i in range(N):
 *         for j in range(N):
 *             to_return[i, j] = _eyeViewMatrix[eye].M[i][j]             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_19 = __pyx_v_j;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_to_return.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_to_return.diminfo[0].shape)) __pyx_t_8 = 0;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_to_return.diminfo[1].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 1;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_to_return.diminfo[1].shape)) __pyx_t_8 = 1;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        __PYX_ERR(0, 6376, __pyx_L1_error)
      }
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_to_return.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_to_return.diminfo[1].strides) = (((__pyx_v_7psychxr_6libovr_7_libovr__eyeViewMatrix[__pyx_v_eye]).M[__pyx_v_i])[__pyx_v_j]);
    }
  }

  /* "psychxr/libovr/_libovr.pyx":6378
 *             to_return[i, j] = _eyeViewMatrix[eye].M[i][j]
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6343
 * 
 * 
 * def getEyeViewMatrix(int eye, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *     """Compute a view matrix for a specified eye.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.getEyeViewMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6381
 * 
 * 
 * def getPredictedDisplayTime(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Get the predicted time a frame will be displayed.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_121getPredictedDisplayTime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_120getPredictedDisplayTime[] = "getPredictedDisplayTime(unsigned int frameIndex=0)\nGet the predicted time a frame will be displayed.\n\n    Parameters\n    ----------\n    frameIndex : int\n        Frame index.\n\n    Returns\n    -------\n    float\n        Absolute frame mid-point time for the given frame index in seconds.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_121getPredictedDisplayTime = {"getPredictedDisplayTime", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_121getPredictedDisplayTime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_120getPredictedDisplayTime};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_121getPredictedDisplayTime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_frameIndex;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPredictedDisplayTime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frameIndex,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frameIndex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPredictedDisplayTime") < 0)) __PYX_ERR(0, 6381, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_frameIndex = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_frameIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6381, __pyx_L3_error)
    } else {
      __pyx_v_frameIndex = ((unsigned int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPredictedDisplayTime", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6381, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getPredictedDisplayTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_120getPredictedDisplayTime(__pyx_self, __pyx_v_frameIndex);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_120getPredictedDisplayTime(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex) {
  double __pyx_v_t_sec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getPredictedDisplayTime", 0);

  /* "psychxr/libovr/_libovr.pyx":6396
 *     """
 *     global _ptrSession
 *     cdef double t_sec = capi.ovr_GetPredictedDisplayTime(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         frameIndex)
 */
  __pyx_v_t_sec = ovr_GetPredictedDisplayTime(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_frameIndex);

  /* "psychxr/libovr/_libovr.pyx":6400
 *         frameIndex)
 * 
 *     return t_sec             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_t_sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6381
 * 
 * 
 * def getPredictedDisplayTime(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Get the predicted time a frame will be displayed.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getPredictedDisplayTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6403
 * 
 * 
 * def timeInSeconds():             # <<<<<<<<<<<<<<
 *     """Absolute time in seconds.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_123timeInSeconds(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_122timeInSeconds[] = "timeInSeconds()\nAbsolute time in seconds.\n\n    Returns\n    -------\n    float\n        Time in seconds.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_123timeInSeconds = {"timeInSeconds", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_123timeInSeconds, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_122timeInSeconds};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_123timeInSeconds(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timeInSeconds (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_122timeInSeconds(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_122timeInSeconds(CYTHON_UNUSED PyObject *__pyx_self) {
  double __pyx_v_t_sec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("timeInSeconds", 0);

  /* "psychxr/libovr/_libovr.pyx":6412
 * 
 *     """
 *     cdef double t_sec = capi.ovr_GetTimeInSeconds()             # <<<<<<<<<<<<<<
 * 
 *     return t_sec
 */
  __pyx_v_t_sec = ovr_GetTimeInSeconds();

  /* "psychxr/libovr/_libovr.pyx":6414
 *     cdef double t_sec = capi.ovr_GetTimeInSeconds()
 * 
 *     return t_sec             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_t_sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6403
 * 
 * 
 * def timeInSeconds():             # <<<<<<<<<<<<<<
 *     """Absolute time in seconds.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.timeInSeconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6417
 * 
 * 
 * def waitToBeginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Wait until a buffer is available so frame rendering can begin. Must be
 *     called before :func:`beginFrame`.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_125waitToBeginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_124waitToBeginFrame[] = "waitToBeginFrame(unsigned int frameIndex=0)\nWait until a buffer is available so frame rendering can begin. Must be\n    called before :func:`beginFrame`.\n\n    Parameters\n    ----------\n    frameIndex : int\n        The target frame index.\n\n    Returns\n    -------\n    int\n        Return code of the LibOVR API call ``OVR::ovr_WaitToBeginFrame``. \n        Returns ``SUCCESS`` if completed without errors. May return\n        ``ERROR_DISPLAY_LOST`` if the device was removed, rendering the current \n        session invalid.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_125waitToBeginFrame = {"waitToBeginFrame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_125waitToBeginFrame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_124waitToBeginFrame};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_125waitToBeginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_frameIndex;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("waitToBeginFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frameIndex,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frameIndex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "waitToBeginFrame") < 0)) __PYX_ERR(0, 6417, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_frameIndex = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_frameIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6417, __pyx_L3_error)
    } else {
      __pyx_v_frameIndex = ((unsigned int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("waitToBeginFrame", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6417, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.waitToBeginFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_124waitToBeginFrame(__pyx_self, __pyx_v_frameIndex);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_124waitToBeginFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("waitToBeginFrame", 0);

  /* "psychxr/libovr/_libovr.pyx":6437
 *     global _ptrSession
 *     cdef capi.ovrResult result = \
 *         capi.ovr_WaitToBeginFrame(_ptrSession, frameIndex)             # <<<<<<<<<<<<<<
 * 
 *     return <int>result
 */
  __pyx_v_result = ovr_WaitToBeginFrame(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_frameIndex);

  /* "psychxr/libovr/_libovr.pyx":6439
 *         capi.ovr_WaitToBeginFrame(_ptrSession, frameIndex)
 * 
 *     return <int>result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_result)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6417
 * 
 * 
 * def waitToBeginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Wait until a buffer is available so frame rendering can begin. Must be
 *     called before :func:`beginFrame`.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.waitToBeginFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6442
 * 
 * 
 * def beginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Begin rendering the frame. Must be called prior to drawing and
 *     :func:`endFrame`.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_127beginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_126beginFrame[] = "beginFrame(unsigned int frameIndex=0)\nBegin rendering the frame. Must be called prior to drawing and\n    :func:`endFrame`.\n\n    Parameters\n    ----------\n    frameIndex : int\n        The target frame index.\n\n    Returns\n    -------\n    int\n        Error code returned by ``OVR::ovr_BeginFrame``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_127beginFrame = {"beginFrame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_127beginFrame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_126beginFrame};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_127beginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_frameIndex;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("beginFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frameIndex,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frameIndex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "beginFrame") < 0)) __PYX_ERR(0, 6442, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_frameIndex = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_frameIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6442, __pyx_L3_error)
    } else {
      __pyx_v_frameIndex = ((unsigned int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("beginFrame", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6442, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.beginFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_126beginFrame(__pyx_self, __pyx_v_frameIndex);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_126beginFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("beginFrame", 0);

  /* "psychxr/libovr/_libovr.pyx":6459
 *     global _ptrSession
 *     cdef capi.ovrResult result = \
 *         capi.ovr_BeginFrame(_ptrSession, frameIndex)             # <<<<<<<<<<<<<<
 * 
 *     return <int>result
 */
  __pyx_v_result = ovr_BeginFrame(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_frameIndex);

  /* "psychxr/libovr/_libovr.pyx":6461
 *         capi.ovr_BeginFrame(_ptrSession, frameIndex)
 * 
 *     return <int>result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_result)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6442
 * 
 * 
 * def beginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Begin rendering the frame. Must be called prior to drawing and
 *     :func:`endFrame`.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.beginFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6464
 * 
 * 
 * def commitTextureSwapChain(int eye):             # <<<<<<<<<<<<<<
 *     """Commit changes to a given eye's texture swap chain. When called, the
 *     runtime is notified that the texture is ready for use, and the swap
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_129commitTextureSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_128commitTextureSwapChain[] = "commitTextureSwapChain(int eye)\nCommit changes to a given eye's texture swap chain. When called, the\n    runtime is notified that the texture is ready for use, and the swap\n    chain index is incremented.\n\n    Parameters\n    ----------\n    eye : int\n        Eye buffer index.\n\n    Returns\n    -------\n    int\n        Error code returned by API call ``OVR::ovr_CommitTextureSwapChain``. \n        Will return ``SUCCESS`` if successful. Returns error code\n        ``ERROR_TEXTURE_SWAP_CHAIN_FULL`` if called too many times without \n        calling :func:`endFrame`.\n\n    Warning\n    -------\n    No additional drawing operations are permitted once the texture is committed\n    until the SDK dereferences it, making it available again.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_129commitTextureSwapChain = {"commitTextureSwapChain", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_129commitTextureSwapChain, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_128commitTextureSwapChain};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_129commitTextureSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("commitTextureSwapChain (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6464, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.commitTextureSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_128commitTextureSwapChain(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_128commitTextureSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("commitTextureSwapChain", 0);

  /* "psychxr/libovr/_libovr.pyx":6490
 *     global _swapChains
 *     global _ptrSession
 *     cdef capi.ovrResult result = capi.ovr_CommitTextureSwapChain(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         _swapChains[eye])
 */
  __pyx_v_result = ovr_CommitTextureSwapChain(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (__pyx_v_7psychxr_6libovr_7_libovr__swapChains[__pyx_v_eye]));

  /* "psychxr/libovr/_libovr.pyx":6494
 *         _swapChains[eye])
 * 
 *     return <int>result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_result)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6464
 * 
 * 
 * def commitTextureSwapChain(int eye):             # <<<<<<<<<<<<<<
 *     """Commit changes to a given eye's texture swap chain. When called, the
 *     runtime is notified that the texture is ready for use, and the swap
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.commitTextureSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6497
 * 
 * 
 * def endFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Call when rendering a frame has completed. Buffers which have been
 *     committed are passed to the compositor for distortion.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_131endFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_130endFrame[] = "endFrame(unsigned int frameIndex=0)\nCall when rendering a frame has completed. Buffers which have been\n    committed are passed to the compositor for distortion.\n\n    Successful :func:`waitToBeginFrame` and :func:`beginFrame` call must precede\n    calling :func:`endFrame`.\n\n    Parameters\n    ----------\n    frameIndex : int\n        The target frame index.\n\n    Returns\n    -------\n    tuple (int, float)\n        Error code returned by API call `OVR::ovr_EndFrame` and the absolute\n        time in seconds `OVR::ovr_EndFrame` returned.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_131endFrame = {"endFrame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_131endFrame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_130endFrame};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_131endFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_frameIndex;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("endFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frameIndex,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frameIndex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "endFrame") < 0)) __PYX_ERR(0, 6497, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_frameIndex = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_frameIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6497, __pyx_L3_error)
    } else {
      __pyx_v_frameIndex = ((unsigned int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("endFrame", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6497, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.endFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_130endFrame(__pyx_self, __pyx_v_frameIndex);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_130endFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex) {
  ovrLayerHeader *__pyx_v_layers;
  ovrResult __pyx_v_result;
  double __pyx_v_absTime;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  ovrPosef __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("endFrame", 0);

  /* "psychxr/libovr/_libovr.pyx":6522
 *     # if head locking is enabled, make sure the render poses are fixed to
 *     # HmdToEyePose
 *     if (_eyeLayer.Header.Flags & capi.ovrLayerFlag_HeadLocked) != \             # <<<<<<<<<<<<<<
 *             capi.ovrLayerFlag_HeadLocked:
 *         _eyeLayer.RenderPose = _eyeRenderPoses
 */
  __pyx_t_1 = (((__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags & ovrLayerFlag_HeadLocked) != ovrLayerFlag_HeadLocked) != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":6524
 *     if (_eyeLayer.Header.Flags & capi.ovrLayerFlag_HeadLocked) != \
 *             capi.ovrLayerFlag_HeadLocked:
 *         _eyeLayer.RenderPose = _eyeRenderPoses             # <<<<<<<<<<<<<<
 *     else:
 *         _eyeLayer.RenderPose[0] = _eyeRenderDesc[0].HmdToEyePose
 */
    memcpy(&(__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.RenderPose[0]), __pyx_v_7psychxr_6libovr_7_libovr__eyeRenderPoses, sizeof(__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.RenderPose[0]) * (2));

    /* "psychxr/libovr/_libovr.pyx":6522
 *     # if head locking is enabled, make sure the render poses are fixed to
 *     # HmdToEyePose
 *     if (_eyeLayer.Header.Flags & capi.ovrLayerFlag_HeadLocked) != \             # <<<<<<<<<<<<<<
 *             capi.ovrLayerFlag_HeadLocked:
 *         _eyeLayer.RenderPose = _eyeRenderPoses
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":6526
 *         _eyeLayer.RenderPose = _eyeRenderPoses
 *     else:
 *         _eyeLayer.RenderPose[0] = _eyeRenderDesc[0].HmdToEyePose             # <<<<<<<<<<<<<<
 *         _eyeLayer.RenderPose[1] = _eyeRenderDesc[1].HmdToEyePose
 * 
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[0]).HmdToEyePose;
    (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.RenderPose[0]) = __pyx_t_2;

    /* "psychxr/libovr/_libovr.pyx":6527
 *     else:
 *         _eyeLayer.RenderPose[0] = _eyeRenderDesc[0].HmdToEyePose
 *         _eyeLayer.RenderPose[1] = _eyeRenderDesc[1].HmdToEyePose             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrLayerHeader* layers = &_eyeLayer.Header
 */
    __pyx_t_2 = (__pyx_v_7psychxr_6libovr_7_libovr__eyeRenderDesc[1]).HmdToEyePose;
    (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.RenderPose[1]) = __pyx_t_2;
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":6529
 *         _eyeLayer.RenderPose[1] = _eyeRenderDesc[1].HmdToEyePose
 * 
 *     cdef capi.ovrLayerHeader* layers = &_eyeLayer.Header             # <<<<<<<<<<<<<<
 *     cdef capi.ovrResult result = capi.ovr_EndFrame(
 *         _ptrSession,
 */
  __pyx_v_layers = (&__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header);

  /* "psychxr/libovr/_libovr.pyx":6530
 * 
 *     cdef capi.ovrLayerHeader* layers = &_eyeLayer.Header
 *     cdef capi.ovrResult result = capi.ovr_EndFrame(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         frameIndex,
 */
  __pyx_v_result = ovr_EndFrame(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_frameIndex, NULL, (&__pyx_v_layers), ((unsigned int)1));

  /* "psychxr/libovr/_libovr.pyx":6537
 *         <unsigned int>1)
 * 
 *     cdef double absTime = capi.ovr_GetTimeInSeconds()             # <<<<<<<<<<<<<<
 * 
 *     return result, absTime
 */
  __pyx_v_absTime = ovr_GetTimeInSeconds();

  /* "psychxr/libovr/_libovr.pyx":6539
 *     cdef double absTime = capi.ovr_GetTimeInSeconds()
 * 
 *     return result, absTime             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_absTime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6497
 * 
 * 
 * def endFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Call when rendering a frame has completed. Buffers which have been
 *     committed are passed to the compositor for distortion.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.libovr._libovr.endFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6542
 * 
 * 
 * def getTrackingOriginType():             # <<<<<<<<<<<<<<
 *     """Get the current tracking origin type.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_133getTrackingOriginType(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_132getTrackingOriginType[] = "getTrackingOriginType()\nGet the current tracking origin type.\n\n    The tracking origin type specifies where the origin is placed when computing\n    the pose of tracked objects (i.e. the head and touch controllers.) Valid\n    values are ``TRACKING_ORIGIN_EYE_LEVEL`` and \n    ``TRACKING_ORIGIN_FLOOR_LEVEL``.\n\n    See Also\n    --------\n    setTrackingOriginType : Set the tracking origin type.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_133getTrackingOriginType = {"getTrackingOriginType", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_133getTrackingOriginType, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_132getTrackingOriginType};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_133getTrackingOriginType(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackingOriginType (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_132getTrackingOriginType(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_132getTrackingOriginType(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrTrackingOrigin __pyx_v_originType;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getTrackingOriginType", 0);

  /* "psychxr/libovr/_libovr.pyx":6557
 *     global _ptrSession
 *     cdef capi.ovrTrackingOrigin originType = \
 *         capi.ovr_GetTrackingOriginType(_ptrSession)             # <<<<<<<<<<<<<<
 * 
 *     if originType == capi.ovrTrackingOrigin_FloorLevel:
 */
  __pyx_v_originType = ovr_GetTrackingOriginType(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":6559
 *         capi.ovr_GetTrackingOriginType(_ptrSession)
 * 
 *     if originType == capi.ovrTrackingOrigin_FloorLevel:             # <<<<<<<<<<<<<<
 *         return TRACKING_ORIGIN_FLOOR_LEVEL
 *     elif originType == capi.ovrTrackingOrigin_EyeLevel:
 */
  switch (__pyx_v_originType) {
    case ovrTrackingOrigin_FloorLevel:

    /* "psychxr/libovr/_libovr.pyx":6560
 * 
 *     if originType == capi.ovrTrackingOrigin_FloorLevel:
 *         return TRACKING_ORIGIN_FLOOR_LEVEL             # <<<<<<<<<<<<<<
 *     elif originType == capi.ovrTrackingOrigin_EyeLevel:
 *         return TRACKING_ORIGIN_EYE_LEVEL
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_TRACKING_ORIGIN_FLOOR_LEVEL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":6559
 *         capi.ovr_GetTrackingOriginType(_ptrSession)
 * 
 *     if originType == capi.ovrTrackingOrigin_FloorLevel:             # <<<<<<<<<<<<<<
 *         return TRACKING_ORIGIN_FLOOR_LEVEL
 *     elif originType == capi.ovrTrackingOrigin_EyeLevel:
 */
    break;
    case ovrTrackingOrigin_EyeLevel:

    /* "psychxr/libovr/_libovr.pyx":6562
 *         return TRACKING_ORIGIN_FLOOR_LEVEL
 *     elif originType == capi.ovrTrackingOrigin_EyeLevel:
 *         return TRACKING_ORIGIN_EYE_LEVEL             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_TRACKING_ORIGIN_EYE_LEVEL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "psychxr/libovr/_libovr.pyx":6561
 *     if originType == capi.ovrTrackingOrigin_FloorLevel:
 *         return TRACKING_ORIGIN_FLOOR_LEVEL
 *     elif originType == capi.ovrTrackingOrigin_EyeLevel:             # <<<<<<<<<<<<<<
 *         return TRACKING_ORIGIN_EYE_LEVEL
 * 
 */
    break;
    default: break;
  }

  /* "psychxr/libovr/_libovr.pyx":6542
 * 
 * 
 * def getTrackingOriginType():             # <<<<<<<<<<<<<<
 *     """Get the current tracking origin type.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTrackingOriginType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6565
 * 
 * 
 * def setTrackingOriginType(int value):             # <<<<<<<<<<<<<<
 *     """Set the tracking origin type.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_135setTrackingOriginType(PyObject *__pyx_self, PyObject *__pyx_arg_value); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_134setTrackingOriginType[] = "setTrackingOriginType(int value)\nSet the tracking origin type.\n\n    Specify the tracking origin to use when computing eye poses. Subsequent\n    calls of :func:`calcEyePoses` will use the set tracking origin.\n\n    Parameters\n    ----------\n    value : int\n        Tracking origin type, must be either ``TRACKING_ORIGIN_FLOOR_LEVEL`` or\n        ``TRACKING_ORIGIN_EYE_LEVEL``.\n\n    Returns\n    -------\n    int\n        Result of the ``OVR::ovr_SetTrackingOriginType`` LibOVR API call.\n\n    See Also\n    --------\n    getTrackingOriginType : Get the current tracking origin type.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_135setTrackingOriginType = {"setTrackingOriginType", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_135setTrackingOriginType, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_134setTrackingOriginType};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_135setTrackingOriginType(PyObject *__pyx_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTrackingOriginType (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6565, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setTrackingOriginType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_134setTrackingOriginType(__pyx_self, ((int)__pyx_v_value));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_134setTrackingOriginType(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_value) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setTrackingOriginType", 0);

  /* "psychxr/libovr/_libovr.pyx":6589
 *     cdef capi.ovrResult result
 *     global _ptrSession
 *     if value == TRACKING_ORIGIN_FLOOR_LEVEL:             # <<<<<<<<<<<<<<
 *         result = capi.ovr_SetTrackingOriginType(
 *             _ptrSession, capi.ovrTrackingOrigin_FloorLevel)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TRACKING_ORIGIN_FLOOR_LEVEL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 6589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":6590
 *     global _ptrSession
 *     if value == TRACKING_ORIGIN_FLOOR_LEVEL:
 *         result = capi.ovr_SetTrackingOriginType(             # <<<<<<<<<<<<<<
 *             _ptrSession, capi.ovrTrackingOrigin_FloorLevel)
 *     elif value == TRACKING_ORIGIN_EYE_LEVEL:
 */
    __pyx_v_result = ovr_SetTrackingOriginType(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ovrTrackingOrigin_FloorLevel);

    /* "psychxr/libovr/_libovr.pyx":6589
 *     cdef capi.ovrResult result
 *     global _ptrSession
 *     if value == TRACKING_ORIGIN_FLOOR_LEVEL:             # <<<<<<<<<<<<<<
 *         result = capi.ovr_SetTrackingOriginType(
 *             _ptrSession, capi.ovrTrackingOrigin_FloorLevel)
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":6592
 *         result = capi.ovr_SetTrackingOriginType(
 *             _ptrSession, capi.ovrTrackingOrigin_FloorLevel)
 *     elif value == TRACKING_ORIGIN_EYE_LEVEL:             # <<<<<<<<<<<<<<
 *         result = capi.ovr_SetTrackingOriginType(
 *             _ptrSession, capi.ovrTrackingOrigin_EyeLevel)
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TRACKING_ORIGIN_EYE_LEVEL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 6592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_4)) {

    /* "psychxr/libovr/_libovr.pyx":6593
 *             _ptrSession, capi.ovrTrackingOrigin_FloorLevel)
 *     elif value == TRACKING_ORIGIN_EYE_LEVEL:
 *         result = capi.ovr_SetTrackingOriginType(             # <<<<<<<<<<<<<<
 *             _ptrSession, capi.ovrTrackingOrigin_EyeLevel)
 *     else:
 */
    __pyx_v_result = ovr_SetTrackingOriginType(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ovrTrackingOrigin_EyeLevel);

    /* "psychxr/libovr/_libovr.pyx":6592
 *         result = capi.ovr_SetTrackingOriginType(
 *             _ptrSession, capi.ovrTrackingOrigin_FloorLevel)
 *     elif value == TRACKING_ORIGIN_EYE_LEVEL:             # <<<<<<<<<<<<<<
 *         result = capi.ovr_SetTrackingOriginType(
 *             _ptrSession, capi.ovrTrackingOrigin_EyeLevel)
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":6596
 *             _ptrSession, capi.ovrTrackingOrigin_EyeLevel)
 *     else:
 *         raise ValueError("Invalid tracking origin type specified "             # <<<<<<<<<<<<<<
 *                          "must be 'TRACKING_ORIGIN_FLOOR_LEVEL' or "
 *                          "'TRACKING_ORIGIN_EYE_LEVEL'.")
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6596, __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, 6596, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":6600
 *                          "'TRACKING_ORIGIN_EYE_LEVEL'.")
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6565
 * 
 * 
 * def setTrackingOriginType(int value):             # <<<<<<<<<<<<<<
 *     """Set the tracking origin type.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setTrackingOriginType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6603
 * 
 * 
 * def recenterTrackingOrigin():             # <<<<<<<<<<<<<<
 *     """Recenter the tracking origin.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_137recenterTrackingOrigin(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_136recenterTrackingOrigin[] = "recenterTrackingOrigin()\nRecenter the tracking origin.\n\n    Returns\n    -------\n    int\n        The result of the LibOVR API call ``OVR::ovr_RecenterTrackingOrigin``.\n\n    Examples\n    --------\n    Recenter the tracking origin if requested by the session status::\n\n        sessionStatus = getSessionStatus()\n        if sessionStatus.shouldRecenter:\n            recenterTrackingOrigin()\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_137recenterTrackingOrigin = {"recenterTrackingOrigin", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_137recenterTrackingOrigin, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_136recenterTrackingOrigin};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_137recenterTrackingOrigin(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("recenterTrackingOrigin (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_136recenterTrackingOrigin(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_136recenterTrackingOrigin(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("recenterTrackingOrigin", 0);

  /* "psychxr/libovr/_libovr.pyx":6621
 *     """
 *     global _ptrSession
 *     cdef capi.ovrResult result = capi.ovr_RecenterTrackingOrigin(             # <<<<<<<<<<<<<<
 *         _ptrSession)
 * 
 */
  __pyx_v_result = ovr_RecenterTrackingOrigin(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":6624
 *         _ptrSession)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6603
 * 
 * 
 * def recenterTrackingOrigin():             # <<<<<<<<<<<<<<
 *     """Recenter the tracking origin.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.recenterTrackingOrigin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6627
 * 
 * 
 * def specifyTrackingOrigin(LibOVRPose newOrigin):             # <<<<<<<<<<<<<<
 *     """Specify a new tracking origin.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_139specifyTrackingOrigin(PyObject *__pyx_self, PyObject *__pyx_v_newOrigin); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_138specifyTrackingOrigin[] = "specifyTrackingOrigin(LibOVRPose newOrigin)\nSpecify a new tracking origin.\n\n    Parameters\n    ----------\n    newOrigin : LibOVRPose\n        New origin to use.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_139specifyTrackingOrigin = {"specifyTrackingOrigin", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_139specifyTrackingOrigin, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_138specifyTrackingOrigin};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_139specifyTrackingOrigin(PyObject *__pyx_self, PyObject *__pyx_v_newOrigin) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("specifyTrackingOrigin (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newOrigin), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "newOrigin", 0))) __PYX_ERR(0, 6627, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_138specifyTrackingOrigin(__pyx_self, ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)__pyx_v_newOrigin));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_138specifyTrackingOrigin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_newOrigin) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("specifyTrackingOrigin", 0);

  /* "psychxr/libovr/_libovr.pyx":6637
 *     """
 *     global _ptrSession
 *     cdef capi.ovrResult result = capi.ovr_SpecifyTrackingOrigin(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         newOrigin.c_data[0])
 */
  __pyx_v_result = ovr_SpecifyTrackingOrigin(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (__pyx_v_newOrigin->c_data[0]));

  /* "psychxr/libovr/_libovr.pyx":6641
 *         newOrigin.c_data[0])
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6627
 * 
 * 
 * def specifyTrackingOrigin(LibOVRPose newOrigin):             # <<<<<<<<<<<<<<
 *     """Specify a new tracking origin.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.specifyTrackingOrigin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6644
 * 
 * 
 * def clearShouldRecenterFlag():             # <<<<<<<<<<<<<<
 *     """Clear the :py:attr:`LibOVRSessionStatus.shouldRecenter` flag.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_141clearShouldRecenterFlag(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_140clearShouldRecenterFlag[] = "clearShouldRecenterFlag()\nClear the :py:attr:`LibOVRSessionStatus.shouldRecenter` flag.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_141clearShouldRecenterFlag = {"clearShouldRecenterFlag", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_141clearShouldRecenterFlag, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_140clearShouldRecenterFlag};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_141clearShouldRecenterFlag(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clearShouldRecenterFlag (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_140clearShouldRecenterFlag(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_140clearShouldRecenterFlag(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clearShouldRecenterFlag", 0);

  /* "psychxr/libovr/_libovr.pyx":6649
 *     """
 *     global _ptrSession
 *     capi.ovr_ClearShouldRecenterFlag(_ptrSession)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ovr_ClearShouldRecenterFlag(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":6644
 * 
 * 
 * def clearShouldRecenterFlag():             # <<<<<<<<<<<<<<
 *     """Clear the :py:attr:`LibOVRSessionStatus.shouldRecenter` flag.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6652
 * 
 * 
 * def getTrackerCount():             # <<<<<<<<<<<<<<
 *     """Get the number of attached trackers.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_143getTrackerCount(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_142getTrackerCount[] = "getTrackerCount()\nGet the number of attached trackers.\n\n    Returns\n    -------\n    int\n        Number of trackers reported by `LibOVR`.\n\n    Notes\n    -----\n    * The Oculus Rift S uses inside-out tracking, therefore does not have\n      external trackers. For compatibility, `LibOVR` will return a tracker count\n      of 3.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_143getTrackerCount = {"getTrackerCount", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_143getTrackerCount, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_142getTrackerCount};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_143getTrackerCount(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackerCount (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_142getTrackerCount(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_142getTrackerCount(CYTHON_UNUSED PyObject *__pyx_self) {
  unsigned int __pyx_v_trackerCount;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getTrackerCount", 0);

  /* "psychxr/libovr/_libovr.pyx":6668
 *     """
 *     global _ptrSession
 *     cdef unsigned int trackerCount = capi.ovr_GetTrackerCount(             # <<<<<<<<<<<<<<
 *         _ptrSession)
 * 
 */
  __pyx_v_trackerCount = ovr_GetTrackerCount(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":6671
 *         _ptrSession)
 * 
 *     return <int>trackerCount             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_trackerCount)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6652
 * 
 * 
 * def getTrackerCount():             # <<<<<<<<<<<<<<
 *     """Get the number of attached trackers.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTrackerCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6674
 * 
 * 
 * def getTrackerInfo(int trackerIndex):             # <<<<<<<<<<<<<<
 *     """Get information about a given tracker.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_145getTrackerInfo(PyObject *__pyx_self, PyObject *__pyx_arg_trackerIndex); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_144getTrackerInfo[] = "getTrackerInfo(int trackerIndex)\nGet information about a given tracker.\n\n    Parameters\n    ----------\n    trackerIndex : int\n        The index of the sensor to query. Valid values are between 0 and\n        :func:`getTrackerCount` - 1.\n\n    Notes\n    -----\n    * The Oculus Rift S uses inside-out tracking, therefore does not have\n      external trackers. For compatibility, `LibOVR` will dummy tracker objects.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_145getTrackerInfo = {"getTrackerInfo", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_145getTrackerInfo, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_144getTrackerInfo};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_145getTrackerInfo(PyObject *__pyx_self, PyObject *__pyx_arg_trackerIndex) {
  int __pyx_v_trackerIndex;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackerInfo (wrapper)", 0);
  assert(__pyx_arg_trackerIndex); {
    __pyx_v_trackerIndex = __Pyx_PyInt_As_int(__pyx_arg_trackerIndex); if (unlikely((__pyx_v_trackerIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6674, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTrackerInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_144getTrackerInfo(__pyx_self, ((int)__pyx_v_trackerIndex));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_144getTrackerInfo(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_trackerIndex) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getTrackerInfo", 0);

  /* "psychxr/libovr/_libovr.pyx":6689
 * 
 *     """
 *     cdef LibOVRTrackerInfo to_return = LibOVRTrackerInfo()             # <<<<<<<<<<<<<<
 *     global _ptrSession
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":6693
 * 
 *     # set the tracker index
 *     to_return._trackerIndex = <unsigned int>trackerIndex             # <<<<<<<<<<<<<<
 * 
 *     # set the descriptor data
 */
  __pyx_v_to_return->_trackerIndex = ((unsigned int)__pyx_v_trackerIndex);

  /* "psychxr/libovr/_libovr.pyx":6696
 * 
 *     # set the descriptor data
 *     to_return.c_ovrTrackerDesc = capi.ovr_GetTrackerDesc(             # <<<<<<<<<<<<<<
 *         _ptrSession, <unsigned int>trackerIndex)
 *     # get the tracker pose
 */
  __pyx_v_to_return->c_ovrTrackerDesc = ovr_GetTrackerDesc(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((unsigned int)__pyx_v_trackerIndex));

  /* "psychxr/libovr/_libovr.pyx":6699
 *         _ptrSession, <unsigned int>trackerIndex)
 *     # get the tracker pose
 *     to_return.c_ovrTrackerPose = capi.ovr_GetTrackerPose(             # <<<<<<<<<<<<<<
 *         _ptrSession, <unsigned int>trackerIndex)
 * 
 */
  __pyx_v_to_return->c_ovrTrackerPose = ovr_GetTrackerPose(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((unsigned int)__pyx_v_trackerIndex));

  /* "psychxr/libovr/_libovr.pyx":6702
 *         _ptrSession, <unsigned int>trackerIndex)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6674
 * 
 * 
 * def getTrackerInfo(int trackerIndex):             # <<<<<<<<<<<<<<
 *     """Get information about a given tracker.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTrackerInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6705
 * 
 * 
 * def getSessionStatus():             # <<<<<<<<<<<<<<
 *     """Get the current session status.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_147getSessionStatus(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_146getSessionStatus[] = "getSessionStatus()\nGet the current session status.\n\n    Returns\n    -------\n    tuple (int, LibOVRSessionStatus)\n        Result of LibOVR API call ``OVR::ovr_GetSessionStatus`` and a\n        :py:class:`LibOVRSessionStatus`.\n\n    Examples\n    --------\n\n    Check if the display is visible to the user::\n\n        result, sessionStatus = getSessionStatus()\n        if sessionStatus.isVisible:\n            # begin frame rendering ...\n\n    Quit if the user requests to through the Oculus overlay::\n\n        result, sessionStatus = getSessionStatus()\n        if sessionStatus.shouldQuit:\n            # destroy any swap chains ...\n            destroy()\n            shutdown()\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_147getSessionStatus = {"getSessionStatus", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_147getSessionStatus, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_146getSessionStatus};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_147getSessionStatus(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSessionStatus (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_146getSessionStatus(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_146getSessionStatus(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrResult __pyx_v_result;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getSessionStatus", 0);

  /* "psychxr/libovr/_libovr.pyx":6735
 *     global _sessionStatus
 * 
 *     cdef capi.ovrResult result = capi.ovr_GetSessionStatus(_ptrSession,             # <<<<<<<<<<<<<<
 *                                                            &_sessionStatus)
 * 
 */
  __pyx_v_result = ovr_GetSessionStatus(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (&__pyx_v_7psychxr_6libovr_7_libovr__sessionStatus));

  /* "psychxr/libovr/_libovr.pyx":6738
 *                                                            &_sessionStatus)
 * 
 *     cdef LibOVRSessionStatus to_return = LibOVRSessionStatus()             # <<<<<<<<<<<<<<
 *     to_return.c_data = _sessionStatus
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRSessionStatus)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":6739
 * 
 *     cdef LibOVRSessionStatus to_return = LibOVRSessionStatus()
 *     to_return.c_data = _sessionStatus             # <<<<<<<<<<<<<<
 * 
 *     return result, to_return
 */
  __pyx_v_to_return->c_data = __pyx_v_7psychxr_6libovr_7_libovr__sessionStatus;

  /* "psychxr/libovr/_libovr.pyx":6741
 *     to_return.c_data = _sessionStatus
 * 
 *     return result, to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_to_return));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_to_return));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6705
 * 
 * 
 * def getSessionStatus():             # <<<<<<<<<<<<<<
 *     """Get the current session status.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getSessionStatus", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6744
 * 
 * 
 * def getPerfStats():             # <<<<<<<<<<<<<<
 *     """Get detailed compositor frame statistics.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_149getPerfStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_148getPerfStats[] = "getPerfStats()\nGet detailed compositor frame statistics.\n\n    Returns\n    -------\n    LibOVRPerfStats\n        Frame statistics.\n\n    Examples\n    --------\n    Get the time spent by the application between :func:`endFrame` calls::\n\n        result = updatePerfStats()\n\n        if getFrameStatsCount() > 0:\n            frameStats = getFrameStats(0)  # only the most recent\n            appTime = frameStats.appCpuElapsedTime\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_149getPerfStats = {"getPerfStats", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_149getPerfStats, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_148getPerfStats};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_149getPerfStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPerfStats (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_148getPerfStats(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_148getPerfStats(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *__pyx_v_to_return = 0;
  CYTHON_UNUSED ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getPerfStats", 0);

  /* "psychxr/libovr/_libovr.pyx":6764
 *     """
 *     global _ptrSession
 *     cdef LibOVRPerfStats to_return = LibOVRPerfStats()             # <<<<<<<<<<<<<<
 *     cdef capi.ovrResult result = capi.ovr_GetPerfStats(
 *         _ptrSession, to_return.c_data)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPerfStats)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":6765
 *     global _ptrSession
 *     cdef LibOVRPerfStats to_return = LibOVRPerfStats()
 *     cdef capi.ovrResult result = capi.ovr_GetPerfStats(             # <<<<<<<<<<<<<<
 *         _ptrSession, to_return.c_data)
 * 
 */
  __pyx_v_result = ovr_GetPerfStats(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_to_return->c_data);

  /* "psychxr/libovr/_libovr.pyx":6768
 *         _ptrSession, to_return.c_data)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6744
 * 
 * 
 * def getPerfStats():             # <<<<<<<<<<<<<<
 *     """Get detailed compositor frame statistics.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getPerfStats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6771
 * 
 * 
 * def resetPerfStats():             # <<<<<<<<<<<<<<
 *     """Reset frame performance statistics.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_151resetPerfStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_150resetPerfStats[] = "resetPerfStats()\nReset frame performance statistics.\n\n    Calling this will reset frame statistics, which may be needed if the\n    application loses focus (eg. when the system UI is opened) and performance\n    stats no longer apply to the application.\n\n    Returns\n    -------\n    int\n        Error code returned by ``OVR::ovr_ResetPerfStats``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_151resetPerfStats = {"resetPerfStats", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_151resetPerfStats, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_150resetPerfStats};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_151resetPerfStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resetPerfStats (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_150resetPerfStats(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_150resetPerfStats(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("resetPerfStats", 0);

  /* "psychxr/libovr/_libovr.pyx":6785
 *     """
 *     global _ptrSession
 *     cdef capi.ovrResult result = capi.ovr_ResetPerfStats(_ptrSession)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_v_result = ovr_ResetPerfStats(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":6787
 *     cdef capi.ovrResult result = capi.ovr_ResetPerfStats(_ptrSession)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6771
 * 
 * 
 * def resetPerfStats():             # <<<<<<<<<<<<<<
 *     """Reset frame performance statistics.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.resetPerfStats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6790
 * 
 * 
 * def getLastErrorInfo():             # <<<<<<<<<<<<<<
 *     """Get the last error code and information string reported by the API.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_153getLastErrorInfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_152getLastErrorInfo[] = "getLastErrorInfo()\nGet the last error code and information string reported by the API.\n\n    This function can be used when implementing custom error handlers for\n    dealing with exceptions raised by LibOVR. You must call\n    :func:`getLastErrorInfo` every time after any function which makes an LibOVR\n    API call if you wish to catch all errors, since only the most recent is\n    returned.\n\n    Returns\n    -------\n    tuple (int, str)\n        Tuple of the API call result and error string. If there was no API\n        error, the function will return tuple (0, '<unknown>').\n\n    Examples\n    --------\n\n    Raise a Python exception if LibOVR reports an error::\n\n        result = create()\n        if failure(result):\n            errorVal, errorMsg = getLastErrorInfo()\n            raise RuntimeError(errorMsg)  # Python generic runtime error!\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_153getLastErrorInfo = {"getLastErrorInfo", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_153getLastErrorInfo, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_152getLastErrorInfo};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_153getLastErrorInfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLastErrorInfo (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_152getLastErrorInfo(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_152getLastErrorInfo(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrErrorInfo __pyx_v_lastErrorInfo;
  ovrResult __pyx_v_result;
  PyObject *__pyx_v_errorString = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrResult __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getLastErrorInfo", 0);

  /* "psychxr/libovr/_libovr.pyx":6817
 *     """
 *     cdef capi.ovrErrorInfo lastErrorInfo  # store our last error here
 *     capi.ovr_GetLastErrorInfo(&lastErrorInfo)             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrResult result = lastErrorInfo.Result
 */
  ovr_GetLastErrorInfo((&__pyx_v_lastErrorInfo));

  /* "psychxr/libovr/_libovr.pyx":6819
 *     capi.ovr_GetLastErrorInfo(&lastErrorInfo)
 * 
 *     cdef capi.ovrResult result = lastErrorInfo.Result             # <<<<<<<<<<<<<<
 *     cdef str errorString = lastErrorInfo.ErrorString.decode("utf-8")
 * 
 */
  __pyx_t_1 = __pyx_v_lastErrorInfo.Result;
  __pyx_v_result = __pyx_t_1;

  /* "psychxr/libovr/_libovr.pyx":6820
 * 
 *     cdef capi.ovrResult result = lastErrorInfo.Result
 *     cdef str errorString = lastErrorInfo.ErrorString.decode("utf-8")             # <<<<<<<<<<<<<<
 * 
 *     return <int>result, errorString
 */
  __pyx_t_2 = __pyx_v_lastErrorInfo.ErrorString;
  __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 6820, __pyx_L1_error)
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_errorString = ((PyObject*)__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":6822
 *     cdef str errorString = lastErrorInfo.ErrorString.decode("utf-8")
 * 
 *     return <int>result, errorString             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_result)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_errorString);
  __Pyx_GIVEREF(__pyx_v_errorString);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_errorString);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6790
 * 
 * 
 * def getLastErrorInfo():             # <<<<<<<<<<<<<<
 *     """Get the last error code and information string reported by the API.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getLastErrorInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_errorString);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6825
 * 
 * 
 * def setBoundaryColor(float red, float green, float blue):             # <<<<<<<<<<<<<<
 *     """Set the boundary color.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_155setBoundaryColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_154setBoundaryColor[] = "setBoundaryColor(float red, float green, float blue)\nSet the boundary color.\n\n    The boundary is drawn by the compositor which overlays the extents of\n    the physical space where the user can safely move.\n\n    Parameters\n    ----------\n    red : float\n        Red component of the color from 0.0 to 1.0.\n    green : float\n        Green component of the color from 0.0 to 1.0.\n    blue : float\n        Blue component of the color from 0.0 to 1.0.\n\n    Returns\n    -------\n    int\n        Result of the LibOVR API call ``OVR::ovr_SetBoundaryLookAndFeel``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_155setBoundaryColor = {"setBoundaryColor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_155setBoundaryColor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_154setBoundaryColor};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_155setBoundaryColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_red;
  float __pyx_v_green;
  float __pyx_v_blue;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBoundaryColor (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_red,&__pyx_n_s_green,&__pyx_n_s_blue,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_red)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_green)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setBoundaryColor", 1, 3, 3, 1); __PYX_ERR(0, 6825, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blue)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setBoundaryColor", 1, 3, 3, 2); __PYX_ERR(0, 6825, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBoundaryColor") < 0)) __PYX_ERR(0, 6825, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_red = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_red == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 6825, __pyx_L3_error)
    __pyx_v_green = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_green == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 6825, __pyx_L3_error)
    __pyx_v_blue = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_blue == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 6825, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBoundaryColor", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6825, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setBoundaryColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_154setBoundaryColor(__pyx_self, __pyx_v_red, __pyx_v_green, __pyx_v_blue);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_154setBoundaryColor(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_red, float __pyx_v_green, float __pyx_v_blue) {
  ovrColorf __pyx_v_color;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setBoundaryColor", 0);

  /* "psychxr/libovr/_libovr.pyx":6850
 * 
 *     cdef capi.ovrColorf color
 *     color.r = <float>red             # <<<<<<<<<<<<<<
 *     color.g = <float>green
 *     color.b = <float>blue
 */
  __pyx_v_color.r = ((float)__pyx_v_red);

  /* "psychxr/libovr/_libovr.pyx":6851
 *     cdef capi.ovrColorf color
 *     color.r = <float>red
 *     color.g = <float>green             # <<<<<<<<<<<<<<
 *     color.b = <float>blue
 * 
 */
  __pyx_v_color.g = ((float)__pyx_v_green);

  /* "psychxr/libovr/_libovr.pyx":6852
 *     color.r = <float>red
 *     color.g = <float>green
 *     color.b = <float>blue             # <<<<<<<<<<<<<<
 * 
 *     _boundaryStyle.Color = color
 */
  __pyx_v_color.b = ((float)__pyx_v_blue);

  /* "psychxr/libovr/_libovr.pyx":6854
 *     color.b = <float>blue
 * 
 *     _boundaryStyle.Color = color             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrResult result = capi.ovr_SetBoundaryLookAndFeel(
 */
  __pyx_v_7psychxr_6libovr_7_libovr__boundaryStyle.Color = __pyx_v_color;

  /* "psychxr/libovr/_libovr.pyx":6856
 *     _boundaryStyle.Color = color
 * 
 *     cdef capi.ovrResult result = capi.ovr_SetBoundaryLookAndFeel(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         &_boundaryStyle)
 */
  __pyx_v_result = ovr_SetBoundaryLookAndFeel(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (&__pyx_v_7psychxr_6libovr_7_libovr__boundaryStyle));

  /* "psychxr/libovr/_libovr.pyx":6860
 *         &_boundaryStyle)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6825
 * 
 * 
 * def setBoundaryColor(float red, float green, float blue):             # <<<<<<<<<<<<<<
 *     """Set the boundary color.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setBoundaryColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6863
 * 
 * 
 * def resetBoundaryColor():             # <<<<<<<<<<<<<<
 *     """Reset the boundary color to system default.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_157resetBoundaryColor(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_156resetBoundaryColor[] = "resetBoundaryColor()\nReset the boundary color to system default.\n\n    Returns\n    -------\n    int\n        Result of the LibOVR API call ``OVR::ovr_ResetBoundaryLookAndFeel``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_157resetBoundaryColor = {"resetBoundaryColor", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_157resetBoundaryColor, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_156resetBoundaryColor};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_157resetBoundaryColor(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resetBoundaryColor (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_156resetBoundaryColor(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_156resetBoundaryColor(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("resetBoundaryColor", 0);

  /* "psychxr/libovr/_libovr.pyx":6873
 *     """
 *     global _ptrSession
 *     cdef capi.ovrResult result = capi.ovr_ResetBoundaryLookAndFeel(             # <<<<<<<<<<<<<<
 *         _ptrSession)
 * 
 */
  __pyx_v_result = ovr_ResetBoundaryLookAndFeel(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":6876
 *         _ptrSession)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6863
 * 
 * 
 * def resetBoundaryColor():             # <<<<<<<<<<<<<<
 *     """Reset the boundary color to system default.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.resetBoundaryColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6879
 * 
 * 
 * def getBoundaryVisible():             # <<<<<<<<<<<<<<
 *     """Check if the Guardian boundary is visible.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_159getBoundaryVisible(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_158getBoundaryVisible[] = "getBoundaryVisible()\nCheck if the Guardian boundary is visible.\n\n    The boundary is drawn by the compositor which overlays the extents of\n    the physical space where the user can safely move.\n\n    Returns\n    -------\n    tuple (int, bool)\n        Result of the LibOVR API call ``OVR::ovr_GetBoundaryVisible`` and the \n        boundary state.\n\n    Notes\n    -----\n    * Since the boundary has a fade-in effect, the boundary might be reported as\n      visible but difficult to actually see.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_159getBoundaryVisible = {"getBoundaryVisible", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_159getBoundaryVisible, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_158getBoundaryVisible};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_159getBoundaryVisible(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBoundaryVisible (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_158getBoundaryVisible(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_158getBoundaryVisible(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrBool __pyx_v_isVisible;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getBoundaryVisible", 0);

  /* "psychxr/libovr/_libovr.pyx":6899
 *     global _ptrSession
 *     cdef capi.ovrBool isVisible
 *     cdef capi.ovrResult result = capi.ovr_GetBoundaryVisible(             # <<<<<<<<<<<<<<
 *         _ptrSession, &isVisible)
 * 
 */
  __pyx_v_result = ovr_GetBoundaryVisible(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, (&__pyx_v_isVisible));

  /* "psychxr/libovr/_libovr.pyx":6902
 *         _ptrSession, &isVisible)
 * 
 *     return result, isVisible             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_ovrBool(__pyx_v_isVisible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6879
 * 
 * 
 * def getBoundaryVisible():             # <<<<<<<<<<<<<<
 *     """Check if the Guardian boundary is visible.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getBoundaryVisible", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6905
 * 
 * 
 * def showBoundary():             # <<<<<<<<<<<<<<
 *     """Show the boundary.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_161showBoundary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_160showBoundary[] = "showBoundary()\nShow the boundary.\n\n    The boundary is drawn by the compositor which overlays the extents of\n    the physical space where the user can safely move.\n\n    Returns\n    -------\n    int\n        Result of LibOVR API call ``OVR::ovr_RequestBoundaryVisible``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_161showBoundary = {"showBoundary", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_161showBoundary, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_160showBoundary};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_161showBoundary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("showBoundary (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_160showBoundary(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_160showBoundary(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("showBoundary", 0);

  /* "psychxr/libovr/_libovr.pyx":6918
 *     """
 *     global _ptrSession
 *     cdef capi.ovrResult result = capi.ovr_RequestBoundaryVisible(             # <<<<<<<<<<<<<<
 *         _ptrSession, capi.ovrTrue)
 * 
 */
  __pyx_v_result = ovr_RequestBoundaryVisible(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ovrTrue);

  /* "psychxr/libovr/_libovr.pyx":6921
 *         _ptrSession, capi.ovrTrue)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6905
 * 
 * 
 * def showBoundary():             # <<<<<<<<<<<<<<
 *     """Show the boundary.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.showBoundary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6924
 * 
 * 
 * def hideBoundary():             # <<<<<<<<<<<<<<
 *     """Hide the boundry.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_163hideBoundary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_162hideBoundary[] = "hideBoundary()\nHide the boundry.\n\n    Returns\n    -------\n    int\n        Result of LibOVR API call ``OVR::ovr_RequestBoundaryVisible``.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_163hideBoundary = {"hideBoundary", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_163hideBoundary, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_162hideBoundary};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_163hideBoundary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hideBoundary (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_162hideBoundary(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_162hideBoundary(CYTHON_UNUSED PyObject *__pyx_self) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("hideBoundary", 0);

  /* "psychxr/libovr/_libovr.pyx":6934
 *     """
 *     global _ptrSession
 *     cdef capi.ovrResult result = capi.ovr_RequestBoundaryVisible(             # <<<<<<<<<<<<<<
 *         _ptrSession, capi.ovrFalse)
 * 
 */
  __pyx_v_result = ovr_RequestBoundaryVisible(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ovrFalse);

  /* "psychxr/libovr/_libovr.pyx":6937
 *         _ptrSession, capi.ovrFalse)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6924
 * 
 * 
 * def hideBoundary():             # <<<<<<<<<<<<<<
 *     """Hide the boundry.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.hideBoundary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6940
 * 
 * 
 * def getBoundaryDimensions(int boundaryType):             # <<<<<<<<<<<<<<
 *     """Get the dimensions of the boundary.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_165getBoundaryDimensions(PyObject *__pyx_self, PyObject *__pyx_arg_boundaryType); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_164getBoundaryDimensions[] = "getBoundaryDimensions(int boundaryType)\nGet the dimensions of the boundary.\n\n    Parameters\n    ----------\n    boundaryType : int\n        Boundary type, can be ``BOUNDARY_OUTER`` or ``BOUNDARY_PLAY_AREA``.\n\n    Returns\n    -------\n    tuple (int, ndarray)\n        Result of the LibOVR APi call ``OVR::ovr_GetBoundaryDimensions`` and the\n        dimensions of the boundary in meters [x, y, z].\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_165getBoundaryDimensions = {"getBoundaryDimensions", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_165getBoundaryDimensions, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_164getBoundaryDimensions};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_165getBoundaryDimensions(PyObject *__pyx_self, PyObject *__pyx_arg_boundaryType) {
  int __pyx_v_boundaryType;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBoundaryDimensions (wrapper)", 0);
  assert(__pyx_arg_boundaryType); {
    __pyx_v_boundaryType = __Pyx_PyInt_As_int(__pyx_arg_boundaryType); if (unlikely((__pyx_v_boundaryType == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6940, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getBoundaryDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_164getBoundaryDimensions(__pyx_self, ((int)__pyx_v_boundaryType));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_164getBoundaryDimensions(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_boundaryType) {
  ovrBoundaryType __pyx_v_btype;
  ovrVector3f __pyx_v_vec_out;
  ovrResult __pyx_v_result;
  PyArrayObject *__pyx_v_to_return = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_to_return;
  __Pyx_Buffer __pyx_pybuffer_to_return;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getBoundaryDimensions", 0);
  __pyx_pybuffer_to_return.pybuffer.buf = NULL;
  __pyx_pybuffer_to_return.refcount = 0;
  __pyx_pybuffernd_to_return.data = NULL;
  __pyx_pybuffernd_to_return.rcbuffer = &__pyx_pybuffer_to_return;

  /* "psychxr/libovr/_libovr.pyx":6956
 *     """
 *     global _ptrSession
 *     cdef capi.ovrBoundaryType btype = <capi.ovrBoundaryType>boundaryType             # <<<<<<<<<<<<<<
 *     if not (boundaryType == capi.ovrBoundary_PlayArea or
 *             boundaryType == capi.ovrBoundary_Outer):
 */
  __pyx_v_btype = ((ovrBoundaryType)__pyx_v_boundaryType);

  /* "psychxr/libovr/_libovr.pyx":6957
 *     global _ptrSession
 *     cdef capi.ovrBoundaryType btype = <capi.ovrBoundaryType>boundaryType
 *     if not (boundaryType == capi.ovrBoundary_PlayArea or             # <<<<<<<<<<<<<<
 *             boundaryType == capi.ovrBoundary_Outer):
 *         raise ValueError("Invalid boundary type specified.")
 */
  switch (__pyx_v_boundaryType) {
    case ovrBoundary_PlayArea:
    case ovrBoundary_Outer:

    /* "psychxr/libovr/_libovr.pyx":6958
 *     cdef capi.ovrBoundaryType btype = <capi.ovrBoundaryType>boundaryType
 *     if not (boundaryType == capi.ovrBoundary_PlayArea or
 *             boundaryType == capi.ovrBoundary_Outer):             # <<<<<<<<<<<<<<
 *         raise ValueError("Invalid boundary type specified.")
 * 
 */
    __pyx_t_1 = 1;

    /* "psychxr/libovr/_libovr.pyx":6957
 *     global _ptrSession
 *     cdef capi.ovrBoundaryType btype = <capi.ovrBoundaryType>boundaryType
 *     if not (boundaryType == capi.ovrBoundary_PlayArea or             # <<<<<<<<<<<<<<
 *             boundaryType == capi.ovrBoundary_Outer):
 *         raise ValueError("Invalid boundary type specified.")
 */
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "psychxr/libovr/_libovr.pyx":6959
 *     if not (boundaryType == capi.ovrBoundary_PlayArea or
 *             boundaryType == capi.ovrBoundary_Outer):
 *         raise ValueError("Invalid boundary type specified.")             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrVector3f vec_out
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 6959, __pyx_L1_error)

    /* "psychxr/libovr/_libovr.pyx":6957
 *     global _ptrSession
 *     cdef capi.ovrBoundaryType btype = <capi.ovrBoundaryType>boundaryType
 *     if not (boundaryType == capi.ovrBoundary_PlayArea or             # <<<<<<<<<<<<<<
 *             boundaryType == capi.ovrBoundary_Outer):
 *         raise ValueError("Invalid boundary type specified.")
 */
  }

  /* "psychxr/libovr/_libovr.pyx":6962
 * 
 *     cdef capi.ovrVector3f vec_out
 *     cdef capi.ovrResult result = capi.ovr_GetBoundaryDimensions(             # <<<<<<<<<<<<<<
 *             _ptrSession, btype, &vec_out)
 * 
 */
  __pyx_v_result = ovr_GetBoundaryDimensions(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, __pyx_v_btype, (&__pyx_v_vec_out));

  /* "psychxr/libovr/_libovr.pyx":6965
 *             _ptrSession, btype, &vec_out)
 * 
 *     cdef np.ndarray[np.float32_t, ndim=1] to_return = np.asarray(             # <<<<<<<<<<<<<<
 *         (vec_out.x, vec_out.y, vec_out.z), dtype=np.float32)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":6966
 * 
 *     cdef np.ndarray[np.float32_t, ndim=1] to_return = np.asarray(
 *         (vec_out.x, vec_out.y, vec_out.z), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *     return result, to_return
 */
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vec_out.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vec_out.y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_vec_out.z); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":6965
 *             _ptrSession, btype, &vec_out)
 * 
 *     cdef np.ndarray[np.float32_t, ndim=1] to_return = np.asarray(             # <<<<<<<<<<<<<<
 *         (vec_out.x, vec_out.y, vec_out.z), dtype=np.float32)
 * 
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6966
 * 
 *     cdef np.ndarray[np.float32_t, ndim=1] to_return = np.asarray(
 *         (vec_out.x, vec_out.y, vec_out.z), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *     return result, to_return
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 6966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":6965
 *             _ptrSession, btype, &vec_out)
 * 
 *     cdef np.ndarray[np.float32_t, ndim=1] to_return = np.asarray(             # <<<<<<<<<<<<<<
 *         (vec_out.x, vec_out.y, vec_out.z), dtype=np.float32)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 6965, __pyx_L1_error)
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_to_return = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_to_return.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 6965, __pyx_L1_error)
    } else {__pyx_pybuffernd_to_return.diminfo[0].strides = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_to_return.diminfo[0].shape = __pyx_pybuffernd_to_return.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_to_return = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":6968
 *         (vec_out.x, vec_out.y, vec_out.z), dtype=np.float32)
 * 
 *     return result, to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_to_return));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_to_return));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6940
 * 
 * 
 * def getBoundaryDimensions(int boundaryType):             # <<<<<<<<<<<<<<
 *     """Get the dimensions of the boundary.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("psychxr.libovr._libovr.getBoundaryDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_to_return.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":6971
 * 
 * 
 * def testBoundary(int deviceBitmask, int boundaryType):             # <<<<<<<<<<<<<<
 *     """Test collision of tracked devices on boundary.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_167testBoundary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_166testBoundary[] = "testBoundary(int deviceBitmask, int boundaryType)\nTest collision of tracked devices on boundary.\n\n    Parameters\n    ----------\n    deviceBitmask : int\n        Devices to test. Multiple devices identifiers can be combined\n        together. Valid device IDs are:\n\n        * ``TRACKED_DEVICE_TYPE_HMD``: The head or HMD.\n        * ``TRACKED_DEVICE_TYPE_LTOUCH``: Left touch controller or hand.\n        * ``TRACKED_DEVICE_TYPE_RTOUCH``: Right touch controller or hand.\n        * ``TRACKED_DEVICE_TYPE_TOUCH``: Both touch controllers.\n        * ``TRACKED_DEVICE_TYPE_OBJECT0``\n        * ``TRACKED_DEVICE_TYPE_OBJECT1``\n        * ``TRACKED_DEVICE_TYPE_OBJECT2``\n        * ``TRACKED_DEVICE_TYPE_OBJECT3``\n\n    boundaryType : int\n        Boundary type, can be ``BOUNDARY_OUTER`` or ``BOUNDARY_PLAY_AREA``.\n\n    Returns\n    -------\n    tuple (int, LibOVRBoundaryTestResult)\n        Result of the ``OVR::ovr_TestBoundary`` LibOVR API call and\n        collision test results.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_167testBoundary = {"testBoundary", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_167testBoundary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_166testBoundary};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_167testBoundary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_deviceBitmask;
  int __pyx_v_boundaryType;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("testBoundary (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_deviceBitmask,&__pyx_n_s_boundaryType,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deviceBitmask)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryType)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("testBoundary", 1, 2, 2, 1); __PYX_ERR(0, 6971, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "testBoundary") < 0)) __PYX_ERR(0, 6971, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_deviceBitmask = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_deviceBitmask == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6971, __pyx_L3_error)
    __pyx_v_boundaryType = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_boundaryType == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6971, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("testBoundary", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6971, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.testBoundary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_166testBoundary(__pyx_self, __pyx_v_deviceBitmask, __pyx_v_boundaryType);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_166testBoundary(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_deviceBitmask, int __pyx_v_boundaryType) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *__pyx_v_testResult = 0;
  CYTHON_UNUSED ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("testBoundary", 0);

  /* "psychxr/libovr/_libovr.pyx":7001
 *     global _ptrSession
 * 
 *     cdef LibOVRBoundaryTestResult testResult = LibOVRBoundaryTestResult()             # <<<<<<<<<<<<<<
 *     cdef capi.ovrResult result = capi.ovr_TestBoundary(
 *         _ptrSession, <capi.ovrTrackedDeviceType>deviceBitmask,
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_testResult = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":7002
 * 
 *     cdef LibOVRBoundaryTestResult testResult = LibOVRBoundaryTestResult()
 *     cdef capi.ovrResult result = capi.ovr_TestBoundary(             # <<<<<<<<<<<<<<
 *         _ptrSession, <capi.ovrTrackedDeviceType>deviceBitmask,
 *         <capi.ovrBoundaryType>boundaryType,
 */
  __pyx_v_result = ovr_TestBoundary(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrTrackedDeviceType)__pyx_v_deviceBitmask), ((ovrBoundaryType)__pyx_v_boundaryType), (&__pyx_v_testResult->c_data));

  /* "psychxr/libovr/_libovr.pyx":7007
 *         &testResult.c_data)
 * 
 *     return testResult             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_testResult));
  __pyx_r = ((PyObject *)__pyx_v_testResult);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":6971
 * 
 * 
 * def testBoundary(int deviceBitmask, int boundaryType):             # <<<<<<<<<<<<<<
 *     """Test collision of tracked devices on boundary.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.testBoundary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_testResult);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7010
 * 
 * 
 * def getConnectedControllerTypes():             # <<<<<<<<<<<<<<
 *     """Get connected controller types.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_169getConnectedControllerTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_168getConnectedControllerTypes[] = "getConnectedControllerTypes()\nGet connected controller types.\n\n    Returns\n    -------\n    list of int\n        IDs of connected controller types. Possible values returned are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    See Also\n    --------\n    updateInputState : Poll a controller's current state.\n\n    Examples\n    --------\n\n    Check if the left touch controller is paired::\n\n        controllers = getConnectedControllerTypes()\n        hasLeftTouch = CONTROLLER_TYPE_LTOUCH in controllers\n\n    Update all connected controller states::\n\n        for controller in getConnectedControllerTypes():\n            result, time = updateInputState(controller)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_169getConnectedControllerTypes = {"getConnectedControllerTypes", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_169getConnectedControllerTypes, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_168getConnectedControllerTypes};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_169getConnectedControllerTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConnectedControllerTypes (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_168getConnectedControllerTypes(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_168getConnectedControllerTypes(CYTHON_UNUSED PyObject *__pyx_self) {
  unsigned int __pyx_v_result;
  PyObject *__pyx_v_toReturn = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("getConnectedControllerTypes", 0);

  /* "psychxr/libovr/_libovr.pyx":7047
 *     """
 *     global _ptrSession
 *     cdef unsigned int result = capi.ovr_GetConnectedControllerTypes(             # <<<<<<<<<<<<<<
 *         _ptrSession)
 * 
 */
  __pyx_v_result = ovr_GetConnectedControllerTypes(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession);

  /* "psychxr/libovr/_libovr.pyx":7050
 *         _ptrSession)
 * 
 *     cdef list toReturn = list()             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_XBox & result) == capi.ovrControllerType_XBox:
 *         toReturn.append(CONTROLLER_TYPE_XBOX)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_toReturn = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":7051
 * 
 *     cdef list toReturn = list()
 *     if (capi.ovrControllerType_XBox & result) == capi.ovrControllerType_XBox:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_XBOX)
 *     if (capi.ovrControllerType_Remote & result) == capi.ovrControllerType_Remote:
 */
  __pyx_t_2 = (((ovrControllerType_XBox & __pyx_v_result) == ovrControllerType_XBox) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7052
 *     cdef list toReturn = list()
 *     if (capi.ovrControllerType_XBox & result) == capi.ovrControllerType_XBox:
 *         toReturn.append(CONTROLLER_TYPE_XBOX)             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_Remote & result) == capi.ovrControllerType_Remote:
 *         toReturn.append(CONTROLLER_TYPE_REMOTE)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_XBOX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7052, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7051
 * 
 *     cdef list toReturn = list()
 *     if (capi.ovrControllerType_XBox & result) == capi.ovrControllerType_XBox:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_XBOX)
 *     if (capi.ovrControllerType_Remote & result) == capi.ovrControllerType_Remote:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7053
 *     if (capi.ovrControllerType_XBox & result) == capi.ovrControllerType_XBox:
 *         toReturn.append(CONTROLLER_TYPE_XBOX)
 *     if (capi.ovrControllerType_Remote & result) == capi.ovrControllerType_Remote:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_REMOTE)
 *     if (capi.ovrControllerType_Touch & result) == capi.ovrControllerType_Touch:
 */
  __pyx_t_2 = (((ovrControllerType_Remote & __pyx_v_result) == ovrControllerType_Remote) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7054
 *         toReturn.append(CONTROLLER_TYPE_XBOX)
 *     if (capi.ovrControllerType_Remote & result) == capi.ovrControllerType_Remote:
 *         toReturn.append(CONTROLLER_TYPE_REMOTE)             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_Touch & result) == capi.ovrControllerType_Touch:
 *         toReturn.append(CONTROLLER_TYPE_TOUCH)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_REMOTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7054, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7053
 *     if (capi.ovrControllerType_XBox & result) == capi.ovrControllerType_XBox:
 *         toReturn.append(CONTROLLER_TYPE_XBOX)
 *     if (capi.ovrControllerType_Remote & result) == capi.ovrControllerType_Remote:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_REMOTE)
 *     if (capi.ovrControllerType_Touch & result) == capi.ovrControllerType_Touch:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7055
 *     if (capi.ovrControllerType_Remote & result) == capi.ovrControllerType_Remote:
 *         toReturn.append(CONTROLLER_TYPE_REMOTE)
 *     if (capi.ovrControllerType_Touch & result) == capi.ovrControllerType_Touch:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_TOUCH)
 *     if (capi.ovrControllerType_LTouch & result) == capi.ovrControllerType_LTouch:
 */
  __pyx_t_2 = (((ovrControllerType_Touch & __pyx_v_result) == ovrControllerType_Touch) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7056
 *         toReturn.append(CONTROLLER_TYPE_REMOTE)
 *     if (capi.ovrControllerType_Touch & result) == capi.ovrControllerType_Touch:
 *         toReturn.append(CONTROLLER_TYPE_TOUCH)             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_LTouch & result) == capi.ovrControllerType_LTouch:
 *         toReturn.append(CONTROLLER_TYPE_LTOUCH)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_TOUCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7055
 *     if (capi.ovrControllerType_Remote & result) == capi.ovrControllerType_Remote:
 *         toReturn.append(CONTROLLER_TYPE_REMOTE)
 *     if (capi.ovrControllerType_Touch & result) == capi.ovrControllerType_Touch:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_TOUCH)
 *     if (capi.ovrControllerType_LTouch & result) == capi.ovrControllerType_LTouch:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7057
 *     if (capi.ovrControllerType_Touch & result) == capi.ovrControllerType_Touch:
 *         toReturn.append(CONTROLLER_TYPE_TOUCH)
 *     if (capi.ovrControllerType_LTouch & result) == capi.ovrControllerType_LTouch:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_LTOUCH)
 *     if (capi.ovrControllerType_RTouch & result) == capi.ovrControllerType_RTouch:
 */
  __pyx_t_2 = (((ovrControllerType_LTouch & __pyx_v_result) == ovrControllerType_LTouch) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7058
 *         toReturn.append(CONTROLLER_TYPE_TOUCH)
 *     if (capi.ovrControllerType_LTouch & result) == capi.ovrControllerType_LTouch:
 *         toReturn.append(CONTROLLER_TYPE_LTOUCH)             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_RTouch & result) == capi.ovrControllerType_RTouch:
 *         toReturn.append(CONTROLLER_TYPE_RTOUCH)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_LTOUCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7058, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7057
 *     if (capi.ovrControllerType_Touch & result) == capi.ovrControllerType_Touch:
 *         toReturn.append(CONTROLLER_TYPE_TOUCH)
 *     if (capi.ovrControllerType_LTouch & result) == capi.ovrControllerType_LTouch:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_LTOUCH)
 *     if (capi.ovrControllerType_RTouch & result) == capi.ovrControllerType_RTouch:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7059
 *     if (capi.ovrControllerType_LTouch & result) == capi.ovrControllerType_LTouch:
 *         toReturn.append(CONTROLLER_TYPE_LTOUCH)
 *     if (capi.ovrControllerType_RTouch & result) == capi.ovrControllerType_RTouch:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_RTOUCH)
 *     if (capi.ovrControllerType_Object0 & result) == capi.ovrControllerType_Object0:
 */
  __pyx_t_2 = (((ovrControllerType_RTouch & __pyx_v_result) == ovrControllerType_RTouch) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7060
 *         toReturn.append(CONTROLLER_TYPE_LTOUCH)
 *     if (capi.ovrControllerType_RTouch & result) == capi.ovrControllerType_RTouch:
 *         toReturn.append(CONTROLLER_TYPE_RTOUCH)             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_Object0 & result) == capi.ovrControllerType_Object0:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT0)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_RTOUCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7060, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7059
 *     if (capi.ovrControllerType_LTouch & result) == capi.ovrControllerType_LTouch:
 *         toReturn.append(CONTROLLER_TYPE_LTOUCH)
 *     if (capi.ovrControllerType_RTouch & result) == capi.ovrControllerType_RTouch:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_RTOUCH)
 *     if (capi.ovrControllerType_Object0 & result) == capi.ovrControllerType_Object0:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7061
 *     if (capi.ovrControllerType_RTouch & result) == capi.ovrControllerType_RTouch:
 *         toReturn.append(CONTROLLER_TYPE_RTOUCH)
 *     if (capi.ovrControllerType_Object0 & result) == capi.ovrControllerType_Object0:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_OBJECT0)
 *     if (capi.ovrControllerType_Object1 & result) == capi.ovrControllerType_Object1:
 */
  __pyx_t_2 = (((ovrControllerType_Object0 & __pyx_v_result) == ovrControllerType_Object0) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7062
 *         toReturn.append(CONTROLLER_TYPE_RTOUCH)
 *     if (capi.ovrControllerType_Object0 & result) == capi.ovrControllerType_Object0:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT0)             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_Object1 & result) == capi.ovrControllerType_Object1:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT1)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_OBJECT0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7062, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7061
 *     if (capi.ovrControllerType_RTouch & result) == capi.ovrControllerType_RTouch:
 *         toReturn.append(CONTROLLER_TYPE_RTOUCH)
 *     if (capi.ovrControllerType_Object0 & result) == capi.ovrControllerType_Object0:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_OBJECT0)
 *     if (capi.ovrControllerType_Object1 & result) == capi.ovrControllerType_Object1:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7063
 *     if (capi.ovrControllerType_Object0 & result) == capi.ovrControllerType_Object0:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT0)
 *     if (capi.ovrControllerType_Object1 & result) == capi.ovrControllerType_Object1:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_OBJECT1)
 *     if (capi.ovrControllerType_Object2 & result) == capi.ovrControllerType_Object2:
 */
  __pyx_t_2 = (((ovrControllerType_Object1 & __pyx_v_result) == ovrControllerType_Object1) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7064
 *         toReturn.append(CONTROLLER_TYPE_OBJECT0)
 *     if (capi.ovrControllerType_Object1 & result) == capi.ovrControllerType_Object1:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT1)             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_Object2 & result) == capi.ovrControllerType_Object2:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT2)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_OBJECT1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7064, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7063
 *     if (capi.ovrControllerType_Object0 & result) == capi.ovrControllerType_Object0:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT0)
 *     if (capi.ovrControllerType_Object1 & result) == capi.ovrControllerType_Object1:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_OBJECT1)
 *     if (capi.ovrControllerType_Object2 & result) == capi.ovrControllerType_Object2:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7065
 *     if (capi.ovrControllerType_Object1 & result) == capi.ovrControllerType_Object1:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT1)
 *     if (capi.ovrControllerType_Object2 & result) == capi.ovrControllerType_Object2:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_OBJECT2)
 *     if (capi.ovrControllerType_Object3 & result) == capi.ovrControllerType_Object3:
 */
  __pyx_t_2 = (((ovrControllerType_Object2 & __pyx_v_result) == ovrControllerType_Object2) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7066
 *         toReturn.append(CONTROLLER_TYPE_OBJECT1)
 *     if (capi.ovrControllerType_Object2 & result) == capi.ovrControllerType_Object2:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT2)             # <<<<<<<<<<<<<<
 *     if (capi.ovrControllerType_Object3 & result) == capi.ovrControllerType_Object3:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT3)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_OBJECT2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7066, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7065
 *     if (capi.ovrControllerType_Object1 & result) == capi.ovrControllerType_Object1:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT1)
 *     if (capi.ovrControllerType_Object2 & result) == capi.ovrControllerType_Object2:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_OBJECT2)
 *     if (capi.ovrControllerType_Object3 & result) == capi.ovrControllerType_Object3:
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7067
 *     if (capi.ovrControllerType_Object2 & result) == capi.ovrControllerType_Object2:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT2)
 *     if (capi.ovrControllerType_Object3 & result) == capi.ovrControllerType_Object3:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_OBJECT3)
 * 
 */
  __pyx_t_2 = (((ovrControllerType_Object3 & __pyx_v_result) == ovrControllerType_Object3) != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7068
 *         toReturn.append(CONTROLLER_TYPE_OBJECT2)
 *     if (capi.ovrControllerType_Object3 & result) == capi.ovrControllerType_Object3:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT3)             # <<<<<<<<<<<<<<
 * 
 *     return toReturn
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CONTROLLER_TYPE_OBJECT3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_toReturn, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7068, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":7067
 *     if (capi.ovrControllerType_Object2 & result) == capi.ovrControllerType_Object2:
 *         toReturn.append(CONTROLLER_TYPE_OBJECT2)
 *     if (capi.ovrControllerType_Object3 & result) == capi.ovrControllerType_Object3:             # <<<<<<<<<<<<<<
 *         toReturn.append(CONTROLLER_TYPE_OBJECT3)
 * 
 */
  }

  /* "psychxr/libovr/_libovr.pyx":7070
 *         toReturn.append(CONTROLLER_TYPE_OBJECT3)
 * 
 *     return toReturn             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_toReturn);
  __pyx_r = __pyx_v_toReturn;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7010
 * 
 * 
 * def getConnectedControllerTypes():             # <<<<<<<<<<<<<<
 *     """Get connected controller types.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getConnectedControllerTypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_toReturn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7073
 * 
 * 
 * def updateInputState(int controller):             # <<<<<<<<<<<<<<
 *     """Refresh the input state of a controller.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_171updateInputState(PyObject *__pyx_self, PyObject *__pyx_arg_controller); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_170updateInputState[] = "updateInputState(int controller)\nRefresh the input state of a controller.\n\n    Subsequent :func:`getButton`, :func:`getTouch`, :func:`getThumbstickValues`,\n    :func:`getIndexTriggerValues`, and :func:`getHandTriggerValues` calls using\n    the same `controller` value will reflect the new state.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    Returns\n    -------\n    tuple (int, float)\n        Result of the ``OVR::ovr_GetInputState`` LibOVR API call and polling \n        time in seconds.\n\n    See Also\n    --------\n    getConnectedControllerTypes : Get a list of connected controllers.\n    getButton: Get button states.\n    getTouch: Get touches.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_171updateInputState = {"updateInputState", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_171updateInputState, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_170updateInputState};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_171updateInputState(PyObject *__pyx_self, PyObject *__pyx_arg_controller) {
  int __pyx_v_controller;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateInputState (wrapper)", 0);
  assert(__pyx_arg_controller); {
    __pyx_v_controller = __Pyx_PyInt_As_int(__pyx_arg_controller); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7073, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.updateInputState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_170updateInputState(__pyx_self, ((int)__pyx_v_controller));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_170updateInputState(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller) {
  int __pyx_v_idx;
  ovrInputState *__pyx_v_previousInputState;
  ovrInputState *__pyx_v_currentInputState;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("updateInputState", 0);

  /* "psychxr/libovr/_libovr.pyx":7118
 *     cdef capi.ovrResult result
 * 
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_XBOX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7119
 * 
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 */
    __pyx_v_idx = 0;

    /* "psychxr/libovr/_libovr.pyx":7118
 *     cdef capi.ovrResult result
 * 
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7120
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_REMOTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7121
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 */
    __pyx_v_idx = 1;

    /* "psychxr/libovr/_libovr.pyx":7120
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7122
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_TOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7123
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 */
    __pyx_v_idx = 2;

    /* "psychxr/libovr/_libovr.pyx":7122
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7124
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_LTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7125
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 */
    __pyx_v_idx = 3;

    /* "psychxr/libovr/_libovr.pyx":7124
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7126
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_RTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7127
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 */
    __pyx_v_idx = 4;

    /* "psychxr/libovr/_libovr.pyx":7126
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7128
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7129
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 */
    __pyx_v_idx = 5;

    /* "psychxr/libovr/_libovr.pyx":7128
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7130
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7131
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 */
    __pyx_v_idx = 6;

    /* "psychxr/libovr/_libovr.pyx":7130
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7132
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7133
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8
 */
    __pyx_v_idx = 7;

    /* "psychxr/libovr/_libovr.pyx":7132
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7134
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_4)) {

    /* "psychxr/libovr/_libovr.pyx":7135
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid controller type specified.")
 */
    __pyx_v_idx = 8;

    /* "psychxr/libovr/_libovr.pyx":7134
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7137
 *         idx = 8
 *     else:
 *         raise ValueError("Invalid controller type specified.")             # <<<<<<<<<<<<<<
 * 
 *     # pointer to the current and previous input state
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7137, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":7140
 * 
 *     # pointer to the current and previous input state
 *     previousInputState = &_prevInputState[idx]             # <<<<<<<<<<<<<<
 *     currentInputState = &_inputStates[idx]
 * 
 */
  __pyx_v_previousInputState = (&(__pyx_v_7psychxr_6libovr_7_libovr__prevInputState[__pyx_v_idx]));

  /* "psychxr/libovr/_libovr.pyx":7141
 *     # pointer to the current and previous input state
 *     previousInputState = &_prevInputState[idx]
 *     currentInputState = &_inputStates[idx]             # <<<<<<<<<<<<<<
 * 
 *     # copy the current input state into the previous before updating
 */
  __pyx_v_currentInputState = (&(__pyx_v_7psychxr_6libovr_7_libovr__inputStates[__pyx_v_idx]));

  /* "psychxr/libovr/_libovr.pyx":7144
 * 
 *     # copy the current input state into the previous before updating
 *     previousInputState[0] = currentInputState[0]             # <<<<<<<<<<<<<<
 * 
 *     # get the current input state
 */
  (__pyx_v_previousInputState[0]) = (__pyx_v_currentInputState[0]);

  /* "psychxr/libovr/_libovr.pyx":7147
 * 
 *     # get the current input state
 *     result = capi.ovr_GetInputState(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         <capi.ovrControllerType>controller,
 */
  __pyx_v_result = ovr_GetInputState(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrControllerType)__pyx_v_controller), __pyx_v_currentInputState);

  /* "psychxr/libovr/_libovr.pyx":7152
 *         currentInputState)
 * 
 *     return result, currentInputState.TimeInSeconds             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_currentInputState->TimeInSeconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7073
 * 
 * 
 * def updateInputState(int controller):             # <<<<<<<<<<<<<<
 *     """Refresh the input state of a controller.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.updateInputState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7155
 * 
 * 
 * def getButton(int controller, int button, str testState='continuous'):             # <<<<<<<<<<<<<<
 *     """Get a button state.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_173getButton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_172getButton[] = "getButton(int controller, int button, unicode testState=u'continuous')\nGet a button state.\n\n    The `controller` to test is specified by its ID, defined as constants\n    starting with :data:`CONTROLLER_TYPE_*`. Buttons to test are\n    specified using their ID, defined as constants starting with\n    :data:`BUTTON_*`. Button IDs can be ORed together for testing\n    multiple button states. The returned value represents the button state\n    during the last :func:`updateInputState` call for the specified\n    `controller`.\n\n    An optional trigger mode may be specified which defines the button's\n    activation criteria. By default, `testState` is 'continuous' will return the\n    immediate state of the button. Using 'rising' (or 'pressed') will\n    return True once when the button transitions to being pressed between\n    subsequent :func:`updateInputState` calls, whereas 'falling' (and\n    'released') will return True once the button is released. If\n    :func:`updateInputState` was called only once, 'rising' and 'falling' will\n    return False.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    button : int\n        Button to check. Values can be ORed together to test for multiple button\n        presses. If a given controller does not have a particular button, False\n        will always be returned. Valid button values are:\n\n        * ``BUTTON_A``\n        ""* ``BUTTON_B``\n        * ``BUTTON_RTHUMB``\n        * ``BUTTON_RSHOULDER``\n        * ``BUTTON_X``\n        * ``BUTTON_Y``\n        * ``BUTTON_LTHUMB``\n        * ``BUTTON_LSHOULDER``\n        * ``BUTTON_UP``\n        * ``BUTTON_DOWN``\n        * ``BUTTON_LEFT``\n        * ``BUTTON_RIGHT``\n        * ``BUTTON_ENTER``\n        * ``BUTTON_BACK``\n        * ``BUTTON_VOLUP``\n        * ``BUTTON_VOLDOWN``\n        * ``BUTTON_HOME``\n        * ``BUTTON_PRIVATE``\n        * ``BUTTON_RMASK``\n        * ``BUTTON_LMASK``\n\n    testState : str\n        State to test buttons for. Valid states are 'rising', 'falling',\n        'continuous', 'pressed', and 'released'.\n\n    Returns\n    -------\n    tuple (bool, float)\n        Result of the button press and the time in seconds it was polled.\n\n    See Also\n    --------\n    getTouch : Get touches.\n\n    Examples\n    --------\n    Check if the 'X' button on the touch controllers was pressed::\n\n        isPressed = getButtons(CONTROLLER_TYPE_TOUCH,\n            BUTTON_X, 'pressed')\n\n    Test for multiple buttons (e.g. 'X' and 'Y') being released::\n\n        buttons = BUTTON_X | BUTTON_Y\n        controller = CONTROLLER_TYPE_TOUCH\n        isReleased = getButtons(controller, buttons, 'released')\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_173getButton = {"getButton", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_173getButton, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_172getButton};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_173getButton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_controller;
  int __pyx_v_button;
  PyObject *__pyx_v_testState = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getButton (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_button,&__pyx_n_s_testState,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject*)__pyx_n_u_continuous);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_button)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getButton", 0, 2, 3, 1); __PYX_ERR(0, 7155, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_testState);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getButton") < 0)) __PYX_ERR(0, 7155, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_controller = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7155, __pyx_L3_error)
    __pyx_v_button = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_button == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7155, __pyx_L3_error)
    __pyx_v_testState = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getButton", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7155, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getButton", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_testState), (&PyUnicode_Type), 1, "testState", 1))) __PYX_ERR(0, 7155, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_172getButton(__pyx_self, __pyx_v_controller, __pyx_v_button, __pyx_v_testState);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_172getButton(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_button, PyObject *__pyx_v_testState) {
  int __pyx_v_idx;
  double __pyx_v_t_sec;
  unsigned int __pyx_v_curButtons;
  unsigned int __pyx_v_prvButtons;
  int __pyx_v_stateResult;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  double __pyx_t_5;
  unsigned int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("getButton", 0);

  /* "psychxr/libovr/_libovr.pyx":7248
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_XBOX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7249
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 */
    __pyx_v_idx = 0;

    /* "psychxr/libovr/_libovr.pyx":7248
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7250
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_REMOTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7251
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 */
    __pyx_v_idx = 1;

    /* "psychxr/libovr/_libovr.pyx":7250
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7252
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_TOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7253
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 */
    __pyx_v_idx = 2;

    /* "psychxr/libovr/_libovr.pyx":7252
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7254
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_LTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7255
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 */
    __pyx_v_idx = 3;

    /* "psychxr/libovr/_libovr.pyx":7254
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7256
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_RTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7257
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 */
    __pyx_v_idx = 4;

    /* "psychxr/libovr/_libovr.pyx":7256
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7258
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7259
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 */
    __pyx_v_idx = 5;

    /* "psychxr/libovr/_libovr.pyx":7258
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7260
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7261
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 */
    __pyx_v_idx = 6;

    /* "psychxr/libovr/_libovr.pyx":7260
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7262
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7263
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8
 */
    __pyx_v_idx = 7;

    /* "psychxr/libovr/_libovr.pyx":7262
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7264
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_4)) {

    /* "psychxr/libovr/_libovr.pyx":7265
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid controller type specified.")
 */
    __pyx_v_idx = 8;

    /* "psychxr/libovr/_libovr.pyx":7264
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7267
 *         idx = 8
 *     else:
 *         raise ValueError("Invalid controller type specified.")             # <<<<<<<<<<<<<<
 * 
 *     # get the time the controller was polled
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7267, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":7270
 * 
 *     # get the time the controller was polled
 *     cdef double t_sec = _inputStates[idx].TimeInSeconds             # <<<<<<<<<<<<<<
 * 
 *     # pointer to the current and previous input state
 */
  __pyx_t_5 = (__pyx_v_7psychxr_6libovr_7_libovr__inputStates[__pyx_v_idx]).TimeInSeconds;
  __pyx_v_t_sec = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":7273
 * 
 *     # pointer to the current and previous input state
 *     cdef unsigned int curButtons = _inputStates[idx].Buttons             # <<<<<<<<<<<<<<
 *     cdef unsigned int prvButtons = _prevInputState[idx].Buttons
 * 
 */
  __pyx_t_6 = (__pyx_v_7psychxr_6libovr_7_libovr__inputStates[__pyx_v_idx]).Buttons;
  __pyx_v_curButtons = __pyx_t_6;

  /* "psychxr/libovr/_libovr.pyx":7274
 *     # pointer to the current and previous input state
 *     cdef unsigned int curButtons = _inputStates[idx].Buttons
 *     cdef unsigned int prvButtons = _prevInputState[idx].Buttons             # <<<<<<<<<<<<<<
 * 
 *     # test if the button was pressed
 */
  __pyx_t_6 = (__pyx_v_7psychxr_6libovr_7_libovr__prevInputState[__pyx_v_idx]).Buttons;
  __pyx_v_prvButtons = __pyx_t_6;

  /* "psychxr/libovr/_libovr.pyx":7277
 * 
 *     # test if the button was pressed
 *     cdef bint stateResult = False             # <<<<<<<<<<<<<<
 *     if testState == 'continuous':
 *         stateResult = (curButtons & button) == button
 */
  __pyx_v_stateResult = 0;

  /* "psychxr/libovr/_libovr.pyx":7278
 *     # test if the button was pressed
 *     cdef bint stateResult = False
 *     if testState == 'continuous':             # <<<<<<<<<<<<<<
 *         stateResult = (curButtons & button) == button
 *     elif testState == 'rising' or testState == 'pressed':
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_continuous, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7278, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_4 != 0);
  if (__pyx_t_7) {

    /* "psychxr/libovr/_libovr.pyx":7279
 *     cdef bint stateResult = False
 *     if testState == 'continuous':
 *         stateResult = (curButtons & button) == button             # <<<<<<<<<<<<<<
 *     elif testState == 'rising' or testState == 'pressed':
 *         # rising edge, will trigger once when pressed
 */
    __pyx_v_stateResult = ((__pyx_v_curButtons & __pyx_v_button) == __pyx_v_button);

    /* "psychxr/libovr/_libovr.pyx":7278
 *     # test if the button was pressed
 *     cdef bint stateResult = False
 *     if testState == 'continuous':             # <<<<<<<<<<<<<<
 *         stateResult = (curButtons & button) == button
 *     elif testState == 'rising' or testState == 'pressed':
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7280
 *     if testState == 'continuous':
 *         stateResult = (curButtons & button) == button
 *     elif testState == 'rising' or testState == 'pressed':             # <<<<<<<<<<<<<<
 *         # rising edge, will trigger once when pressed
 *         stateResult = (curButtons & button) == button and \
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_rising, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7280, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_4 != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_pressed, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 7280, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_8 != 0);
  __pyx_t_7 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_7) {

    /* "psychxr/libovr/_libovr.pyx":7282
 *     elif testState == 'rising' or testState == 'pressed':
 *         # rising edge, will trigger once when pressed
 *         stateResult = (curButtons & button) == button and \             # <<<<<<<<<<<<<<
 *                       (prvButtons & button) != button
 *     elif testState == 'falling' or testState == 'released':
 */
    __pyx_t_4 = (((__pyx_v_curButtons & __pyx_v_button) == __pyx_v_button) != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_7 = __pyx_t_4;
      goto __pyx_L7_bool_binop_done;
    }

    /* "psychxr/libovr/_libovr.pyx":7283
 *         # rising edge, will trigger once when pressed
 *         stateResult = (curButtons & button) == button and \
 *                       (prvButtons & button) != button             # <<<<<<<<<<<<<<
 *     elif testState == 'falling' or testState == 'released':
 *         # falling edge, will trigger once when released
 */
    __pyx_t_4 = (((__pyx_v_prvButtons & __pyx_v_button) != __pyx_v_button) != 0);
    __pyx_t_7 = __pyx_t_4;
    __pyx_L7_bool_binop_done:;
    __pyx_v_stateResult = __pyx_t_7;

    /* "psychxr/libovr/_libovr.pyx":7280
 *     if testState == 'continuous':
 *         stateResult = (curButtons & button) == button
 *     elif testState == 'rising' or testState == 'pressed':             # <<<<<<<<<<<<<<
 *         # rising edge, will trigger once when pressed
 *         stateResult = (curButtons & button) == button and \
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7284
 *         stateResult = (curButtons & button) == button and \
 *                       (prvButtons & button) != button
 *     elif testState == 'falling' or testState == 'released':             # <<<<<<<<<<<<<<
 *         # falling edge, will trigger once when released
 *         stateResult = (curButtons & button) != button and \
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_falling, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7284, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_4 != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_released, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 7284, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_8 != 0);
  __pyx_t_7 = __pyx_t_4;
  __pyx_L9_bool_binop_done:;
  if (likely(__pyx_t_7)) {

    /* "psychxr/libovr/_libovr.pyx":7286
 *     elif testState == 'falling' or testState == 'released':
 *         # falling edge, will trigger once when released
 *         stateResult = (curButtons & button) != button and \             # <<<<<<<<<<<<<<
 *                       (prvButtons & button) == button
 *     else:
 */
    __pyx_t_4 = (((__pyx_v_curButtons & __pyx_v_button) != __pyx_v_button) != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_7 = __pyx_t_4;
      goto __pyx_L11_bool_binop_done;
    }

    /* "psychxr/libovr/_libovr.pyx":7287
 *         # falling edge, will trigger once when released
 *         stateResult = (curButtons & button) != button and \
 *                       (prvButtons & button) == button             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")
 */
    __pyx_t_4 = (((__pyx_v_prvButtons & __pyx_v_button) == __pyx_v_button) != 0);
    __pyx_t_7 = __pyx_t_4;
    __pyx_L11_bool_binop_done:;
    __pyx_v_stateResult = __pyx_t_7;

    /* "psychxr/libovr/_libovr.pyx":7284
 *         stateResult = (curButtons & button) == button and \
 *                       (prvButtons & button) != button
 *     elif testState == 'falling' or testState == 'released':             # <<<<<<<<<<<<<<
 *         # falling edge, will trigger once when released
 *         stateResult = (curButtons & button) != button and \
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7289
 *                       (prvButtons & button) == button
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")             # <<<<<<<<<<<<<<
 * 
 *     return stateResult, t_sec
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7289, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "psychxr/libovr/_libovr.pyx":7291
 *         raise ValueError("Invalid trigger mode specified.")
 * 
 *     return stateResult, t_sec             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_stateResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_t_sec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7155
 * 
 * 
 * def getButton(int controller, int button, str testState='continuous'):             # <<<<<<<<<<<<<<
 *     """Get a button state.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getButton", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7294
 * 
 * 
 * def getTouch(int controller, int touch, str testState='continuous'):             # <<<<<<<<<<<<<<
 *     """Get a touch state.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_175getTouch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_174getTouch[] = "getTouch(int controller, int touch, unicode testState=u'continuous')\nGet a touch state.\n\n    The `controller` to test is specified by its ID, defined as constants\n    starting with :data:`CONTROLLER_TYPE_*`. Touches to test are\n    specified using their ID, defined as constants starting with\n    :data:`TOUCH_*`. Touch IDs can be ORed together for testing multiple\n    touch states. The returned value represents the touch state during the last\n    :func:`updateInputState` call for the specified `controller`.\n\n    An optional trigger mode may be specified which defines a touch's\n    activation criteria. By default, `testState` is 'continuous' will return the\n    immediate state of the button. Using 'rising' (or 'pressed') will\n    return ``True`` once when something is touched between subsequent\n    :func:`updateInputState` calls, whereas 'falling' (and 'released') will\n    return ``True`` once the touch is discontinued. If :func:`updateInputState`\n    was called only once, 'rising' and 'falling' will return False.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n        However, touches are only applicable for devices which support that\n        feature.\n\n    touch : int\n        Touch to check. Values can be ORed together to test for multiple\n        touches. If a given controller does not have a particular touch,\n        ``False`` will always be returne""d. Valid touch values are:\n\n        * ``TOUCH_A``\n        * ``TOUCH_B``\n        * ``TOUCH_RTHUMB``\n        * ``TOUCH_RSHOULDER``\n        * ``TOUCH_X``\n        * ``TOUCH_Y``\n        * ``TOUCH_LTHUMB``\n        * ``TOUCH_LSHOULDER``\n        * ``TOUCH_LINDEXTRIGGER``\n        * ``TOUCH_LINDEXTRIGGER``\n        * ``TOUCH_LTHUMBREST``\n        * ``TOUCH_RTHUMBREST``\n        * ``TOUCH_RINDEXPOINTING``\n        * ``TOUCH_RTHUMBUP``\n        * ``TOUCH_LINDEXPOINTING``\n        * ``TOUCH_LTHUMBUP``\n\n    testState : str\n        State to test touches for. Valid states are 'rising', 'falling',\n        'continuous', 'pressed', and 'released'.\n\n    Returns\n    -------\n    tuple (bool, float)\n        Result of the touches and the time in seconds it was polled.\n\n    See Also\n    --------\n    getButton : Get a button state.\n\n    Notes\n    -----\n    * Special 'touches' ``TOUCH_RINDEXPOINTING``, ``TOUCH_RTHUMBUP``, \n      ``TOUCH_RTHUMBREST``, ``TOUCH_LINDEXPOINTING``, ``TOUCH_LINDEXPOINTING``,\n      and ``TOUCH_LINDEXPOINTING``, can be used to recognise hand pose/gestures.\n\n    Examples\n    --------\n    Check if the user is making a pointing gesture with their right index\n    finger::\n\n        isPointing = getTouch(\n            controller=CONTROLLER_TYPE_LTOUCH,\n            touch=TOUCH_LINDEXPOINTING)\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_175getTouch = {"getTouch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_175getTouch, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_174getTouch};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_175getTouch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_controller;
  int __pyx_v_touch;
  PyObject *__pyx_v_testState = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTouch (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_touch,&__pyx_n_s_testState,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject*)__pyx_n_u_continuous);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_touch)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getTouch", 0, 2, 3, 1); __PYX_ERR(0, 7294, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_testState);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTouch") < 0)) __PYX_ERR(0, 7294, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_controller = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7294, __pyx_L3_error)
    __pyx_v_touch = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_touch == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7294, __pyx_L3_error)
    __pyx_v_testState = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTouch", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7294, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTouch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_testState), (&PyUnicode_Type), 1, "testState", 1))) __PYX_ERR(0, 7294, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_174getTouch(__pyx_self, __pyx_v_controller, __pyx_v_touch, __pyx_v_testState);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_174getTouch(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_touch, PyObject *__pyx_v_testState) {
  int __pyx_v_idx;
  double __pyx_v_t_sec;
  unsigned int __pyx_v_curTouches;
  unsigned int __pyx_v_prvTouches;
  int __pyx_v_stateResult;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  double __pyx_t_5;
  unsigned int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("getTouch", 0);

  /* "psychxr/libovr/_libovr.pyx":7386
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_XBOX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7387
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 */
    __pyx_v_idx = 0;

    /* "psychxr/libovr/_libovr.pyx":7386
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7388
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_REMOTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7389
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 */
    __pyx_v_idx = 1;

    /* "psychxr/libovr/_libovr.pyx":7388
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7390
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_TOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7391
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 */
    __pyx_v_idx = 2;

    /* "psychxr/libovr/_libovr.pyx":7390
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7392
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_LTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7393
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 */
    __pyx_v_idx = 3;

    /* "psychxr/libovr/_libovr.pyx":7392
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7394
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_RTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7395
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 */
    __pyx_v_idx = 4;

    /* "psychxr/libovr/_libovr.pyx":7394
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7396
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7397
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 */
    __pyx_v_idx = 5;

    /* "psychxr/libovr/_libovr.pyx":7396
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7398
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7399
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 */
    __pyx_v_idx = 6;

    /* "psychxr/libovr/_libovr.pyx":7398
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7400
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7401
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8
 */
    __pyx_v_idx = 7;

    /* "psychxr/libovr/_libovr.pyx":7400
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7402
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_4)) {

    /* "psychxr/libovr/_libovr.pyx":7403
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid controller type specified.")
 */
    __pyx_v_idx = 8;

    /* "psychxr/libovr/_libovr.pyx":7402
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7405
 *         idx = 8
 *     else:
 *         raise ValueError("Invalid controller type specified.")             # <<<<<<<<<<<<<<
 * 
 *     # get the time the controller was polled
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7405, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":7408
 * 
 *     # get the time the controller was polled
 *     cdef double t_sec = _inputStates[idx].TimeInSeconds             # <<<<<<<<<<<<<<
 * 
 *     # pointer to the current and previous input state
 */
  __pyx_t_5 = (__pyx_v_7psychxr_6libovr_7_libovr__inputStates[__pyx_v_idx]).TimeInSeconds;
  __pyx_v_t_sec = __pyx_t_5;

  /* "psychxr/libovr/_libovr.pyx":7411
 * 
 *     # pointer to the current and previous input state
 *     cdef unsigned int curTouches = _inputStates[idx].Touches             # <<<<<<<<<<<<<<
 *     cdef unsigned int prvTouches = _prevInputState[idx].Touches
 * 
 */
  __pyx_t_6 = (__pyx_v_7psychxr_6libovr_7_libovr__inputStates[__pyx_v_idx]).Touches;
  __pyx_v_curTouches = __pyx_t_6;

  /* "psychxr/libovr/_libovr.pyx":7412
 *     # pointer to the current and previous input state
 *     cdef unsigned int curTouches = _inputStates[idx].Touches
 *     cdef unsigned int prvTouches = _prevInputState[idx].Touches             # <<<<<<<<<<<<<<
 * 
 *     # test if the button was pressed
 */
  __pyx_t_6 = (__pyx_v_7psychxr_6libovr_7_libovr__prevInputState[__pyx_v_idx]).Touches;
  __pyx_v_prvTouches = __pyx_t_6;

  /* "psychxr/libovr/_libovr.pyx":7415
 * 
 *     # test if the button was pressed
 *     cdef bint stateResult = False             # <<<<<<<<<<<<<<
 *     if testState == 'continuous':
 *         stateResult = (curTouches & touch) == touch
 */
  __pyx_v_stateResult = 0;

  /* "psychxr/libovr/_libovr.pyx":7416
 *     # test if the button was pressed
 *     cdef bint stateResult = False
 *     if testState == 'continuous':             # <<<<<<<<<<<<<<
 *         stateResult = (curTouches & touch) == touch
 *     elif testState == 'rising' or testState == 'pressed':
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_continuous, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7416, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_4 != 0);
  if (__pyx_t_7) {

    /* "psychxr/libovr/_libovr.pyx":7417
 *     cdef bint stateResult = False
 *     if testState == 'continuous':
 *         stateResult = (curTouches & touch) == touch             # <<<<<<<<<<<<<<
 *     elif testState == 'rising' or testState == 'pressed':
 *         # rising edge, will trigger once when pressed
 */
    __pyx_v_stateResult = ((__pyx_v_curTouches & __pyx_v_touch) == __pyx_v_touch);

    /* "psychxr/libovr/_libovr.pyx":7416
 *     # test if the button was pressed
 *     cdef bint stateResult = False
 *     if testState == 'continuous':             # <<<<<<<<<<<<<<
 *         stateResult = (curTouches & touch) == touch
 *     elif testState == 'rising' or testState == 'pressed':
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7418
 *     if testState == 'continuous':
 *         stateResult = (curTouches & touch) == touch
 *     elif testState == 'rising' or testState == 'pressed':             # <<<<<<<<<<<<<<
 *         # rising edge, will trigger once when pressed
 *         stateResult = (curTouches & touch) == touch and \
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_rising, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7418, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_4 != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_pressed, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 7418, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_8 != 0);
  __pyx_t_7 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_7) {

    /* "psychxr/libovr/_libovr.pyx":7420
 *     elif testState == 'rising' or testState == 'pressed':
 *         # rising edge, will trigger once when pressed
 *         stateResult = (curTouches & touch) == touch and \             # <<<<<<<<<<<<<<
 *                       (prvTouches & touch) != touch
 *     elif testState == 'falling' or testState == 'released':
 */
    __pyx_t_4 = (((__pyx_v_curTouches & __pyx_v_touch) == __pyx_v_touch) != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_7 = __pyx_t_4;
      goto __pyx_L7_bool_binop_done;
    }

    /* "psychxr/libovr/_libovr.pyx":7421
 *         # rising edge, will trigger once when pressed
 *         stateResult = (curTouches & touch) == touch and \
 *                       (prvTouches & touch) != touch             # <<<<<<<<<<<<<<
 *     elif testState == 'falling' or testState == 'released':
 *         # falling edge, will trigger once when released
 */
    __pyx_t_4 = (((__pyx_v_prvTouches & __pyx_v_touch) != __pyx_v_touch) != 0);
    __pyx_t_7 = __pyx_t_4;
    __pyx_L7_bool_binop_done:;
    __pyx_v_stateResult = __pyx_t_7;

    /* "psychxr/libovr/_libovr.pyx":7418
 *     if testState == 'continuous':
 *         stateResult = (curTouches & touch) == touch
 *     elif testState == 'rising' or testState == 'pressed':             # <<<<<<<<<<<<<<
 *         # rising edge, will trigger once when pressed
 *         stateResult = (curTouches & touch) == touch and \
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7422
 *         stateResult = (curTouches & touch) == touch and \
 *                       (prvTouches & touch) != touch
 *     elif testState == 'falling' or testState == 'released':             # <<<<<<<<<<<<<<
 *         # falling edge, will trigger once when released
 *         stateResult = (curTouches & touch) != touch and \
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_falling, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7422, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_4 != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_testState, __pyx_n_u_released, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 7422, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_8 != 0);
  __pyx_t_7 = __pyx_t_4;
  __pyx_L9_bool_binop_done:;
  if (likely(__pyx_t_7)) {

    /* "psychxr/libovr/_libovr.pyx":7424
 *     elif testState == 'falling' or testState == 'released':
 *         # falling edge, will trigger once when released
 *         stateResult = (curTouches & touch) != touch and \             # <<<<<<<<<<<<<<
 *                       (prvTouches & touch) == touch
 *     else:
 */
    __pyx_t_4 = (((__pyx_v_curTouches & __pyx_v_touch) != __pyx_v_touch) != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_7 = __pyx_t_4;
      goto __pyx_L11_bool_binop_done;
    }

    /* "psychxr/libovr/_libovr.pyx":7425
 *         # falling edge, will trigger once when released
 *         stateResult = (curTouches & touch) != touch and \
 *                       (prvTouches & touch) == touch             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")
 */
    __pyx_t_4 = (((__pyx_v_prvTouches & __pyx_v_touch) == __pyx_v_touch) != 0);
    __pyx_t_7 = __pyx_t_4;
    __pyx_L11_bool_binop_done:;
    __pyx_v_stateResult = __pyx_t_7;

    /* "psychxr/libovr/_libovr.pyx":7422
 *         stateResult = (curTouches & touch) == touch and \
 *                       (prvTouches & touch) != touch
 *     elif testState == 'falling' or testState == 'released':             # <<<<<<<<<<<<<<
 *         # falling edge, will trigger once when released
 *         stateResult = (curTouches & touch) != touch and \
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7427
 *                       (prvTouches & touch) == touch
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")             # <<<<<<<<<<<<<<
 * 
 *     return stateResult, t_sec
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7427, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "psychxr/libovr/_libovr.pyx":7429
 *         raise ValueError("Invalid trigger mode specified.")
 * 
 *     return stateResult, t_sec             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_stateResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_t_sec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7294
 * 
 * 
 * def getTouch(int controller, int touch, str testState='continuous'):             # <<<<<<<<<<<<<<
 *     """Get a touch state.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getTouch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7432
 * 
 * 
 * def getThumbstickValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog thumbstick values.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_177getThumbstickValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_176getThumbstickValues[] = "getThumbstickValues(int controller, bool deadzone=False)\nGet analog thumbstick values.\n\n    Get the values indicating the displacement of the controller's analog\n    thumbsticks. Returns two tuples for the up-down and left-right of each\n    stick. Values range from -1 to 1.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    deadzone : bool\n        Apply a deadzone if True.\n\n    Returns\n    -------\n    tuple (float, float)\n        Thumbstick values.\n\n    Examples\n    --------\n\n    Get the thumbstick values with deadzone for the touch controllers::\n\n        ovr.updateInputState()  # get most recent input state\n        leftThumbStick, rightThumbStick = ovr.getThumbstickValues(\n            ovr.CONTROLLER_TYPE_TOUCH, deadzone=True)\n        x, y = rightThumbStick  # left-right, up-down values for right stick\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_177getThumbstickValues = {"getThumbstickValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_177getThumbstickValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_176getThumbstickValues};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_177getThumbstickValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_controller;
  int __pyx_v_deadzone;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getThumbstickValues (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_deadzone,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deadzone);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getThumbstickValues") < 0)) __PYX_ERR(0, 7432, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_controller = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7432, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_deadzone = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_deadzone == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7432, __pyx_L3_error)
    } else {
      __pyx_v_deadzone = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getThumbstickValues", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7432, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getThumbstickValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_176getThumbstickValues(__pyx_self, __pyx_v_controller, __pyx_v_deadzone);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_176getThumbstickValues(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_deadzone) {
  int __pyx_v_idx;
  ovrInputState *__pyx_v_currentInputState;
  float __pyx_v_thumbstick_x0;
  float __pyx_v_thumbstick_y0;
  float __pyx_v_thumbstick_x1;
  float __pyx_v_thumbstick_y1;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  float __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getThumbstickValues", 0);

  /* "psychxr/libovr/_libovr.pyx":7477
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_XBOX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7478
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 */
    __pyx_v_idx = 0;

    /* "psychxr/libovr/_libovr.pyx":7477
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7479
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_REMOTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7480
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 */
    __pyx_v_idx = 1;

    /* "psychxr/libovr/_libovr.pyx":7479
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7481
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_TOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7482
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 */
    __pyx_v_idx = 2;

    /* "psychxr/libovr/_libovr.pyx":7481
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7483
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_LTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7484
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 */
    __pyx_v_idx = 3;

    /* "psychxr/libovr/_libovr.pyx":7483
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7485
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_RTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7486
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 */
    __pyx_v_idx = 4;

    /* "psychxr/libovr/_libovr.pyx":7485
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7487
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7488
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 */
    __pyx_v_idx = 5;

    /* "psychxr/libovr/_libovr.pyx":7487
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7489
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7490
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 */
    __pyx_v_idx = 6;

    /* "psychxr/libovr/_libovr.pyx":7489
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7491
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7492
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8
 */
    __pyx_v_idx = 7;

    /* "psychxr/libovr/_libovr.pyx":7491
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7493
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_4)) {

    /* "psychxr/libovr/_libovr.pyx":7494
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid controller type specified.")
 */
    __pyx_v_idx = 8;

    /* "psychxr/libovr/_libovr.pyx":7493
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7496
 *         idx = 8
 *     else:
 *         raise ValueError("Invalid controller type specified.")             # <<<<<<<<<<<<<<
 * 
 *     # pointer to the current and previous input state
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7496, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":7499
 * 
 *     # pointer to the current and previous input state
 *     cdef capi.ovrInputState* currentInputState = &_inputStates[idx]             # <<<<<<<<<<<<<<
 * 
 *     cdef float thumbstick_x0 = 0.0
 */
  __pyx_v_currentInputState = (&(__pyx_v_7psychxr_6libovr_7_libovr__inputStates[__pyx_v_idx]));

  /* "psychxr/libovr/_libovr.pyx":7501
 *     cdef capi.ovrInputState* currentInputState = &_inputStates[idx]
 * 
 *     cdef float thumbstick_x0 = 0.0             # <<<<<<<<<<<<<<
 *     cdef float thumbstick_y0 = 0.0
 *     cdef float thumbstick_x1 = 0.0
 */
  __pyx_v_thumbstick_x0 = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7502
 * 
 *     cdef float thumbstick_x0 = 0.0
 *     cdef float thumbstick_y0 = 0.0             # <<<<<<<<<<<<<<
 *     cdef float thumbstick_x1 = 0.0
 *     cdef float thumbstick_y1 = 0.0
 */
  __pyx_v_thumbstick_y0 = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7503
 *     cdef float thumbstick_x0 = 0.0
 *     cdef float thumbstick_y0 = 0.0
 *     cdef float thumbstick_x1 = 0.0             # <<<<<<<<<<<<<<
 *     cdef float thumbstick_y1 = 0.0
 * 
 */
  __pyx_v_thumbstick_x1 = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7504
 *     cdef float thumbstick_y0 = 0.0
 *     cdef float thumbstick_x1 = 0.0
 *     cdef float thumbstick_y1 = 0.0             # <<<<<<<<<<<<<<
 * 
 *     if deadzone:
 */
  __pyx_v_thumbstick_y1 = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7506
 *     cdef float thumbstick_y1 = 0.0
 * 
 *     if deadzone:             # <<<<<<<<<<<<<<
 *         thumbstick_x0 = currentInputState[0].Thumbstick[0].x
 *         thumbstick_y0 = currentInputState[0].Thumbstick[0].y
 */
  __pyx_t_4 = (__pyx_v_deadzone != 0);
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7507
 * 
 *     if deadzone:
 *         thumbstick_x0 = currentInputState[0].Thumbstick[0].x             # <<<<<<<<<<<<<<
 *         thumbstick_y0 = currentInputState[0].Thumbstick[0].y
 *         thumbstick_x1 = currentInputState[0].Thumbstick[1].x
 */
    __pyx_t_5 = ((__pyx_v_currentInputState[0]).Thumbstick[0]).x;
    __pyx_v_thumbstick_x0 = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":7508
 *     if deadzone:
 *         thumbstick_x0 = currentInputState[0].Thumbstick[0].x
 *         thumbstick_y0 = currentInputState[0].Thumbstick[0].y             # <<<<<<<<<<<<<<
 *         thumbstick_x1 = currentInputState[0].Thumbstick[1].x
 *         thumbstick_y1 = currentInputState[0].Thumbstick[1].y
 */
    __pyx_t_5 = ((__pyx_v_currentInputState[0]).Thumbstick[0]).y;
    __pyx_v_thumbstick_y0 = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":7509
 *         thumbstick_x0 = currentInputState[0].Thumbstick[0].x
 *         thumbstick_y0 = currentInputState[0].Thumbstick[0].y
 *         thumbstick_x1 = currentInputState[0].Thumbstick[1].x             # <<<<<<<<<<<<<<
 *         thumbstick_y1 = currentInputState[0].Thumbstick[1].y
 *     else:
 */
    __pyx_t_5 = ((__pyx_v_currentInputState[0]).Thumbstick[1]).x;
    __pyx_v_thumbstick_x1 = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":7510
 *         thumbstick_y0 = currentInputState[0].Thumbstick[0].y
 *         thumbstick_x1 = currentInputState[0].Thumbstick[1].x
 *         thumbstick_y1 = currentInputState[0].Thumbstick[1].y             # <<<<<<<<<<<<<<
 *     else:
 *         thumbstick_x0 = currentInputState[0].ThumbstickNoDeadzone[0].x
 */
    __pyx_t_5 = ((__pyx_v_currentInputState[0]).Thumbstick[1]).y;
    __pyx_v_thumbstick_y1 = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":7506
 *     cdef float thumbstick_y1 = 0.0
 * 
 *     if deadzone:             # <<<<<<<<<<<<<<
 *         thumbstick_x0 = currentInputState[0].Thumbstick[0].x
 *         thumbstick_y0 = currentInputState[0].Thumbstick[0].y
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7512
 *         thumbstick_y1 = currentInputState[0].Thumbstick[1].y
 *     else:
 *         thumbstick_x0 = currentInputState[0].ThumbstickNoDeadzone[0].x             # <<<<<<<<<<<<<<
 *         thumbstick_y0 = currentInputState[0].ThumbstickNoDeadzone[0].y
 *         thumbstick_x1 = currentInputState[0].ThumbstickNoDeadzone[1].x
 */
  /*else*/ {
    __pyx_t_5 = ((__pyx_v_currentInputState[0]).ThumbstickNoDeadzone[0]).x;
    __pyx_v_thumbstick_x0 = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":7513
 *     else:
 *         thumbstick_x0 = currentInputState[0].ThumbstickNoDeadzone[0].x
 *         thumbstick_y0 = currentInputState[0].ThumbstickNoDeadzone[0].y             # <<<<<<<<<<<<<<
 *         thumbstick_x1 = currentInputState[0].ThumbstickNoDeadzone[1].x
 *         thumbstick_y1 = currentInputState[0].ThumbstickNoDeadzone[1].y
 */
    __pyx_t_5 = ((__pyx_v_currentInputState[0]).ThumbstickNoDeadzone[0]).y;
    __pyx_v_thumbstick_y0 = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":7514
 *         thumbstick_x0 = currentInputState[0].ThumbstickNoDeadzone[0].x
 *         thumbstick_y0 = currentInputState[0].ThumbstickNoDeadzone[0].y
 *         thumbstick_x1 = currentInputState[0].ThumbstickNoDeadzone[1].x             # <<<<<<<<<<<<<<
 *         thumbstick_y1 = currentInputState[0].ThumbstickNoDeadzone[1].y
 * 
 */
    __pyx_t_5 = ((__pyx_v_currentInputState[0]).ThumbstickNoDeadzone[1]).x;
    __pyx_v_thumbstick_x1 = __pyx_t_5;

    /* "psychxr/libovr/_libovr.pyx":7515
 *         thumbstick_y0 = currentInputState[0].ThumbstickNoDeadzone[0].y
 *         thumbstick_x1 = currentInputState[0].ThumbstickNoDeadzone[1].x
 *         thumbstick_y1 = currentInputState[0].ThumbstickNoDeadzone[1].y             # <<<<<<<<<<<<<<
 * 
 *     return np.array((thumbstick_x0, thumbstick_y0), dtype=np.float32), \
 */
    __pyx_t_5 = ((__pyx_v_currentInputState[0]).ThumbstickNoDeadzone[1]).y;
    __pyx_v_thumbstick_y1 = __pyx_t_5;
  }
  __pyx_L4:;

  /* "psychxr/libovr/_libovr.pyx":7517
 *         thumbstick_y1 = currentInputState[0].ThumbstickNoDeadzone[1].y
 * 
 *     return np.array((thumbstick_x0, thumbstick_y0), dtype=np.float32), \             # <<<<<<<<<<<<<<
 *            np.array((thumbstick_x1, thumbstick_y1), dtype=np.float32)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_thumbstick_x0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_thumbstick_y0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "psychxr/libovr/_libovr.pyx":7518
 * 
 *     return np.array((thumbstick_x0, thumbstick_y0), dtype=np.float32), \
 *            np.array((thumbstick_x1, thumbstick_y1), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_thumbstick_x1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_thumbstick_y1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_6 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "psychxr/libovr/_libovr.pyx":7517
 *         thumbstick_y1 = currentInputState[0].ThumbstickNoDeadzone[1].y
 * 
 *     return np.array((thumbstick_x0, thumbstick_y0), dtype=np.float32), \             # <<<<<<<<<<<<<<
 *            np.array((thumbstick_x1, thumbstick_y1), dtype=np.float32)
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7432
 * 
 * 
 * def getThumbstickValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog thumbstick values.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getThumbstickValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7521
 * 
 * 
 * def getIndexTriggerValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog index trigger values.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_179getIndexTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_178getIndexTriggerValues[] = "getIndexTriggerValues(int controller, bool deadzone=False)\nGet analog index trigger values.\n\n    Get the values indicating the displacement of the controller's analog\n    index triggers. Returns values for the left an right sticks. Values range\n    from -1 to 1.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    Returns\n    -------\n    tuple (float, float)\n        Trigger values (left, right).\n\n    See Also\n    --------\n    getThumbstickValues : Get thumbstick displacements.\n    getHandTriggerValues : Get hand trigger values.\n\n    Examples\n    --------\n\n    Get the index trigger values for touch controllers (with deadzone)::\n\n        leftVal, rightVal = getIndexTriggerValues(CONTROLLER_TYPE_TOUCH,\n            deadzone=True)\n\n    Cast a ray from the controller when a trigger is pulled::\n\n        _, rightVal = getIndexTriggerValues(CONTROLLER_TYPE_TOUCH,\n            deadzone=True)\n\n        # handPose of right hand from the last tracking state\n        if rightVal > 0.75:  # 75% thresholds\n            if handPose.raycastSphere(target):  # target is LibOVRPose\n                print('Target hit!')\n            else:\n                print('Missed!')\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_179getIndexTriggerValues = {"getIndexTriggerValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_179getIndexTriggerValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_178getIndexTriggerValues};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_179getIndexTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_controller;
  int __pyx_v_deadzone;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIndexTriggerValues (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_deadzone,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deadzone);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getIndexTriggerValues") < 0)) __PYX_ERR(0, 7521, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_controller = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7521, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_deadzone = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_deadzone == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7521, __pyx_L3_error)
    } else {
      __pyx_v_deadzone = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getIndexTriggerValues", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7521, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getIndexTriggerValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_178getIndexTriggerValues(__pyx_self, __pyx_v_controller, __pyx_v_deadzone);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_178getIndexTriggerValues(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_deadzone) {
  int __pyx_v_idx;
  ovrInputState *__pyx_v_currentInputState;
  float __pyx_v_triggerLeft;
  float __pyx_v_triggerRight;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getIndexTriggerValues", 0);

  /* "psychxr/libovr/_libovr.pyx":7579
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_XBOX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7580
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 */
    __pyx_v_idx = 0;

    /* "psychxr/libovr/_libovr.pyx":7579
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7581
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_REMOTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7582
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 */
    __pyx_v_idx = 1;

    /* "psychxr/libovr/_libovr.pyx":7581
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7583
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_TOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7584
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 */
    __pyx_v_idx = 2;

    /* "psychxr/libovr/_libovr.pyx":7583
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7585
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_LTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7586
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 */
    __pyx_v_idx = 3;

    /* "psychxr/libovr/_libovr.pyx":7585
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7587
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_RTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7588
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 */
    __pyx_v_idx = 4;

    /* "psychxr/libovr/_libovr.pyx":7587
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7589
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7590
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 */
    __pyx_v_idx = 5;

    /* "psychxr/libovr/_libovr.pyx":7589
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7591
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7592
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 */
    __pyx_v_idx = 6;

    /* "psychxr/libovr/_libovr.pyx":7591
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7593
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7594
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8
 */
    __pyx_v_idx = 7;

    /* "psychxr/libovr/_libovr.pyx":7593
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7595
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_4)) {

    /* "psychxr/libovr/_libovr.pyx":7596
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid controller type specified.")
 */
    __pyx_v_idx = 8;

    /* "psychxr/libovr/_libovr.pyx":7595
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7598
 *         idx = 8
 *     else:
 *         raise ValueError("Invalid controller type specified.")             # <<<<<<<<<<<<<<
 * 
 *     # pointer to the current and previous input state
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7598, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":7601
 * 
 *     # pointer to the current and previous input state
 *     cdef capi.ovrInputState* currentInputState = &_inputStates[idx]             # <<<<<<<<<<<<<<
 * 
 *     cdef float triggerLeft = 0.0
 */
  __pyx_v_currentInputState = (&(__pyx_v_7psychxr_6libovr_7_libovr__inputStates[__pyx_v_idx]));

  /* "psychxr/libovr/_libovr.pyx":7603
 *     cdef capi.ovrInputState* currentInputState = &_inputStates[idx]
 * 
 *     cdef float triggerLeft = 0.0             # <<<<<<<<<<<<<<
 *     cdef float triggerRight = 0.0
 * 
 */
  __pyx_v_triggerLeft = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7604
 * 
 *     cdef float triggerLeft = 0.0
 *     cdef float triggerRight = 0.0             # <<<<<<<<<<<<<<
 * 
 *     if deadzone:
 */
  __pyx_v_triggerRight = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7606
 *     cdef float triggerRight = 0.0
 * 
 *     if deadzone:             # <<<<<<<<<<<<<<
 *         triggerLeft = currentInputState[0].IndexTrigger[0]
 *         triggerRight = currentInputState[0].IndexTrigger[1]
 */
  __pyx_t_4 = (__pyx_v_deadzone != 0);
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7607
 * 
 *     if deadzone:
 *         triggerLeft = currentInputState[0].IndexTrigger[0]             # <<<<<<<<<<<<<<
 *         triggerRight = currentInputState[0].IndexTrigger[1]
 *     else:
 */
    __pyx_v_triggerLeft = ((__pyx_v_currentInputState[0]).IndexTrigger[0]);

    /* "psychxr/libovr/_libovr.pyx":7608
 *     if deadzone:
 *         triggerLeft = currentInputState[0].IndexTrigger[0]
 *         triggerRight = currentInputState[0].IndexTrigger[1]             # <<<<<<<<<<<<<<
 *     else:
 *         triggerLeft = currentInputState[0].IndexTriggerNoDeadzone[0]
 */
    __pyx_v_triggerRight = ((__pyx_v_currentInputState[0]).IndexTrigger[1]);

    /* "psychxr/libovr/_libovr.pyx":7606
 *     cdef float triggerRight = 0.0
 * 
 *     if deadzone:             # <<<<<<<<<<<<<<
 *         triggerLeft = currentInputState[0].IndexTrigger[0]
 *         triggerRight = currentInputState[0].IndexTrigger[1]
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7610
 *         triggerRight = currentInputState[0].IndexTrigger[1]
 *     else:
 *         triggerLeft = currentInputState[0].IndexTriggerNoDeadzone[0]             # <<<<<<<<<<<<<<
 *         triggerRight = currentInputState[0].IndexTriggerNoDeadzone[1]
 * 
 */
  /*else*/ {
    __pyx_v_triggerLeft = ((__pyx_v_currentInputState[0]).IndexTriggerNoDeadzone[0]);

    /* "psychxr/libovr/_libovr.pyx":7611
 *     else:
 *         triggerLeft = currentInputState[0].IndexTriggerNoDeadzone[0]
 *         triggerRight = currentInputState[0].IndexTriggerNoDeadzone[1]             # <<<<<<<<<<<<<<
 * 
 *     return np.array((triggerLeft, triggerRight), dtype=np.float32)
 */
    __pyx_v_triggerRight = ((__pyx_v_currentInputState[0]).IndexTriggerNoDeadzone[1]);
  }
  __pyx_L4:;

  /* "psychxr/libovr/_libovr.pyx":7613
 *         triggerRight = currentInputState[0].IndexTriggerNoDeadzone[1]
 * 
 *     return np.array((triggerLeft, triggerRight), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_triggerLeft); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_triggerRight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7521
 * 
 * 
 * def getIndexTriggerValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog index trigger values.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getIndexTriggerValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7616
 * 
 * 
 * def getHandTriggerValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog hand trigger values.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_181getHandTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_180getHandTriggerValues[] = "getHandTriggerValues(int controller, bool deadzone=False)\nGet analog hand trigger values.\n\n    Get the values indicating the displacement of the controller's analog\n    hand triggers. Returns two values for the left and right sticks. Values\n    range from -1 to 1.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    Returns\n    -------\n    tuple (float, float)\n        Trigger values (left, right).\n\n    See Also\n    --------\n    getThumbstickValues : Get thumbstick displacements.\n    getIndexTriggerValues : Get index trigger values.\n\n    Examples\n    --------\n\n    Get the hand trigger values for touch controllers (with deadzone)::\n\n        leftVal, rightVal = getHandTriggerValues(CONTROLLER_TYPE_TOUCH,\n            deadzone=True)\n\n    Grip an object if near a hand. Simply set the pose of the object to match\n    that of the hand when gripping within some distance of the object's\n    origin. When the grip is released, the object will assume the last pose\n    before being released. Here is a very basic example of object gripping::\n\n        _, rightVal = getHandTriggerValues(CONTROLLER_TYPE_TOUCH,\n            deadzone=True)\n\n        # thing and handPose are LibOVRPoses, handPose is from tracking state\n        distanceToHand = abs(handPose.distanceTo(thing.pos))\n        if rightVal > 0.75 and distanceToHand < 0.01:\n            thing.posOri = hand""Pose.posOri\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_181getHandTriggerValues = {"getHandTriggerValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_181getHandTriggerValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_180getHandTriggerValues};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_181getHandTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_controller;
  int __pyx_v_deadzone;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getHandTriggerValues (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_deadzone,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deadzone);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getHandTriggerValues") < 0)) __PYX_ERR(0, 7616, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_controller = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7616, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_deadzone = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_deadzone == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7616, __pyx_L3_error)
    } else {
      __pyx_v_deadzone = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getHandTriggerValues", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7616, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getHandTriggerValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_180getHandTriggerValues(__pyx_self, __pyx_v_controller, __pyx_v_deadzone);

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_180getHandTriggerValues(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, int __pyx_v_deadzone) {
  int __pyx_v_idx;
  ovrInputState *__pyx_v_currentInputState;
  float __pyx_v_triggerLeft;
  float __pyx_v_triggerRight;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getHandTriggerValues", 0);

  /* "psychxr/libovr/_libovr.pyx":7674
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_XBOX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7675
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 */
    __pyx_v_idx = 0;

    /* "psychxr/libovr/_libovr.pyx":7674
 *     # get the controller index in the states array
 *     cdef int idx
 *     if controller == CONTROLLER_TYPE_XBOX:             # <<<<<<<<<<<<<<
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7676
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_REMOTE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7677
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 */
    __pyx_v_idx = 1;

    /* "psychxr/libovr/_libovr.pyx":7676
 *     if controller == CONTROLLER_TYPE_XBOX:
 *         idx = 0
 *     elif controller == CONTROLLER_TYPE_REMOTE:             # <<<<<<<<<<<<<<
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7678
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_TOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7679
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 */
    __pyx_v_idx = 2;

    /* "psychxr/libovr/_libovr.pyx":7678
 *     elif controller == CONTROLLER_TYPE_REMOTE:
 *         idx = 1
 *     elif controller == CONTROLLER_TYPE_TOUCH:             # <<<<<<<<<<<<<<
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7680
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_LTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7681
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 */
    __pyx_v_idx = 3;

    /* "psychxr/libovr/_libovr.pyx":7680
 *     elif controller == CONTROLLER_TYPE_TOUCH:
 *         idx = 2
 *     elif controller == CONTROLLER_TYPE_LTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7682
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_RTOUCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7683
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 */
    __pyx_v_idx = 4;

    /* "psychxr/libovr/_libovr.pyx":7682
 *     elif controller == CONTROLLER_TYPE_LTOUCH:
 *         idx = 3
 *     elif controller == CONTROLLER_TYPE_RTOUCH:             # <<<<<<<<<<<<<<
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7684
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7685
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 */
    __pyx_v_idx = 5;

    /* "psychxr/libovr/_libovr.pyx":7684
 *     elif controller == CONTROLLER_TYPE_RTOUCH:
 *         idx = 4
 *     elif controller == CONTROLLER_TYPE_OBJECT0:             # <<<<<<<<<<<<<<
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7686
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7687
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 */
    __pyx_v_idx = 6;

    /* "psychxr/libovr/_libovr.pyx":7686
 *     elif controller == CONTROLLER_TYPE_OBJECT0:
 *         idx = 5
 *     elif controller == CONTROLLER_TYPE_OBJECT1:             # <<<<<<<<<<<<<<
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7688
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7689
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7             # <<<<<<<<<<<<<<
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8
 */
    __pyx_v_idx = 7;

    /* "psychxr/libovr/_libovr.pyx":7688
 *     elif controller == CONTROLLER_TYPE_OBJECT1:
 *         idx = 6
 *     elif controller == CONTROLLER_TYPE_OBJECT2:             # <<<<<<<<<<<<<<
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7690
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_controller); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CONTROLLER_TYPE_OBJECT3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 7690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_4)) {

    /* "psychxr/libovr/_libovr.pyx":7691
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:
 *         idx = 8             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid controller type specified.")
 */
    __pyx_v_idx = 8;

    /* "psychxr/libovr/_libovr.pyx":7690
 *     elif controller == CONTROLLER_TYPE_OBJECT2:
 *         idx = 7
 *     elif controller == CONTROLLER_TYPE_OBJECT3:             # <<<<<<<<<<<<<<
 *         idx = 8
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7693
 *         idx = 8
 *     else:
 *         raise ValueError("Invalid controller type specified.")             # <<<<<<<<<<<<<<
 * 
 *     # pointer to the current and previous input state
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7693, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":7696
 * 
 *     # pointer to the current and previous input state
 *     cdef capi.ovrInputState* currentInputState = &_inputStates[idx]             # <<<<<<<<<<<<<<
 * 
 *     cdef float triggerLeft = 0.0
 */
  __pyx_v_currentInputState = (&(__pyx_v_7psychxr_6libovr_7_libovr__inputStates[__pyx_v_idx]));

  /* "psychxr/libovr/_libovr.pyx":7698
 *     cdef capi.ovrInputState* currentInputState = &_inputStates[idx]
 * 
 *     cdef float triggerLeft = 0.0             # <<<<<<<<<<<<<<
 *     cdef float triggerRight = 0.0
 * 
 */
  __pyx_v_triggerLeft = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7699
 * 
 *     cdef float triggerLeft = 0.0
 *     cdef float triggerRight = 0.0             # <<<<<<<<<<<<<<
 * 
 *     if deadzone:
 */
  __pyx_v_triggerRight = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7701
 *     cdef float triggerRight = 0.0
 * 
 *     if deadzone:             # <<<<<<<<<<<<<<
 *         triggerLeft = currentInputState[0].HandTrigger[0]
 *         triggerRight = currentInputState[0].HandTrigger[1]
 */
  __pyx_t_4 = (__pyx_v_deadzone != 0);
  if (__pyx_t_4) {

    /* "psychxr/libovr/_libovr.pyx":7702
 * 
 *     if deadzone:
 *         triggerLeft = currentInputState[0].HandTrigger[0]             # <<<<<<<<<<<<<<
 *         triggerRight = currentInputState[0].HandTrigger[1]
 *     else:
 */
    __pyx_v_triggerLeft = ((__pyx_v_currentInputState[0]).HandTrigger[0]);

    /* "psychxr/libovr/_libovr.pyx":7703
 *     if deadzone:
 *         triggerLeft = currentInputState[0].HandTrigger[0]
 *         triggerRight = currentInputState[0].HandTrigger[1]             # <<<<<<<<<<<<<<
 *     else:
 *         triggerLeft = currentInputState[0].HandTriggerNoDeadzone[0]
 */
    __pyx_v_triggerRight = ((__pyx_v_currentInputState[0]).HandTrigger[1]);

    /* "psychxr/libovr/_libovr.pyx":7701
 *     cdef float triggerRight = 0.0
 * 
 *     if deadzone:             # <<<<<<<<<<<<<<
 *         triggerLeft = currentInputState[0].HandTrigger[0]
 *         triggerRight = currentInputState[0].HandTrigger[1]
 */
    goto __pyx_L4;
  }

  /* "psychxr/libovr/_libovr.pyx":7705
 *         triggerRight = currentInputState[0].HandTrigger[1]
 *     else:
 *         triggerLeft = currentInputState[0].HandTriggerNoDeadzone[0]             # <<<<<<<<<<<<<<
 *         triggerRight = currentInputState[0].HandTriggerNoDeadzone[1]
 * 
 */
  /*else*/ {
    __pyx_v_triggerLeft = ((__pyx_v_currentInputState[0]).HandTriggerNoDeadzone[0]);

    /* "psychxr/libovr/_libovr.pyx":7706
 *     else:
 *         triggerLeft = currentInputState[0].HandTriggerNoDeadzone[0]
 *         triggerRight = currentInputState[0].HandTriggerNoDeadzone[1]             # <<<<<<<<<<<<<<
 * 
 *     return np.array((triggerLeft, triggerRight), dtype=np.float32)
 */
    __pyx_v_triggerRight = ((__pyx_v_currentInputState[0]).HandTriggerNoDeadzone[1]);
  }
  __pyx_L4:;

  /* "psychxr/libovr/_libovr.pyx":7708
 *         triggerRight = currentInputState[0].HandTriggerNoDeadzone[1]
 * 
 *     return np.array((triggerLeft, triggerRight), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_triggerLeft); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_triggerRight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7616
 * 
 * 
 * def getHandTriggerValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog hand trigger values.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getHandTriggerValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7711
 * 
 * 
 * def setControllerVibration(int controller, str frequency, float amplitude):             # <<<<<<<<<<<<<<
 *     """Vibrate a controller.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_183setControllerVibration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_182setControllerVibration[] = "setControllerVibration(int controller, unicode frequency, float amplitude)\nVibrate a controller.\n\n    Vibration is constant at fixed frequency and amplitude. Vibration lasts\n    2.5 seconds, so this function needs to be called more often than that\n    for sustained vibration. Only controllers which support vibration can be\n    used here.\n\n    There are only two frequencies permitted 'high' and 'low', however,\n    amplitude can vary from 0.0 to 1.0. Specifying frequency='off' stops\n    vibration.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    frequency : str\n        Vibration frequency. Valid values are: 'off', 'low', or 'high'.\n    amplitude : float\n        Vibration amplitude in the range of [0.0 and 1.0]. Values outside\n        this range are clamped.\n\n    Returns\n    -------\n    int\n        Return value of API call ``OVR::ovr_SetControllerVibration``. Can return\n        ``SUCCESS_DEVICE_UNAVAILABLE`` if no device is present.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_183setControllerVibration = {"setControllerVibration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_183setControllerVibration, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_182setControllerVibration};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_183setControllerVibration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_controller;
  PyObject *__pyx_v_frequency = 0;
  float __pyx_v_amplitude;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setControllerVibration (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_frequency,&__pyx_n_s_amplitude,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frequency)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setControllerVibration", 1, 3, 3, 1); __PYX_ERR(0, 7711, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_amplitude)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setControllerVibration", 1, 3, 3, 2); __PYX_ERR(0, 7711, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setControllerVibration") < 0)) __PYX_ERR(0, 7711, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_controller = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7711, __pyx_L3_error)
    __pyx_v_frequency = ((PyObject*)values[1]);
    __pyx_v_amplitude = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_amplitude == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7711, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setControllerVibration", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7711, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.setControllerVibration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_frequency), (&PyUnicode_Type), 1, "frequency", 1))) __PYX_ERR(0, 7711, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_182setControllerVibration(__pyx_self, __pyx_v_controller, __pyx_v_frequency, __pyx_v_amplitude);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_182setControllerVibration(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, PyObject *__pyx_v_frequency, float __pyx_v_amplitude) {
  float __pyx_v_freq;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("setControllerVibration", 0);

  /* "psychxr/libovr/_libovr.pyx":7754
 * 
 *     # get frequency associated with the string
 *     cdef float freq = 0.0             # <<<<<<<<<<<<<<
 *     if frequency == 'off':
 *         freq = amplitude = 0.0
 */
  __pyx_v_freq = 0.0;

  /* "psychxr/libovr/_libovr.pyx":7755
 *     # get frequency associated with the string
 *     cdef float freq = 0.0
 *     if frequency == 'off':             # <<<<<<<<<<<<<<
 *         freq = amplitude = 0.0
 *     elif frequency == 'low':
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_frequency, __pyx_n_u_off, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7755, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/libovr/_libovr.pyx":7756
 *     cdef float freq = 0.0
 *     if frequency == 'off':
 *         freq = amplitude = 0.0             # <<<<<<<<<<<<<<
 *     elif frequency == 'low':
 *         freq = 0.5
 */
    __pyx_v_freq = 0.0;
    __pyx_v_amplitude = 0.0;

    /* "psychxr/libovr/_libovr.pyx":7755
 *     # get frequency associated with the string
 *     cdef float freq = 0.0
 *     if frequency == 'off':             # <<<<<<<<<<<<<<
 *         freq = amplitude = 0.0
 *     elif frequency == 'low':
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7757
 *     if frequency == 'off':
 *         freq = amplitude = 0.0
 *     elif frequency == 'low':             # <<<<<<<<<<<<<<
 *         freq = 0.5
 *     elif frequency == 'high':
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_frequency, __pyx_n_u_low, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 7757, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/libovr/_libovr.pyx":7758
 *         freq = amplitude = 0.0
 *     elif frequency == 'low':
 *         freq = 0.5             # <<<<<<<<<<<<<<
 *     elif frequency == 'high':
 *         freq = 1.0
 */
    __pyx_v_freq = 0.5;

    /* "psychxr/libovr/_libovr.pyx":7757
 *     if frequency == 'off':
 *         freq = amplitude = 0.0
 *     elif frequency == 'low':             # <<<<<<<<<<<<<<
 *         freq = 0.5
 *     elif frequency == 'high':
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7759
 *     elif frequency == 'low':
 *         freq = 0.5
 *     elif frequency == 'high':             # <<<<<<<<<<<<<<
 *         freq = 1.0
 *     else:
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_frequency, __pyx_n_u_high, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7759, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "psychxr/libovr/_libovr.pyx":7760
 *         freq = 0.5
 *     elif frequency == 'high':
 *         freq = 1.0             # <<<<<<<<<<<<<<
 *     else:
 *         raise RuntimeError("Invalid frequency specified.")
 */
    __pyx_v_freq = 1.0;

    /* "psychxr/libovr/_libovr.pyx":7759
 *     elif frequency == 'low':
 *         freq = 0.5
 *     elif frequency == 'high':             # <<<<<<<<<<<<<<
 *         freq = 1.0
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7762
 *         freq = 1.0
 *     else:
 *         raise RuntimeError("Invalid frequency specified.")             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrResult result = capi.ovr_SetControllerVibration(
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 7762, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":7764
 *         raise RuntimeError("Invalid frequency specified.")
 * 
 *     cdef capi.ovrResult result = capi.ovr_SetControllerVibration(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         <capi.ovrControllerType>controller,
 */
  __pyx_v_result = ovr_SetControllerVibration(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrControllerType)__pyx_v_controller), __pyx_v_freq, __pyx_v_amplitude);

  /* "psychxr/libovr/_libovr.pyx":7770
 *         amplitude)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7711
 * 
 * 
 * def setControllerVibration(int controller, str frequency, float amplitude):             # <<<<<<<<<<<<<<
 *     """Vibrate a controller.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.libovr._libovr.setControllerVibration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7773
 * 
 * 
 * def getHapticsInfo(int controller):             # <<<<<<<<<<<<<<
 *     """Get information about the haptics engine for a particular controller.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_185getHapticsInfo(PyObject *__pyx_self, PyObject *__pyx_arg_controller); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_184getHapticsInfo[] = "getHapticsInfo(int controller)\nGet information about the haptics engine for a particular controller.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_XBOX`` : XBox gamepad.\n        * ``CONTROLLER_TYPE_REMOTE`` : Oculus Remote.\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    Returns\n    -------\n    LibOVRHapticsInfo\n        Haptics engine information. Values do not change over the course of a\n        session.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_185getHapticsInfo = {"getHapticsInfo", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_185getHapticsInfo, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_184getHapticsInfo};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_185getHapticsInfo(PyObject *__pyx_self, PyObject *__pyx_arg_controller) {
  int __pyx_v_controller;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getHapticsInfo (wrapper)", 0);
  assert(__pyx_arg_controller); {
    __pyx_v_controller = __Pyx_PyInt_As_int(__pyx_arg_controller); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7773, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getHapticsInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_184getHapticsInfo(__pyx_self, ((int)__pyx_v_controller));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_184getHapticsInfo(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getHapticsInfo", 0);

  /* "psychxr/libovr/_libovr.pyx":7799
 *     """
 *     global _ptrSession
 *     cdef LibOVRHapticsInfo to_return = LibOVRHapticsInfo()             # <<<<<<<<<<<<<<
 *     to_return.c_data = capi.ovr_GetTouchHapticsDesc(
 *         _ptrSession, <capi.ovrControllerType>controller,)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":7800
 *     global _ptrSession
 *     cdef LibOVRHapticsInfo to_return = LibOVRHapticsInfo()
 *     to_return.c_data = capi.ovr_GetTouchHapticsDesc(             # <<<<<<<<<<<<<<
 *         _ptrSession, <capi.ovrControllerType>controller,)
 * 
 */
  __pyx_v_to_return->c_data = ovr_GetTouchHapticsDesc(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrControllerType)__pyx_v_controller));

  /* "psychxr/libovr/_libovr.pyx":7803
 *         _ptrSession, <capi.ovrControllerType>controller,)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7773
 * 
 * 
 * def getHapticsInfo(int controller):             # <<<<<<<<<<<<<<
 *     """Get information about the haptics engine for a particular controller.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getHapticsInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7806
 * 
 * 
 * def submitControllerVibration(int controller, LibOVRHapticsBuffer buffer):             # <<<<<<<<<<<<<<
 *     """Submit a haptics buffer to Touch controllers.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_187submitControllerVibration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_186submitControllerVibration[] = "submitControllerVibration(int controller, LibOVRHapticsBuffer buffer)\nSubmit a haptics buffer to Touch controllers.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    buffer : LibOVRHapticsBuffer\n        Haptics buffer to submit.\n\n    Returns\n    -------\n    int\n        Return value of API call ``OVR::ovr_SubmitControllerVibration``. Can\n        return ``SUCCESS_DEVICE_UNAVAILABLE`` if no device is present.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_187submitControllerVibration = {"submitControllerVibration", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_187submitControllerVibration, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_186submitControllerVibration};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_187submitControllerVibration(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_controller;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_buffer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("submitControllerVibration (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_buffer,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buffer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("submitControllerVibration", 1, 2, 2, 1); __PYX_ERR(0, 7806, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "submitControllerVibration") < 0)) __PYX_ERR(0, 7806, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_controller = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7806, __pyx_L3_error)
    __pyx_v_buffer = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("submitControllerVibration", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7806, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.submitControllerVibration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer, 1, "buffer", 0))) __PYX_ERR(0, 7806, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_186submitControllerVibration(__pyx_self, __pyx_v_controller, __pyx_v_buffer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_186submitControllerVibration(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *__pyx_v_buffer) {
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("submitControllerVibration", 0);

  /* "psychxr/libovr/_libovr.pyx":7834
 *     global _ptrSession
 * 
 *     cdef capi.ovrResult result = capi.ovr_SubmitControllerVibration(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         <capi.ovrControllerType>controller,
 */
  __pyx_v_result = ovr_SubmitControllerVibration(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrControllerType)__pyx_v_controller), (&__pyx_v_buffer->c_data));

  /* "psychxr/libovr/_libovr.pyx":7839
 *         &buffer.c_data)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7806
 * 
 * 
 * def submitControllerVibration(int controller, LibOVRHapticsBuffer buffer):             # <<<<<<<<<<<<<<
 *     """Submit a haptics buffer to Touch controllers.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.submitControllerVibration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7842
 * 
 * 
 * def getControllerPlaybackState(int controller):             # <<<<<<<<<<<<<<
 *     """Get the playback state of a touch controller.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_189getControllerPlaybackState(PyObject *__pyx_self, PyObject *__pyx_arg_controller); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_188getControllerPlaybackState[] = "getControllerPlaybackState(int controller)\nGet the playback state of a touch controller.\n\n    Parameters\n    ----------\n    controller : int\n        Controller name. Valid values are:\n\n        * ``CONTROLLER_TYPE_TOUCH`` : Combined Touch controllers.\n        * ``CONTROLLER_TYPE_LTOUCH`` : Left Touch controller.\n        * ``CONTROLLER_TYPE_RTOUCH`` : Right Touch controller.\n        * ``CONTROLLER_TYPE_OBJECT0`` : Object 0 controller.\n        * ``CONTROLLER_TYPE_OBJECT1`` : Object 1 controller.\n        * ``CONTROLLER_TYPE_OBJECT2`` : Object 2 controller.\n        * ``CONTROLLER_TYPE_OBJECT3`` : Object 3 controller.\n\n    Returns\n    -------\n    tuple (int, int, int)\n        Returns three values, the value of API call\n        ``OVR::ovr_GetControllerVibrationState``, the remaining space in the\n        haptics buffer available to queue more samples, and the number of\n        samples currently queued.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_189getControllerPlaybackState = {"getControllerPlaybackState", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_189getControllerPlaybackState, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_188getControllerPlaybackState};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_189getControllerPlaybackState(PyObject *__pyx_self, PyObject *__pyx_arg_controller) {
  int __pyx_v_controller;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getControllerPlaybackState (wrapper)", 0);
  assert(__pyx_arg_controller); {
    __pyx_v_controller = __Pyx_PyInt_As_int(__pyx_arg_controller); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7842, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.getControllerPlaybackState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_188getControllerPlaybackState(__pyx_self, ((int)__pyx_v_controller));

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

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_188getControllerPlaybackState(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_controller) {
  ovrHapticsPlaybackState __pyx_v_playback_state;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("getControllerPlaybackState", 0);

  /* "psychxr/libovr/_libovr.pyx":7870
 * 
 *     cdef capi.ovrHapticsPlaybackState playback_state
 *     cdef capi.ovrResult result = capi.ovr_GetControllerVibrationState(             # <<<<<<<<<<<<<<
 *         _ptrSession,
 *         <capi.ovrControllerType>controller,
 */
  __pyx_v_result = ovr_GetControllerVibrationState(__pyx_v_7psychxr_6libovr_7_libovr__ptrSession, ((ovrControllerType)__pyx_v_controller), (&__pyx_v_playback_state));

  /* "psychxr/libovr/_libovr.pyx":7875
 *         &playback_state)
 * 
 *     return result, playback_state.RemainingQueueSpace, playback_state.SamplesQueued             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_playback_state.RemainingQueueSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_playback_state.SamplesQueued); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7842
 * 
 * 
 * def getControllerPlaybackState(int controller):             # <<<<<<<<<<<<<<
 *     """Get the playback state of a touch controller.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.libovr._libovr.getControllerPlaybackState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/libovr/_libovr.pyx":7878
 * 
 * 
 * def cullPose(int eye, LibOVRPose pose):             # <<<<<<<<<<<<<<
 *     """Test if a pose's bounding box or position falls outside of an eye's view
 *     frustum.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_191cullPose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_6libovr_7_libovr_190cullPose[] = "cullPose(int eye, LibOVRPose pose)\nTest if a pose's bounding box or position falls outside of an eye's view\n    frustum.\n\n    Poses can be assigned bounding boxes which enclose any 3D models associated\n    with them. A model is not visible if all the corners of the bounding box\n    fall outside the viewing frustum. Therefore any primitives (i.e. triangles)\n    associated with the pose can be culled during rendering to reduce CPU/GPU\n    workload.\n\n    If `pose` does not have a valid bounding box (:py:class:`LibOVRBounds`)\n    assigned to its :py:attr:`~LibOVRPose.bounds` attribute, this function will\n    test is if the position of `pose` is outside the view frustum.\n\n    Parameters\n    ----------\n    eye : int\n        Eye index. Use either ``EYE_LEFT`` or ``EYE_RIGHT``.\n    pose : LibOVRPose\n        Pose to test.\n\n    Returns\n    -------\n    bool\n        ``True`` if the pose's bounding box is not visible to the given `eye`\n        and should be culled during rendering.\n\n    Examples\n    --------\n    Check if a pose should be culled (needs to be done for each eye)::\n\n        cullModel = cullPose(eye, pose)\n        if not cullModel:\n            # ... OpenGL calls to draw the model here ...\n\n    Notes\n    -----\n    * Frustums used for testing are defined by the current render FOV for the\n      eye (see: :func:`getEyeRenderFov` and :func:`getEyeSetFov`).\n    * This function does not test if an object is occluded by another within the\n      frustum. If an object is completely occluded, it will still be fully\n      rendered, and nearer object will be drawn on-top of it. A trick to\n      improve performance in this case is to use ``glDepthFunc(GL_LEQUAL)`` with\n      ``glEnable(GL_DEPTH_TEST)`` and render objects from nearest to farthest\n      from the head pose. This will reject fragment color calculations for\n      occluded locations.\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_6libovr_7_libovr_191cullPose = {"cullPose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_191cullPose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_190cullPose};
static PyObject *__pyx_pw_7psychxr_6libovr_7_libovr_191cullPose(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_pose = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cullPose (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_pose,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pose)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cullPose", 1, 2, 2, 1); __PYX_ERR(0, 7878, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cullPose") < 0)) __PYX_ERR(0, 7878, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7878, __pyx_L3_error)
    __pyx_v_pose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cullPose", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7878, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.libovr._libovr.cullPose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pose), __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose, 1, "pose", 0))) __PYX_ERR(0, 7878, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_6libovr_7_libovr_190cullPose(__pyx_self, __pyx_v_eye, __pyx_v_pose);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7psychxr_6libovr_7_libovr_190cullPose(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *__pyx_v_pose) {
  OVR::Bounds3f *__pyx_v_bbox;
  OVR::Vector4f __pyx_v_test_point;
  OVR::Vector4f __pyx_v_corners[8];
  Py_ssize_t __pyx_v_i;
  OVR::Matrix4f __pyx_v_mvp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  OVR::Bounds3f *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  float __pyx_t_6;
  float __pyx_t_7;
  float __pyx_t_8;
  OVR::Vector4f __pyx_t_9;
  __Pyx_RefNannySetupContext("cullPose", 0);

  /* "psychxr/libovr/_libovr.pyx":7937
 *     # compute the MVP matrix to transform poses into HCS
 *     cdef libovr_math.Matrix4f mvp = \
 *         _eyeViewProjectionMatrix[eye] * \             # <<<<<<<<<<<<<<
 *         libovr_math.Matrix4f(<libovr_math.Posef>pose.c_data[0])
 * 
 */
  __pyx_v_mvp = ((__pyx_v_7psychxr_6libovr_7_libovr__eyeViewProjectionMatrix[__pyx_v_eye]) * OVR::Matrix4f(((OVR::Posef)(__pyx_v_pose->c_data[0]))));

  /* "psychxr/libovr/_libovr.pyx":7940
 *         libovr_math.Matrix4f(<libovr_math.Posef>pose.c_data[0])
 * 
 *     if pose.bounds is not None:             # <<<<<<<<<<<<<<
 *         # has a bounding box
 *         bbox = pose._bbox.c_data
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pose), __pyx_n_s_bounds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "psychxr/libovr/_libovr.pyx":7942
 *     if pose.bounds is not None:
 *         # has a bounding box
 *         bbox = pose._bbox.c_data             # <<<<<<<<<<<<<<
 * 
 *         # bounding box is cleared/not valid, don't cull
 */
    __pyx_t_4 = __pyx_v_pose->_bbox->c_data;
    __pyx_v_bbox = __pyx_t_4;

    /* "psychxr/libovr/_libovr.pyx":7945
 * 
 *         # bounding box is cleared/not valid, don't cull
 *         if bbox.b[1].x <= bbox.b[0].x and \             # <<<<<<<<<<<<<<
 *                 bbox.b[1].y <= bbox.b[0].y and \
 *                 bbox.b[1].z <= bbox.b[0].z:
 */
    __pyx_t_2 = (((__pyx_v_bbox->b[1]).x <= (__pyx_v_bbox->b[0]).x) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "psychxr/libovr/_libovr.pyx":7946
 *         # bounding box is cleared/not valid, don't cull
 *         if bbox.b[1].x <= bbox.b[0].x and \
 *                 bbox.b[1].y <= bbox.b[0].y and \             # <<<<<<<<<<<<<<
 *                 bbox.b[1].z <= bbox.b[0].z:
 *             return False
 */
    __pyx_t_2 = (((__pyx_v_bbox->b[1]).y <= (__pyx_v_bbox->b[0]).y) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "psychxr/libovr/_libovr.pyx":7947
 *         if bbox.b[1].x <= bbox.b[0].x and \
 *                 bbox.b[1].y <= bbox.b[0].y and \
 *                 bbox.b[1].z <= bbox.b[0].z:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_2 = (((__pyx_v_bbox->b[1]).z <= (__pyx_v_bbox->b[0]).z) != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;

    /* "psychxr/libovr/_libovr.pyx":7945
 * 
 *         # bounding box is cleared/not valid, don't cull
 *         if bbox.b[1].x <= bbox.b[0].x and \             # <<<<<<<<<<<<<<
 *                 bbox.b[1].y <= bbox.b[0].y and \
 *                 bbox.b[1].z <= bbox.b[0].z:
 */
    if (__pyx_t_3) {

      /* "psychxr/libovr/_libovr.pyx":7948
 *                 bbox.b[1].y <= bbox.b[0].y and \
 *                 bbox.b[1].z <= bbox.b[0].z:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         # compute the corners of the bounding box
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

      /* "psychxr/libovr/_libovr.pyx":7945
 * 
 *         # bounding box is cleared/not valid, don't cull
 *         if bbox.b[1].x <= bbox.b[0].x and \             # <<<<<<<<<<<<<<
 *                 bbox.b[1].y <= bbox.b[0].y and \
 *                 bbox.b[1].z <= bbox.b[0].z:
 */
    }

    /* "psychxr/libovr/_libovr.pyx":7951
 * 
 *         # compute the corners of the bounding box
 *         for i in range(8):             # <<<<<<<<<<<<<<
 *             test_point = libovr_math.Vector4f(
 *                 bbox.b[1].x if (i & 1) else bbox.b[0].x,
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 8; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psychxr/libovr/_libovr.pyx":7953
 *         for i in range(8):
 *             test_point = libovr_math.Vector4f(
 *                 bbox.b[1].x if (i & 1) else bbox.b[0].x,             # <<<<<<<<<<<<<<
 *                 bbox.b[1].y if (i & 2) else bbox.b[0].y,
 *                 bbox.b[1].z if (i & 4) else bbox.b[0].z,
 */
      if (((__pyx_v_i & 1) != 0)) {
        __pyx_t_6 = (__pyx_v_bbox->b[1]).x;
      } else {
        __pyx_t_6 = (__pyx_v_bbox->b[0]).x;
      }

      /* "psychxr/libovr/_libovr.pyx":7954
 *             test_point = libovr_math.Vector4f(
 *                 bbox.b[1].x if (i & 1) else bbox.b[0].x,
 *                 bbox.b[1].y if (i & 2) else bbox.b[0].y,             # <<<<<<<<<<<<<<
 *                 bbox.b[1].z if (i & 4) else bbox.b[0].z,
 *                 1.0)
 */
      if (((__pyx_v_i & 2) != 0)) {
        __pyx_t_7 = (__pyx_v_bbox->b[1]).y;
      } else {
        __pyx_t_7 = (__pyx_v_bbox->b[0]).y;
      }

      /* "psychxr/libovr/_libovr.pyx":7955
 *                 bbox.b[1].x if (i & 1) else bbox.b[0].x,
 *                 bbox.b[1].y if (i & 2) else bbox.b[0].y,
 *                 bbox.b[1].z if (i & 4) else bbox.b[0].z,             # <<<<<<<<<<<<<<
 *                 1.0)
 *             corners[i] = mvp.Transform(test_point)
 */
      if (((__pyx_v_i & 4) != 0)) {
        __pyx_t_8 = (__pyx_v_bbox->b[1]).z;
      } else {
        __pyx_t_8 = (__pyx_v_bbox->b[0]).z;
      }

      /* "psychxr/libovr/_libovr.pyx":7952
 *         # compute the corners of the bounding box
 *         for i in range(8):
 *             test_point = libovr_math.Vector4f(             # <<<<<<<<<<<<<<
 *                 bbox.b[1].x if (i & 1) else bbox.b[0].x,
 *                 bbox.b[1].y if (i & 2) else bbox.b[0].y,
 */
      try {
        __pyx_t_9 = OVR::Vector4f(__pyx_t_6, __pyx_t_7, __pyx_t_8, 1.0);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 7952, __pyx_L1_error)
      }
      __pyx_v_test_point = __pyx_t_9;

      /* "psychxr/libovr/_libovr.pyx":7957
 *                 bbox.b[1].z if (i & 4) else bbox.b[0].z,
 *                 1.0)
 *             corners[i] = mvp.Transform(test_point)             # <<<<<<<<<<<<<<
 * 
 *         # If any of these loops exit normally, the bounding box is completely
 */
      (__pyx_v_corners[__pyx_v_i]) = __pyx_v_mvp.Transform(__pyx_v_test_point);
    }

    /* "psychxr/libovr/_libovr.pyx":7961
 *         # If any of these loops exit normally, the bounding box is completely
 *         # off to one side of the viewing frustum
 *         for i in range(8):             # <<<<<<<<<<<<<<
 *             if corners[i].x > -corners[i].w:
 *                 break
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 8; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psychxr/libovr/_libovr.pyx":7962
 *         # off to one side of the viewing frustum
 *         for i in range(8):
 *             if corners[i].x > -corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      __pyx_t_3 = (((__pyx_v_corners[__pyx_v_i]).x > (-(__pyx_v_corners[__pyx_v_i]).w)) != 0);
      if (__pyx_t_3) {

        /* "psychxr/libovr/_libovr.pyx":7963
 *         for i in range(8):
 *             if corners[i].x > -corners[i].w:
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             return True
 */
        goto __pyx_L11_break;

        /* "psychxr/libovr/_libovr.pyx":7962
 *         # off to one side of the viewing frustum
 *         for i in range(8):
 *             if corners[i].x > -corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      }
    }
    /*else*/ {

      /* "psychxr/libovr/_libovr.pyx":7965
 *                 break
 *         else:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         for i in range(8):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    __pyx_L11_break:;

    /* "psychxr/libovr/_libovr.pyx":7967
 *             return True
 * 
 *         for i in range(8):             # <<<<<<<<<<<<<<
 *             if corners[i].x < corners[i].w:
 *                 break
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 8; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psychxr/libovr/_libovr.pyx":7968
 * 
 *         for i in range(8):
 *             if corners[i].x < corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      __pyx_t_3 = (((__pyx_v_corners[__pyx_v_i]).x < (__pyx_v_corners[__pyx_v_i]).w) != 0);
      if (__pyx_t_3) {

        /* "psychxr/libovr/_libovr.pyx":7969
 *         for i in range(8):
 *             if corners[i].x < corners[i].w:
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             return True
 */
        goto __pyx_L14_break;

        /* "psychxr/libovr/_libovr.pyx":7968
 * 
 *         for i in range(8):
 *             if corners[i].x < corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      }
    }
    /*else*/ {

      /* "psychxr/libovr/_libovr.pyx":7971
 *                 break
 *         else:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         for i in range(8):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    __pyx_L14_break:;

    /* "psychxr/libovr/_libovr.pyx":7973
 *             return True
 * 
 *         for i in range(8):             # <<<<<<<<<<<<<<
 *             if corners[i].y > -corners[i].w:
 *                 break
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 8; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psychxr/libovr/_libovr.pyx":7974
 * 
 *         for i in range(8):
 *             if corners[i].y > -corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      __pyx_t_3 = (((__pyx_v_corners[__pyx_v_i]).y > (-(__pyx_v_corners[__pyx_v_i]).w)) != 0);
      if (__pyx_t_3) {

        /* "psychxr/libovr/_libovr.pyx":7975
 *         for i in range(8):
 *             if corners[i].y > -corners[i].w:
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             return True
 */
        goto __pyx_L17_break;

        /* "psychxr/libovr/_libovr.pyx":7974
 * 
 *         for i in range(8):
 *             if corners[i].y > -corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      }
    }
    /*else*/ {

      /* "psychxr/libovr/_libovr.pyx":7977
 *                 break
 *         else:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         for i in range(8):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    __pyx_L17_break:;

    /* "psychxr/libovr/_libovr.pyx":7979
 *             return True
 * 
 *         for i in range(8):             # <<<<<<<<<<<<<<
 *             if corners[i].y < corners[i].w:
 *                 break
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 8; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psychxr/libovr/_libovr.pyx":7980
 * 
 *         for i in range(8):
 *             if corners[i].y < corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      __pyx_t_3 = (((__pyx_v_corners[__pyx_v_i]).y < (__pyx_v_corners[__pyx_v_i]).w) != 0);
      if (__pyx_t_3) {

        /* "psychxr/libovr/_libovr.pyx":7981
 *         for i in range(8):
 *             if corners[i].y < corners[i].w:
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             return True
 */
        goto __pyx_L20_break;

        /* "psychxr/libovr/_libovr.pyx":7980
 * 
 *         for i in range(8):
 *             if corners[i].y < corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      }
    }
    /*else*/ {

      /* "psychxr/libovr/_libovr.pyx":7983
 *                 break
 *         else:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         for i in range(8):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    __pyx_L20_break:;

    /* "psychxr/libovr/_libovr.pyx":7985
 *             return True
 * 
 *         for i in range(8):             # <<<<<<<<<<<<<<
 *             if corners[i].z > -corners[i].w:
 *                 break
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 8; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psychxr/libovr/_libovr.pyx":7986
 * 
 *         for i in range(8):
 *             if corners[i].z > -corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      __pyx_t_3 = (((__pyx_v_corners[__pyx_v_i]).z > (-(__pyx_v_corners[__pyx_v_i]).w)) != 0);
      if (__pyx_t_3) {

        /* "psychxr/libovr/_libovr.pyx":7987
 *         for i in range(8):
 *             if corners[i].z > -corners[i].w:
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             return True
 */
        goto __pyx_L23_break;

        /* "psychxr/libovr/_libovr.pyx":7986
 * 
 *         for i in range(8):
 *             if corners[i].z > -corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      }
    }
    /*else*/ {

      /* "psychxr/libovr/_libovr.pyx":7989
 *                 break
 *         else:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         for i in range(8):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    __pyx_L23_break:;

    /* "psychxr/libovr/_libovr.pyx":7991
 *             return True
 * 
 *         for i in range(8):             # <<<<<<<<<<<<<<
 *             if corners[i].z < corners[i].w:
 *                 break
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 8; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "psychxr/libovr/_libovr.pyx":7992
 * 
 *         for i in range(8):
 *             if corners[i].z < corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      __pyx_t_3 = (((__pyx_v_corners[__pyx_v_i]).z < (__pyx_v_corners[__pyx_v_i]).w) != 0);
      if (__pyx_t_3) {

        /* "psychxr/libovr/_libovr.pyx":7993
 *         for i in range(8):
 *             if corners[i].z < corners[i].w:
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             return True
 */
        goto __pyx_L26_break;

        /* "psychxr/libovr/_libovr.pyx":7992
 * 
 *         for i in range(8):
 *             if corners[i].z < corners[i].w:             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
      }
    }
    /*else*/ {

      /* "psychxr/libovr/_libovr.pyx":7995
 *                 break
 *         else:
 *             return True             # <<<<<<<<<<<<<<
 *     else:
 *         # no bounding box, cull position of the pose
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    __pyx_L26_break:;

    /* "psychxr/libovr/_libovr.pyx":7940
 *         libovr_math.Matrix4f(<libovr_math.Posef>pose.c_data[0])
 * 
 *     if pose.bounds is not None:             # <<<<<<<<<<<<<<
 *         # has a bounding box
 *         bbox = pose._bbox.c_data
 */
    goto __pyx_L3;
  }

  /* "psychxr/libovr/_libovr.pyx":7998
 *     else:
 *         # no bounding box, cull position of the pose
 *         test_point = mvp.Transform(             # <<<<<<<<<<<<<<
 *             libovr_math.Vector4f(
 *                 pose.c_data.Position.x,
 */
  /*else*/ {

    /* "psychxr/libovr/_libovr.pyx":7999
 *         # no bounding box, cull position of the pose
 *         test_point = mvp.Transform(
 *             libovr_math.Vector4f(             # <<<<<<<<<<<<<<
 *                 pose.c_data.Position.x,
 *                 pose.c_data.Position.y,
 */
    try {
      __pyx_t_9 = OVR::Vector4f(__pyx_v_pose->c_data->Position.x, __pyx_v_pose->c_data->Position.y, __pyx_v_pose->c_data->Position.z, 1.0);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 7999, __pyx_L1_error)
    }

    /* "psychxr/libovr/_libovr.pyx":7998
 *     else:
 *         # no bounding box, cull position of the pose
 *         test_point = mvp.Transform(             # <<<<<<<<<<<<<<
 *             libovr_math.Vector4f(
 *                 pose.c_data.Position.x,
 */
    __pyx_v_test_point = __pyx_v_mvp.Transform(__pyx_t_9);

    /* "psychxr/libovr/_libovr.pyx":8005
 *                 1.0))
 * 
 *         if test_point.x <= -test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.x >= test_point.w:
 */
    __pyx_t_3 = ((__pyx_v_test_point.x <= (-__pyx_v_test_point.w)) != 0);
    if (__pyx_t_3) {

      /* "psychxr/libovr/_libovr.pyx":8006
 * 
 *         if test_point.x <= -test_point.w:
 *             return True             # <<<<<<<<<<<<<<
 *         elif test_point.x >= test_point.w:
 *             return True
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "psychxr/libovr/_libovr.pyx":8005
 *                 1.0))
 * 
 *         if test_point.x <= -test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.x >= test_point.w:
 */
    }

    /* "psychxr/libovr/_libovr.pyx":8007
 *         if test_point.x <= -test_point.w:
 *             return True
 *         elif test_point.x >= test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.y <= -test_point.w:
 */
    __pyx_t_3 = ((__pyx_v_test_point.x >= __pyx_v_test_point.w) != 0);
    if (__pyx_t_3) {

      /* "psychxr/libovr/_libovr.pyx":8008
 *             return True
 *         elif test_point.x >= test_point.w:
 *             return True             # <<<<<<<<<<<<<<
 *         elif test_point.y <= -test_point.w:
 *             return True
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "psychxr/libovr/_libovr.pyx":8007
 *         if test_point.x <= -test_point.w:
 *             return True
 *         elif test_point.x >= test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.y <= -test_point.w:
 */
    }

    /* "psychxr/libovr/_libovr.pyx":8009
 *         elif test_point.x >= test_point.w:
 *             return True
 *         elif test_point.y <= -test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.y >= test_point.w:
 */
    __pyx_t_3 = ((__pyx_v_test_point.y <= (-__pyx_v_test_point.w)) != 0);
    if (__pyx_t_3) {

      /* "psychxr/libovr/_libovr.pyx":8010
 *             return True
 *         elif test_point.y <= -test_point.w:
 *             return True             # <<<<<<<<<<<<<<
 *         elif test_point.y >= test_point.w:
 *             return True
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "psychxr/libovr/_libovr.pyx":8009
 *         elif test_point.x >= test_point.w:
 *             return True
 *         elif test_point.y <= -test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.y >= test_point.w:
 */
    }

    /* "psychxr/libovr/_libovr.pyx":8011
 *         elif test_point.y <= -test_point.w:
 *             return True
 *         elif test_point.y >= test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.z <= -test_point.w:
 */
    __pyx_t_3 = ((__pyx_v_test_point.y >= __pyx_v_test_point.w) != 0);
    if (__pyx_t_3) {

      /* "psychxr/libovr/_libovr.pyx":8012
 *             return True
 *         elif test_point.y >= test_point.w:
 *             return True             # <<<<<<<<<<<<<<
 *         elif test_point.z <= -test_point.w:
 *             return True
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "psychxr/libovr/_libovr.pyx":8011
 *         elif test_point.y <= -test_point.w:
 *             return True
 *         elif test_point.y >= test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.z <= -test_point.w:
 */
    }

    /* "psychxr/libovr/_libovr.pyx":8013
 *         elif test_point.y >= test_point.w:
 *             return True
 *         elif test_point.z <= -test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.z >= test_point.w:
 */
    __pyx_t_3 = ((__pyx_v_test_point.z <= (-__pyx_v_test_point.w)) != 0);
    if (__pyx_t_3) {

      /* "psychxr/libovr/_libovr.pyx":8014
 *             return True
 *         elif test_point.z <= -test_point.w:
 *             return True             # <<<<<<<<<<<<<<
 *         elif test_point.z >= test_point.w:
 *             return True
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "psychxr/libovr/_libovr.pyx":8013
 *         elif test_point.y >= test_point.w:
 *             return True
 *         elif test_point.z <= -test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 *         elif test_point.z >= test_point.w:
 */
    }

    /* "psychxr/libovr/_libovr.pyx":8015
 *         elif test_point.z <= -test_point.w:
 *             return True
 *         elif test_point.z >= test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
    __pyx_t_3 = ((__pyx_v_test_point.z >= __pyx_v_test_point.w) != 0);
    if (__pyx_t_3) {

      /* "psychxr/libovr/_libovr.pyx":8016
 *             return True
 *         elif test_point.z >= test_point.w:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *     return False
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "psychxr/libovr/_libovr.pyx":8015
 *         elif test_point.z <= -test_point.w:
 *             return True
 *         elif test_point.z >= test_point.w:             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
    }
  }
  __pyx_L3:;

  /* "psychxr/libovr/_libovr.pyx":8018
 *             return True
 * 
 *     return False             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "psychxr/libovr/_libovr.pyx":7878
 * 
 * 
 * def cullPose(int eye, LibOVRPose pose):             # <<<<<<<<<<<<<<
 *     """Test if a pose's bounding box or position falls outside of an eye's view
 *     frustum.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.libovr._libovr.cullPose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "libovr_capi.pxd":158
 * 
 * 
 * cdef inline int OVR_SUCCESS(ovrResult result):             # <<<<<<<<<<<<<<
 *     return result >= ovrSuccessType.ovrSuccess
 * 
 */

static CYTHON_INLINE int __pyx_f_7psychxr_6libovr_11libovr_capi_OVR_SUCCESS(ovrResult __pyx_v_result) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("OVR_SUCCESS", 0);

  /* "libovr_capi.pxd":159
 * 
 * cdef inline int OVR_SUCCESS(ovrResult result):
 *     return result >= ovrSuccessType.ovrSuccess             # <<<<<<<<<<<<<<
 * 
 * cdef inline int OVR_UNQUALIFIED_SUCCESS(ovrResult result):
 */
  __pyx_r = (__pyx_v_result >= ovrSuccess);
  goto __pyx_L0;

  /* "libovr_capi.pxd":158
 * 
 * 
 * cdef inline int OVR_SUCCESS(ovrResult result):             # <<<<<<<<<<<<<<
 *     return result >= ovrSuccessType.ovrSuccess
 * 
 */

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

/* "libovr_capi.pxd":161
 *     return result >= ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_UNQUALIFIED_SUCCESS(ovrResult result):             # <<<<<<<<<<<<<<
 *     return result == ovrSuccessType.ovrSuccess
 * 
 */

static CYTHON_INLINE int __pyx_f_7psychxr_6libovr_11libovr_capi_OVR_UNQUALIFIED_SUCCESS(ovrResult __pyx_v_result) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("OVR_UNQUALIFIED_SUCCESS", 0);

  /* "libovr_capi.pxd":162
 * 
 * cdef inline int OVR_UNQUALIFIED_SUCCESS(ovrResult result):
 *     return result == ovrSuccessType.ovrSuccess             # <<<<<<<<<<<<<<
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):
 */
  __pyx_r = (__pyx_v_result == ovrSuccess);
  goto __pyx_L0;

  /* "libovr_capi.pxd":161
 *     return result >= ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_UNQUALIFIED_SUCCESS(ovrResult result):             # <<<<<<<<<<<<<<
 *     return result == ovrSuccessType.ovrSuccess
 * 
 */

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

/* "libovr_capi.pxd":164
 *     return result == ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):             # <<<<<<<<<<<<<<
 *     return not OVR_SUCCESS(result)
 * 
 */

static CYTHON_INLINE int __pyx_f_7psychxr_6libovr_11libovr_capi_OVR_FAILURE(ovrResult __pyx_v_result) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("OVR_FAILURE", 0);

  /* "libovr_capi.pxd":165
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):
 *     return not OVR_SUCCESS(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (!(__pyx_f_7psychxr_6libovr_11libovr_capi_OVR_SUCCESS(__pyx_v_result) != 0));
  goto __pyx_L0;

  /* "libovr_capi.pxd":164
 *     return result == ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):             # <<<<<<<<<<<<<<
 *     return not OVR_SUCCESS(result)
 * 
 */

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

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fulfill the PEP.
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyArray_Descr *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265
 * 
 *             cdef int i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __pyx_v_endian_detector = 1;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266
 *             cdef int i, ndim
 *             cdef int endian_detector = 1
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 * 
 *             ndim = PyArray_NDIM(self)
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *             ndim = PyArray_NDIM(self)
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *             ndim = PyArray_NDIM(self)
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  if (unlikely(__pyx_t_1)) {

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 272, __pyx_L1_error)

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *             ndim = PyArray_NDIM(self)
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  if (unlikely(__pyx_t_1)) {

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 276, __pyx_L1_error)

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 # Allocate new buffer for strides and shape info.
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __pyx_t_4 = __pyx_v_ndim;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
    goto __pyx_L9;
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
  /*else*/ {
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L9:;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 */
  __pyx_v_info->suboffsets = NULL;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = <dtype>PyArray_DESCR(self)
 *             cdef int offset
 */
  __pyx_v_f = NULL;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
 *             cdef int offset
 * 
 */
  __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
  __pyx_t_3 = ((PyObject *)__pyx_t_7);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300
 *             cdef int offset
 * 
 *             info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not PyDataType_HASFIELDS(descr):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302
 *             info.obj = self
 * 
 *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
  if (__pyx_t_1) {

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303
 * 
 *             if not PyDataType_HASFIELDS(descr):
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 */
    __pyx_t_4 = __pyx_v_descr->type_num;
    __pyx_v_t = __pyx_t_4;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304
 *             if not PyDataType_HASFIELDS(descr):
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
    if (!__pyx_t_2) {
      goto __pyx_L15_next_or;
    } else {
    }
    __pyx_t_2 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_L15_next_or:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L14_bool_binop_done:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304
 *             if not PyDataType_HASFIELDS(descr):
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    if (unlikely(__pyx_t_1)) {

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(2, 306, __pyx_L1_error)

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304
 *             if not PyDataType_HASFIELDS(descr):
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    }

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
    switch (__pyx_v_t) {
      case NPY_BYTE:
      __pyx_v_f = ((char *)"b");
      break;
      case NPY_UBYTE:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
      __pyx_v_f = ((char *)"B");
      break;
      case NPY_SHORT:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
      __pyx_v_f = ((char *)"h");
      break;
      case NPY_USHORT:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
      __pyx_v_f = ((char *)"H");
      break;
      case NPY_INT:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
      __pyx_v_f = ((char *)"i");
      break;
      case NPY_UINT:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
      __pyx_v_f = ((char *)"I");
      break;
      case NPY_LONG:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
      __pyx_v_f = ((char *)"l");
      break;
      case NPY_ULONG:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
      __pyx_v_f = ((char *)"L");
      break;
      case NPY_LONGLONG:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
      __pyx_v_f = ((char *)"q");
      break;
      case NPY_ULONGLONG:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
      __pyx_v_f = ((char *)"Q");
      break;
      case NPY_FLOAT:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
      __pyx_v_f = ((char *)"f");
      break;
      case NPY_DOUBLE:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
      __pyx_v_f = ((char *)"d");
      break;
      case NPY_LONGDOUBLE:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
      __pyx_v_f = ((char *)"g");
      break;
      case NPY_CFLOAT:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
      __pyx_v_f = ((char *)"Zf");
      break;
      case NPY_CDOUBLE:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
      __pyx_v_f = ((char *)"Zd");
      break;
      case NPY_CLONGDOUBLE:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
      __pyx_v_f = ((char *)"Zg");
      break;
      case NPY_OBJECT:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_v_f = ((char *)"O");
      break;
      default:

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(2, 325, __pyx_L1_error)
      break;
    }

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __pyx_v_info->format = __pyx_v_f;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302
 *             info.obj = self
 * 
 *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329
 *                 return
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 */
  /*else*/ {
    __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,
 */
    (__pyx_v_info->format[0]) = '^';

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0             # <<<<<<<<<<<<<<
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 */
    __pyx_v_offset = 0;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 */
    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error)
    __pyx_v_f = __pyx_t_9;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    (__pyx_v_f[0]) = '\x00';
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fulfill the PEP.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));

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

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
  if (__pyx_t_1) {

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 PyObject_Free(info.strides)
 */
    PyObject_Free(__pyx_v_info->format);

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 PyObject_Free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    PyObject_Free(__pyx_v_info->strides);

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 */

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

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
  if (__pyx_t_1) {

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
    goto __pyx_L0;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_empty_tuple);
    __pyx_r = __pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

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

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842
 *         return ()
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  char *__pyx_t_9;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847
 * 
 *     cdef dtype child
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __pyx_v_endian_detector = 1;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848
 *     cdef dtype child
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(__pyx_v_descr->names == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(2, 851, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    if (unlikely(__pyx_v_descr->fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 852, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 */
    if (likely(__pyx_v_fields != Py_None)) {
      PyObject* sequence = __pyx_v_fields;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(2, 853, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error)
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
    if (unlikely(__pyx_t_6)) {

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(2, 856, __pyx_L1_error)

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    }

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
    if (!__pyx_t_7) {
      goto __pyx_L8_next_or;
    } else {
    }
    __pyx_t_7 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_L8_next_or:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *             raise ValueError(u"Non-native byte order not supported")
 *             # One could encode it in the format string and have Cython
 */
    __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L7_bool_binop_done:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    if (unlikely(__pyx_t_6)) {

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(2, 860, __pyx_L1_error)

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    }

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    while (1) {
      __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!__pyx_t_6) break;

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      (__pyx_v_f[0]) = 0x78;

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __pyx_t_8 = 0;
      (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
    }

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_8 = 0;
    (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
    if (__pyx_t_6) {

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
      if (unlikely(__pyx_t_6)) {

        /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(2, 880, __pyx_L1_error)

        /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x68;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x69;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x6C;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x71;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x66;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x64;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x67;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x66;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x64;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x67;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (likely(__pyx_t_6)) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L15;
      }

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(2, 901, __pyx_L1_error)
      }
      __pyx_L15:;

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
      goto __pyx_L13;
    }

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
    /*else*/ {
      __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error)
      __pyx_v_f = __pyx_t_9;
    }
    __pyx_L13:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842
 *         return ()
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_array_base", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023
 * 
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
 *     PyArray_SetBaseObject(arr, base)
 * 
 */
  Py_INCREF(__pyx_v_base);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

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

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_v_base;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
 *     if base is NULL:
 *         return None
 */
  __pyx_v_base = PyArray_BASE(__pyx_v_arr);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
  if (__pyx_t_1) {

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return <object>base
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030
 *     if base is NULL:
 *         return None
 *     return <object>base             # <<<<<<<<<<<<<<
 * 
 * # Versions of the import_* functions which are more suitable for
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_base));
  __pyx_r = ((PyObject *)__pyx_v_base);
  goto __pyx_L0;

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

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

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_array()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_array", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036
 * cdef inline int import_array() except -1:
 *     try:
 *         _import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")
 */
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error)

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037
 *     try:
 *         _import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038
 *         _import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 1038, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_array()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_umath", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error)

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 1044, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_ufunc", 0);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error)

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 1050, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":122
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

/* Python wrapper */
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shape = 0;
  Py_ssize_t __pyx_v_itemsize;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_mode = 0;
  int __pyx_v_allocate_buffer;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)__pyx_n_s_c);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 122, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 122, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 122, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_shape = ((PyObject*)values[0]);
    __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 122, __pyx_L3_error)
    __pyx_v_format = values[2];
    __pyx_v_mode = values[3];
    if (values[4]) {
      __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error)
    } else {

      /* "View.MemoryView":123
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
 *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
 * 
 *         cdef int idx
 */
      __pyx_v_allocate_buffer = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 122, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 122, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 122, __pyx_L1_error)
  }
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);

  /* "View.MemoryView":122
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_dim;
  PyObject **__pyx_v_p;
  char __pyx_v_order;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_format);

  /* "View.MemoryView":129
 *         cdef PyObject **p
 * 
 *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
 *         self.itemsize = itemsize
 * 
 */
  if (unlikely(__pyx_v_shape == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 129, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 129, __pyx_L1_error)
  __pyx_v_self->ndim = ((int)__pyx_t_1);

  /* "View.MemoryView":130
 * 
 *         self.ndim = <int> len(shape)
 *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not self.ndim:
 */
  __pyx_v_self->itemsize = __pyx_v_itemsize;

  /* "View.MemoryView":132
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":133
 * 
 *         if not self.ndim:
 *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 133, __pyx_L1_error)

    /* "View.MemoryView":132
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 */
  }

  /* "View.MemoryView":135
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 */
  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":136
 * 
 *         if itemsize <= 0:
 *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 136, __pyx_L1_error)

    /* "View.MemoryView":135
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 */
  }

  /* "View.MemoryView":138
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_4) {

    /* "View.MemoryView":139
 * 
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":138
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 */
  }

  /* "View.MemoryView":140
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
 *         self.format = self._format
 * 
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 140, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_format;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_format);
  __Pyx_DECREF(__pyx_v_self->_format);
  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":141
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (unlikely(__pyx_v_self->_format == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(1, 141, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 141, __pyx_L1_error)
  __pyx_v_self->format = __pyx_t_7;

  /* "View.MemoryView":144
 * 
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
 *         self._strides = self._shape + self.ndim
 * 
 */
  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));

  /* "View.MemoryView":145
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
 *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
 * 
 *         if not self._shape:
 */
  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);

  /* "View.MemoryView":147
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError("unable to allocate shape and strides.")
 * 
 */
  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "View.MemoryView":148
 * 
 *         if not self._shape:
 *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 148, __pyx_L1_error)

    /* "View.MemoryView":147
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError("unable to allocate shape and strides.")
 * 
 */
  }

  /* "View.MemoryView":151
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 */
  __pyx_t_8 = 0;
  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 151, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_9;
    __pyx_v_idx = __pyx_t_8;
    __pyx_t_8 = (__pyx_t_8 + 1);

    /* "View.MemoryView":152
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim
 */
    __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":153
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))             # <<<<<<<<<<<<<<
 *             self._shape[idx] = dim
 * 
 */
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
      __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(1, 153, __pyx_L1_error)

      /* "View.MemoryView":152
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim
 */
    }

    /* "View.MemoryView":154
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
 * 
 *         cdef char order
 */
    (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;

    /* "View.MemoryView":151
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":157
 * 
 *         cdef char order
 *         if mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 157, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "View.MemoryView":158
 *         cdef char order
 *         if mode == 'fortran':
 *             order = b'F'             # <<<<<<<<<<<<<<
 *             self.mode = u'fortran'
 *         elif mode == 'c':
 */
    __pyx_v_order = 'F';

    /* "View.MemoryView":159
 *         if mode == 'fortran':
 *             order = b'F'
 *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
 *         elif mode == 'c':
 *             order = b'C'
 */
    __Pyx_INCREF(__pyx_n_u_fortran);
    __Pyx_GIVEREF(__pyx_n_u_fortran);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_n_u_fortran;

    /* "View.MemoryView":157
 * 
 *         cdef char order
 *         if mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
 */
    goto __pyx_L10;
  }

  /* "View.MemoryView":160
 *             order = b'F'
 *             self.mode = u'fortran'
 *         elif mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 160, __pyx_L1_error)
  if (likely(__pyx_t_4)) {

    /* "View.MemoryView":161
 *             self.mode = u'fortran'
 *         elif mode == 'c':
 *             order = b'C'             # <<<<<<<<<<<<<<
 *             self.mode = u'c'
 *         else:
 */
    __pyx_v_order = 'C';

    /* "View.MemoryView":162
 *         elif mode == 'c':
 *             order = b'C'
 *             self.mode = u'c'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
 */
    __Pyx_INCREF(__pyx_n_u_c);
    __Pyx_GIVEREF(__pyx_n_u_c);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_n_u_c;

    /* "View.MemoryView":160
 *             order = b'F'
 *             self.mode = u'fortran'
 *         elif mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
 */
    goto __pyx_L10;
  }

  /* "View.MemoryView":164
 *             self.mode = u'c'
 *         else:
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)             # <<<<<<<<<<<<<<
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides,
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __PYX_ERR(1, 164, __pyx_L1_error)
  }
  __pyx_L10:;

  /* "View.MemoryView":166
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides,             # <<<<<<<<<<<<<<
 *                                              itemsize, self.ndim, order)
 * 
 */
  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);

  /* "View.MemoryView":169
 *                                              itemsize, self.ndim, order)
 * 
 *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:
 */
  __pyx_v_self->free_data = __pyx_v_allocate_buffer;

  /* "View.MemoryView":170
 * 
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
 *         if allocate_buffer:
 * 
 */
  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 170, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_v_self->dtype_is_object = __pyx_t_4;

  /* "View.MemoryView":171
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
  if (__pyx_t_4) {

    /* "View.MemoryView":174
 * 
 * 
 *             self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")
 */
    __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));

    /* "View.MemoryView":175
 * 
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("unable to allocate array data.")
 * 
 */
    __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":176
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
 * 
 *             if self.dtype_is_object:
 */
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(1, 176, __pyx_L1_error)

      /* "View.MemoryView":175
 * 
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("unable to allocate array data.")
 * 
 */
    }

    /* "View.MemoryView":178
 *                 raise MemoryError("unable to allocate array data.")
 * 
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 */
    __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_4) {

      /* "View.MemoryView":179
 * 
 *             if self.dtype_is_object:
 *                 p = <PyObject **> self.data             # <<<<<<<<<<<<<<
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None
 */
      __pyx_v_p = ((PyObject **)__pyx_v_self->data);

      /* "View.MemoryView":180
 *             if self.dtype_is_object:
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):             # <<<<<<<<<<<<<<
 *                     p[i] = Py_None
 *                     Py_INCREF(Py_None)
 */
      if (unlikely(__pyx_v_itemsize == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        __PYX_ERR(1, 180, __pyx_L1_error)
      }
      else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
        PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
        __PYX_ERR(1, 180, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
      __pyx_t_9 = __pyx_t_1;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "View.MemoryView":181
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None             # <<<<<<<<<<<<<<
 *                     Py_INCREF(Py_None)
 * 
 */
        (__pyx_v_p[__pyx_v_i]) = Py_None;

        /* "View.MemoryView":182
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None
 *                     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
        Py_INCREF(Py_None);
      }

      /* "View.MemoryView":178
 *                 raise MemoryError("unable to allocate array data.")
 * 
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 */
    }

    /* "View.MemoryView":171
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":122
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":185
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_bufmode;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":186
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
  __pyx_v_bufmode = -1;

  /* "View.MemoryView":187
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if self.mode == u"c":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 187, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":188
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
    __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

    /* "View.MemoryView":187
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if self.mode == u"c":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":189
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 189, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":190
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 */
    __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

    /* "View.MemoryView":189
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":191
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 */
  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":192
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 192, __pyx_L1_error)

    /* "View.MemoryView":191
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 */
  }

  /* "View.MemoryView":193
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data             # <<<<<<<<<<<<<<
 *         info.len = self.len
 *         info.ndim = self.ndim
 */
  __pyx_t_4 = __pyx_v_self->data;
  __pyx_v_info->buf = __pyx_t_4;

  /* "View.MemoryView":194
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 *         info.len = self.len             # <<<<<<<<<<<<<<
 *         info.ndim = self.ndim
 *         info.shape = self._shape
 */
  __pyx_t_5 = __pyx_v_self->len;
  __pyx_v_info->len = __pyx_t_5;

  /* "View.MemoryView":195
 *         info.buf = self.data
 *         info.len = self.len
 *         info.ndim = self.ndim             # <<<<<<<<<<<<<<
 *         info.shape = self._shape
 *         info.strides = self._strides
 */
  __pyx_t_6 = __pyx_v_self->ndim;
  __pyx_v_info->ndim = __pyx_t_6;

  /* "View.MemoryView":196
 *         info.len = self.len
 *         info.ndim = self.ndim
 *         info.shape = self._shape             # <<<<<<<<<<<<<<
 *         info.strides = self._strides
 *         info.suboffsets = NULL
 */
  __pyx_t_7 = __pyx_v_self->_shape;
  __pyx_v_info->shape = __pyx_t_7;

  /* "View.MemoryView":197
 *         info.ndim = self.ndim
 *         info.shape = self._shape
 *         info.strides = self._strides             # <<<<<<<<<<<<<<
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 */
  __pyx_t_7 = __pyx_v_self->_strides;
  __pyx_v_info->strides = __pyx_t_7;

  /* "View.MemoryView":198
 *         info.shape = self._shape
 *         info.strides = self._strides
 *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
 */
  __pyx_v_info->suboffsets = NULL;

  /* "View.MemoryView":199
 *         info.strides = self._strides
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
 *         info.readonly = 0
 * 
 */
  __pyx_t_5 = __pyx_v_self->itemsize;
  __pyx_v_info->itemsize = __pyx_t_5;

  /* "View.MemoryView":200
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 *         info.readonly = 0             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
  __pyx_v_info->readonly = 0;

  /* "View.MemoryView":202
 *         info.readonly = 0
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.format
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":203
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
 */
    __pyx_t_4 = __pyx_v_self->format;
    __pyx_v_info->format = __pyx_t_4;

    /* "View.MemoryView":202
 *         info.readonly = 0
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.format
 *         else:
 */
    goto __pyx_L5;
  }

  /* "View.MemoryView":205
 *             info.format = self.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.obj = self
 */
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L5:;

  /* "View.MemoryView":207
 *             info.format = NULL
 * 
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":185
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":211
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 */

/* Python wrapper */
static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));

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

static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":212
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 */
  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":213
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
 *         elif self.free_data:
 *             if self.dtype_is_object:
 */
    __pyx_v_self->callback_free_data(__pyx_v_self->data);

    /* "View.MemoryView":212
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":214
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,
 */
  __pyx_t_1 = (__pyx_v_self->free_data != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":215
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 */
    __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":216
 *         elif self.free_data:
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,             # <<<<<<<<<<<<<<
 *                                           self._strides, self.ndim, False)
 *             free(self.data)
 */
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);

      /* "View.MemoryView":215
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 */
    }

    /* "View.MemoryView":218
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 *             free(self.data)             # <<<<<<<<<<<<<<
 *         PyObject_Free(self._shape)
 * 
 */
    free(__pyx_v_self->data);

    /* "View.MemoryView":214
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":219
 *                                           self._strides, self.ndim, False)
 *             free(self.data)
 *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  PyObject_Free(__pyx_v_self->_shape);

  /* "View.MemoryView":211
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 */

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

/* "View.MemoryView":222
 * 
 *     @property
 *     def memview(self):             # <<<<<<<<<<<<<<
 *         return self.get_memview()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":223
 *     @property
 *     def memview(self):
 *         return self.get_memview()             # <<<<<<<<<<<<<<
 * 
 *     @cname('get_memview')
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":222
 * 
 *     @property
 *     def memview(self):             # <<<<<<<<<<<<<<
 *         return self.get_memview()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":226
 * 
 *     @cname('get_memview')
 *     cdef get_memview(self):             # <<<<<<<<<<<<<<
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)
 */

static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("get_memview", 0);

  /* "View.MemoryView":227
 *     @cname('get_memview')
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 */
  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);

  /* "View.MemoryView":228
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":226
 * 
 *     @cname('get_memview')
 *     cdef get_memview(self):             # <<<<<<<<<<<<<<
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":230
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));

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

static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "View.MemoryView":231
 * 
 *     def __len__(self):
 *         return self._shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, attr):
 */
  __pyx_r = (__pyx_v_self->_shape[0]);
  goto __pyx_L0;

  /* "View.MemoryView":230
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
 */

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

/* "View.MemoryView":233
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));

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

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "View.MemoryView":234
 * 
 *     def __getattr__(self, attr):
 *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":233
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":236
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));

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

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":237
 * 
 *     def __getitem__(self, item):
 *         return self.memview[item]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, item, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":236
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":239
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
 */

/* Python wrapper */
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));

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

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "View.MemoryView":240
 * 
 *     def __setitem__(self, item, value):
 *         self.memview[item] = value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":239
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw___pyx_array_1__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___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw___pyx_array_3__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___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__68, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":244
 * 
 * @cname("__pyx_array_new")
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
 *                           char *mode, char *buf):
 *     cdef array result
 */

static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
  struct __pyx_array_obj *__pyx_v_result = 0;
  struct __pyx_array_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("array_cwrapper", 0);

  /* "View.MemoryView":248
 *     cdef array result
 * 
 *     if buf == NULL:             # <<<<<<<<<<<<<<
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":249
 * 
 *     if buf == NULL:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))             # <<<<<<<<<<<<<<
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 */
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":248
 *     cdef array result
 * 
 *     if buf == NULL:             # <<<<<<<<<<<<<<
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":251
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
 *                        allocate_buffer=False)
 *         result.data = buf
 */
  /*else*/ {
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;

    /* "View.MemoryView":252
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 *                        allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         result.data = buf
 * 
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 252, __pyx_L1_error)

    /* "View.MemoryView":251
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
 *                        allocate_buffer=False)
 *         result.data = buf
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "View.MemoryView":253
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 *                        allocate_buffer=False)
 *         result.data = buf             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_v_result->data = __pyx_v_buf;
  }
  __pyx_L3:;

  /* "View.MemoryView":255
 *         result.data = buf
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":244
 * 
 * @cname("__pyx_array_new")
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
 *                           char *mode, char *buf):
 *     cdef array result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":281
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 281, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 281, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);

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

static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "View.MemoryView":282
 *     cdef object name
 *     def __init__(self, name):
 *         self.name = name             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return self.name
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "View.MemoryView":281
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
 */

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

/* "View.MemoryView":283
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

/* Python wrapper */
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

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

static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":284
 *         self.name = name
 *     def __repr__(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "View.MemoryView":283
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_1__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___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.name,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->name != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_184977713);
    __Pyx_GIVEREF(__pyx_int_184977713);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_184977713);
    __Pyx_GIVEREF(__pyx_int_184977713);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_3__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___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":298
 * 
 * @cname('__pyx_align_pointer')
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
 */

static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
  Py_intptr_t __pyx_v_aligned_p;
  size_t __pyx_v_offset;
  void *__pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":300
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory             # <<<<<<<<<<<<<<
 *     cdef size_t offset
 * 
 */
  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);

  /* "View.MemoryView":304
 * 
 *     with cython.cdivision(True):
 *         offset = aligned_p % alignment             # <<<<<<<<<<<<<<
 * 
 *     if offset > 0:
 */
  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);

  /* "View.MemoryView":306
 *         offset = aligned_p % alignment
 * 
 *     if offset > 0:             # <<<<<<<<<<<<<<
 *         aligned_p += alignment - offset
 * 
 */
  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":307
 * 
 *     if offset > 0:
 *         aligned_p += alignment - offset             # <<<<<<<<<<<<<<
 * 
 *     return <void *> aligned_p
 */
    __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));

    /* "View.MemoryView":306
 *         offset = aligned_p % alignment
 * 
 *     if offset > 0:             # <<<<<<<<<<<<<<
 *         aligned_p += alignment - offset
 * 
 */
  }

  /* "View.MemoryView":309
 *         aligned_p += alignment - offset
 * 
 *     return <void *> aligned_p             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((void *)__pyx_v_aligned_p);
  goto __pyx_L0;

  /* "View.MemoryView":298
 * 
 * @cname('__pyx_align_pointer')
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":345
 *     cdef __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
 */

/* Python wrapper */
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  int __pyx_v_flags;
  int __pyx_v_dtype_is_object;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 345, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 345, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error)
    } else {
      __pyx_v_dtype_is_object = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 345, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);

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

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "View.MemoryView":346
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj             # <<<<<<<<<<<<<<
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 */
  __Pyx_INCREF(__pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __Pyx_GOTREF(__pyx_v_self->obj);
  __Pyx_DECREF(__pyx_v_self->obj);
  __pyx_v_self->obj = __pyx_v_obj;

  /* "View.MemoryView":347
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj
 *         self.flags = flags             # <<<<<<<<<<<<<<
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 */
  __pyx_v_self->flags = __pyx_v_flags;

  /* "View.MemoryView":348
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_obj != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":349
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 */
    __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 349, __pyx_L1_error)

    /* "View.MemoryView":350
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
 */
    __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":351
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
 *                 Py_INCREF(Py_None)
 * 
 */
      ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;

      /* "View.MemoryView":352
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         global __pyx_memoryview_thread_locks_used
 */
      Py_INCREF(Py_None);

      /* "View.MemoryView":350
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
 */
    }

    /* "View.MemoryView":348
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 */
  }

  /* "View.MemoryView":355
 * 
 *         global __pyx_memoryview_thread_locks_used
 *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1
 */
  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":356
 *         global __pyx_memoryview_thread_locks_used
 *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
 *             __pyx_memoryview_thread_locks_used += 1
 *         if self.lock is NULL:
 */
    __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);

    /* "View.MemoryView":357
 *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
 *         if self.lock is NULL:
 *             self.lock = PyThread_allocate_lock()
 */
    __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);

    /* "View.MemoryView":355
 * 
 *         global __pyx_memoryview_thread_locks_used
 *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1
 */
  }

  /* "View.MemoryView":358
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1
 *         if self.lock is NULL:             # <<<<<<<<<<<<<<
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:
 */
  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":359
 *             __pyx_memoryview_thread_locks_used += 1
 *         if self.lock is NULL:
 *             self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
 *             if self.lock is NULL:
 *                 raise MemoryError
 */
    __pyx_v_self->lock = PyThread_allocate_lock();

    /* "View.MemoryView":360
 *         if self.lock is NULL:
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 * 
 */
    __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "View.MemoryView":361
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:
 *                 raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
      PyErr_NoMemory(); __PYX_ERR(1, 361, __pyx_L1_error)

      /* "View.MemoryView":360
 *         if self.lock is NULL:
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 * 
 */
    }

    /* "View.MemoryView":358
 *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *             __pyx_memoryview_thread_locks_used += 1
 *         if self.lock is NULL:             # <<<<<<<<<<<<<<
 *             self.lock = PyThread_allocate_lock()
 *             if self.lock is NULL:
 */
  }

  /* "View.MemoryView":363
 *                 raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":364
 * 
 *         if flags & PyBUF_FORMAT:
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
 *         else:
 *             self.dtype_is_object = dtype_is_object
 */
    __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L11_bool_binop_done:;
    __pyx_v_self->dtype_is_object = __pyx_t_1;

    /* "View.MemoryView":363
 *                 raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 */
    goto __pyx_L10;
  }

  /* "View.MemoryView":366
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
 * 
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
 */
  /*else*/ {
    __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
  }
  __pyx_L10:;

  /* "View.MemoryView":368
 *             self.dtype_is_object = dtype_is_object
 * 
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(             # <<<<<<<<<<<<<<
 *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
 *         self.typeinfo = NULL
 */
  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));

  /* "View.MemoryView":370
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
 *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
 *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(memoryview self):
 */
  __pyx_v_self->typeinfo = NULL;

  /* "View.MemoryView":345
 *     cdef __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
 */

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

/* "View.MemoryView":372
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 */

/* Python wrapper */
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
  int __pyx_v_i;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyThread_type_lock __pyx_t_6;
  PyThread_type_lock __pyx_t_7;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":373
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_ReleaseBuffer(&self.view)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":374
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
 * 
 *         cdef int i
 */
    __Pyx_ReleaseBuffer((&__pyx_v_self->view));

    /* "View.MemoryView":373
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_ReleaseBuffer(&self.view)
 * 
 */
  }

  /* "View.MemoryView":378
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 */
  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":379
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 */
    __pyx_t_3 = __pyx_memoryview_thread_locks_used;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "View.MemoryView":380
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 */
      __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":381
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 */
        __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);

        /* "View.MemoryView":382
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 */
        __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":384
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
 *                     break
 *             else:
 */
          __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
          __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);

          /* "View.MemoryView":383
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break
 */
          (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
          (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;

          /* "View.MemoryView":382
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 */
        }

        /* "View.MemoryView":385
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 PyThread_free_lock(self.lock)
 */
        goto __pyx_L6_break;

        /* "View.MemoryView":380
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 */
      }
    }
    /*else*/ {

      /* "View.MemoryView":387
 *                     break
 *             else:
 *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 */
      PyThread_free_lock(__pyx_v_self->lock);
    }
    __pyx_L6_break:;

    /* "View.MemoryView":378
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 */
  }

  /* "View.MemoryView":372
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 */

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

/* "View.MemoryView":389
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
 */

static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  Py_ssize_t __pyx_v_dim;
  char *__pyx_v_itemp;
  PyObject *__pyx_v_idx = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  char *__pyx_t_7;
  __Pyx_RefNannySetupContext("get_item_pointer", 0);

  /* "View.MemoryView":391
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
 * 
 *         for dim, idx in enumerate(index):
 */
  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);

  /* "View.MemoryView":393
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 */
  __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 393, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 393, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 393, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 393, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_1;
    __pyx_t_1 = (__pyx_t_1 + 1);

    /* "View.MemoryView":394
 * 
 *         for dim, idx in enumerate(index):
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
 * 
 *         return itemp
 */
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 394, __pyx_L1_error)
    __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 394, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_7;

    /* "View.MemoryView":393
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":396
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 *         return itemp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_itemp;
  goto __pyx_L0;

  /* "View.MemoryView":389
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":399
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_indices = NULL;
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":400
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":401
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "View.MemoryView":400
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  }

  /* "View.MemoryView":403
 *             return self
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *itemp
 */
  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(__pyx_t_3 != Py_None)) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 403, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 403, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_indices = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "View.MemoryView":406
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 406, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "View.MemoryView":407
 *         cdef char *itemp
 *         if have_slices:
 *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
 *         else:
 *             itemp = self.get_item_pointer(indices)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":406
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
 */
  }

  /* "View.MemoryView":409
 *             return memview_slice(self, indices)
 *         else:
 *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
 *             return self.convert_item_to_object(itemp)
 * 
 */
  /*else*/ {
    __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 409, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_6;

    /* "View.MemoryView":410
 *         else:
 *             itemp = self.get_item_pointer(indices)
 *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(memoryview self, object index, object value):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":399
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":412
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")
 */

/* Python wrapper */
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

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

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_obj = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "View.MemoryView":413
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 */
  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":414
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 414, __pyx_L1_error)

    /* "View.MemoryView":413
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 */
  }

  /* "View.MemoryView":416
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         if have_slices:
 */
  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 416, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 416, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":418
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 418, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "View.MemoryView":419
 * 
 *         if have_slices:
 *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
 *             if obj:
 *                 self.setitem_slice_assignment(self[index], obj)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_obj = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "View.MemoryView":420
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 420, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":421
 *             obj = self.is_slice(value)
 *             if obj:
 *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)
 */
      __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":420
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":423
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
 *         else:
 *             self.setitem_indexed(index, value)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 423, __pyx_L1_error)
      __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L5:;

    /* "View.MemoryView":418
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj:
 */
    goto __pyx_L4;
  }

  /* "View.MemoryView":425
 *                 self.setitem_slice_assign_scalar(self[index], value)
 *         else:
 *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef is_slice(self, obj):
 */
  /*else*/ {
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "View.MemoryView":412
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":427
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
 */

static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("is_slice", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "View.MemoryView":428
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":429
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "View.MemoryView":430
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
 */
        __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 430, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "View.MemoryView":431
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 return None
 */
        __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 431, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);

        /* "View.MemoryView":430
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
 */
        __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 430, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_obj);
        __Pyx_GIVEREF(__pyx_v_obj);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
        __pyx_t_6 = 0;
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 430, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "View.MemoryView":429
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "View.MemoryView":432
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 432, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_6);

        /* "View.MemoryView":433
 *                                  self.dtype_is_object)
 *             except TypeError:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *         return obj
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "View.MemoryView":429
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "View.MemoryView":428
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 */
  }

  /* "View.MemoryView":435
 *                 return None
 * 
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assignment(self, dst, src):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "View.MemoryView":427
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":437
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 */

static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
  __Pyx_memviewslice __pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_src_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);

  /* "View.MemoryView":441
 *         cdef __Pyx_memviewslice src_slice
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 */
  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 441, __pyx_L1_error)

  /* "View.MemoryView":442
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
 *                                  get_slice_from_memview(dst, &dst_slice)[0],             # <<<<<<<<<<<<<<
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 */
  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 442, __pyx_L1_error)

  /* "View.MemoryView":443
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":441
 *         cdef __Pyx_memviewslice src_slice
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 */
  __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 441, __pyx_L1_error)

  /* "View.MemoryView":437
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":445
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
 */

static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
  int __pyx_v_array[0x80];
  void *__pyx_v_tmp;
  void *__pyx_v_item;
  __Pyx_memviewslice *__pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_tmp_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  char const *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);

  /* "View.MemoryView":447
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 *         cdef int array[128]
 *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
 *         cdef void *item
 * 
 */
  __pyx_v_tmp = NULL;

  /* "View.MemoryView":452
 *         cdef __Pyx_memviewslice *dst_slice
 *         cdef __Pyx_memviewslice tmp_slice
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 */
  __pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice));

  /* "View.MemoryView":454
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 */
  __pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":455
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
 *             if tmp == NULL:
 *                 raise MemoryError
 */
    __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);

    /* "View.MemoryView":456
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
 */
    __pyx_t_1 = ((__pyx_v_tmp == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "View.MemoryView":457
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 *                 raise MemoryError             # <<<<<<<<<<<<<<
 *             item = tmp
 *         else:
 */
      PyErr_NoMemory(); __PYX_ERR(1, 457, __pyx_L1_error)

      /* "View.MemoryView":456
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
 */
    }

    /* "View.MemoryView":458
 *             if tmp == NULL:
 *                 raise MemoryError
 *             item = tmp             # <<<<<<<<<<<<<<
 *         else:
 *             item = <void *> array
 */
    __pyx_v_item = __pyx_v_tmp;

    /* "View.MemoryView":454
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":460
 *             item = tmp
 *         else:
 *             item = <void *> array             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  /*else*/ {
    __pyx_v_item = ((void *)__pyx_v_array);
  }
  __pyx_L3:;

  /* "View.MemoryView":462
 *             item = <void *> array
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value
 */
  /*try:*/ {

    /* "View.MemoryView":463
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 */
    __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":464
 *         try:
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)
 */
      (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);

      /* "View.MemoryView":463
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 */
      goto __pyx_L8;
    }

    /* "View.MemoryView":466
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L8:;

    /* "View.MemoryView":470
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 */
    __pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":471
 * 
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 *                                 item, self.dtype_is_object)
 */
      __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 471, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "View.MemoryView":470
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 */
    }

    /* "View.MemoryView":472
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
 *                                 item, self.dtype_is_object)
 *         finally:
 */
    __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
  }

  /* "View.MemoryView":475
 *                                 item, self.dtype_is_object)
 *         finally:
 *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_indexed(self, index, value):
 */
  /*finally:*/ {
    /*normal exit:*/{
      PyMem_Free(__pyx_v_tmp);
      goto __pyx_L7;
    }
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
      {
        PyMem_Free(__pyx_v_tmp);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
      __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
      goto __pyx_L1_error;
    }
    __pyx_L7:;
  }

  /* "View.MemoryView":445
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":477
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
 */

static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("setitem_indexed", 0);

  /* "View.MemoryView":478
 * 
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
 *         self.assign_item_from_object(itemp, value)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 478, __pyx_L1_error)
  __pyx_v_itemp = __pyx_t_1;

  /* "View.MemoryView":479
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":477
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":481
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_v_struct = NULL;
  PyObject *__pyx_v_bytesitem = 0;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":484
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef bytes bytesitem
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":487
 *         cdef bytes bytesitem
 * 
 *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":488
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "View.MemoryView":489
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 489, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 489, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 489, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
        __Pyx_INCREF(__pyx_v_bytesitem);
        __Pyx_GIVEREF(__pyx_v_bytesitem);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "View.MemoryView":488
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
    }

    /* "View.MemoryView":493
 *             raise ValueError("Unable to convert item to object")
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
 */
    /*else:*/ {
      __pyx_t_10 = strlen(__pyx_v_self->view.format); 
      __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
      if (__pyx_t_11) {

        /* "View.MemoryView":494
 *         else:
 *             if len(self.view.format) == 1:
 *                 return result[0]             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L6_except_return;

        /* "View.MemoryView":493
 *             raise ValueError("Unable to convert item to object")
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
 */
      }

      /* "View.MemoryView":495
 *             if len(self.view.format) == 1:
 *                 return result[0]
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L6_except_return;
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "View.MemoryView":490
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:             # <<<<<<<<<<<<<<
 *             raise ValueError("Unable to convert item to object")
 *         else:
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 490, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
    __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 490, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);

      /* "View.MemoryView":491
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 491, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(1, 491, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "View.MemoryView":488
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "View.MemoryView":481
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesitem);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":497
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_struct = NULL;
  char __pyx_v_c;
  PyObject *__pyx_v_bytesvalue = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":500
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef char c
 *         cdef bytes bytesvalue
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":505
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 */
  __pyx_t_2 = PyTuple_Check(__pyx_v_value); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "View.MemoryView":506
 * 
 *         if isinstance(value, tuple):
 *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 506, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":505
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":508
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
 * 
 *         for i, c in enumerate(bytesvalue):
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
      __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 508, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":510
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
 */
  __pyx_t_9 = 0;
  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(1, 510, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_bytesvalue);
  __pyx_t_10 = __pyx_v_bytesvalue;
  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
    __pyx_t_11 = __pyx_t_14;
    __pyx_v_c = (__pyx_t_11[0]);

    /* "View.MemoryView":511
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    __pyx_v_i = __pyx_t_9;

    /* "View.MemoryView":510
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
 */
    __pyx_t_9 = (__pyx_t_9 + 1);

    /* "View.MemoryView":511
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "View.MemoryView":497
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":514
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t *__pyx_t_4;
  char *__pyx_t_5;
  void *__pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":515
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 */
  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":516
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 516, __pyx_L1_error)

    /* "View.MemoryView":515
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 */
  }

  /* "View.MemoryView":518
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":519
 * 
 *         if flags & PyBUF_ND:
 *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
 *         else:
 *             info.shape = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.shape;
    __pyx_v_info->shape = __pyx_t_4;

    /* "View.MemoryView":518
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
 */
    goto __pyx_L6;
  }

  /* "View.MemoryView":521
 *             info.shape = self.view.shape
 *         else:
 *             info.shape = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
 */
  /*else*/ {
    __pyx_v_info->shape = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":523
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":524
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.strides = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.strides;
    __pyx_v_info->strides = __pyx_t_4;

    /* "View.MemoryView":523
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
 */
    goto __pyx_L7;
  }

  /* "View.MemoryView":526
 *             info.strides = self.view.strides
 *         else:
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_INDIRECT:
 */
  /*else*/ {
    __pyx_v_info->strides = NULL;
  }
  __pyx_L7:;

  /* "View.MemoryView":528
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":529
 * 
 *         if flags & PyBUF_INDIRECT:
 *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
 *         else:
 *             info.suboffsets = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.suboffsets;
    __pyx_v_info->suboffsets = __pyx_t_4;

    /* "View.MemoryView":528
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
 */
    goto __pyx_L8;
  }

  /* "View.MemoryView":531
 *             info.suboffsets = self.view.suboffsets
 *         else:
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
  /*else*/ {
    __pyx_v_info->suboffsets = NULL;
  }
  __pyx_L8:;

  /* "View.MemoryView":533
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":534
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.view.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
 */
    __pyx_t_5 = __pyx_v_self->view.format;
    __pyx_v_info->format = __pyx_t_5;

    /* "View.MemoryView":533
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
 */
    goto __pyx_L9;
  }

  /* "View.MemoryView":536
 *             info.format = self.view.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.buf = self.view.buf
 */
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L9:;

  /* "View.MemoryView":538
 *             info.format = NULL
 * 
 *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 */
  __pyx_t_6 = __pyx_v_self->view.buf;
  __pyx_v_info->buf = __pyx_t_6;

  /* "View.MemoryView":539
 * 
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 */
  __pyx_t_7 = __pyx_v_self->view.ndim;
  __pyx_v_info->ndim = __pyx_t_7;

  /* "View.MemoryView":540
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 */
  __pyx_t_8 = __pyx_v_self->view.itemsize;
  __pyx_v_info->itemsize = __pyx_t_8;

  /* "View.MemoryView":541
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len             # <<<<<<<<<<<<<<
 *         info.readonly = self.view.readonly
 *         info.obj = self
 */
  __pyx_t_8 = __pyx_v_self->view.len;
  __pyx_v_info->len = __pyx_t_8;

  /* "View.MemoryView":542
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
 */
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_v_info->readonly = __pyx_t_1;

  /* "View.MemoryView":543
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":514
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":549
 * 
 *     @property
 *     def T(self):             # <<<<<<<<<<<<<<
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":550
 *     @property
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&result.from_slice)
 *         return result
 */
  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 550, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":551
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 551, __pyx_L1_error)

  /* "View.MemoryView":552
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":549
 * 
 *     @property
 *     def T(self):             # <<<<<<<<<<<<<<
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":555
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":556
 *     @property
 *     def base(self):
 *         return self.obj             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->obj);
  __pyx_r = __pyx_v_self->obj;
  goto __pyx_L0;

  /* "View.MemoryView":555
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
 */

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

/* "View.MemoryView":559
 * 
 *     @property
 *     def shape(self):             # <<<<<<<<<<<<<<
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":560
 *     @property
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
    __pyx_t_2 = __pyx_t_4;
    __pyx_v_length = (__pyx_t_2[0]);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 560, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":559
 * 
 *     @property
 *     def shape(self):             # <<<<<<<<<<<<<<
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":563
 * 
 *     @property
 *     def strides(self):             # <<<<<<<<<<<<<<
 *         if self.view.strides == NULL:
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_stride;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":564
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError("Buffer view does not expose strides")
 */
  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":566
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 566, __pyx_L1_error)

    /* "View.MemoryView":564
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError("Buffer view does not expose strides")
 */
  }

  /* "View.MemoryView":568
 *             raise ValueError("Buffer view does not expose strides")
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
    __pyx_t_3 = __pyx_t_5;
    __pyx_v_stride = (__pyx_t_3[0]);
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 568, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":563
 * 
 *     @property
 *     def strides(self):             # <<<<<<<<<<<<<<
 *         if self.view.strides == NULL:
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":571
 * 
 *     @property
 *     def suboffsets(self):             # <<<<<<<<<<<<<<
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":572
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":573
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__73, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":572
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
 */
  }

  /* "View.MemoryView":575
 *             return (-1,) * self.view.ndim
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
    __pyx_t_4 = __pyx_t_6;
    __pyx_v_suboffset = (__pyx_t_4[0]);
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 575, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":571
 * 
 *     @property
 *     def suboffsets(self):             # <<<<<<<<<<<<<<
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":578
 * 
 *     @property
 *     def ndim(self):             # <<<<<<<<<<<<<<
 *         return self.view.ndim
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":579
 *     @property
 *     def ndim(self):
 *         return self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":578
 * 
 *     @property
 *     def ndim(self):             # <<<<<<<<<<<<<<
 *         return self.view.ndim
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":582
 * 
 *     @property
 *     def itemsize(self):             # <<<<<<<<<<<<<<
 *         return self.view.itemsize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":583
 *     @property
 *     def itemsize(self):
 *         return self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":582
 * 
 *     @property
 *     def itemsize(self):             # <<<<<<<<<<<<<<
 *         return self.view.itemsize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":586
 * 
 *     @property
 *     def nbytes(self):             # <<<<<<<<<<<<<<
 *         return self.size * self.view.itemsize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":587
 *     @property
 *     def nbytes(self):
 *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":586
 * 
 *     @property
 *     def nbytes(self):             # <<<<<<<<<<<<<<
 *         return self.size * self.view.itemsize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":590
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         if self._size is None:
 *             result = 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":591
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":592
 *     def size(self):
 *         if self._size is None:
 *             result = 1             # <<<<<<<<<<<<<<
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 */
    __Pyx_INCREF(__pyx_int_1);
    __pyx_v_result = __pyx_int_1;

    /* "View.MemoryView":594
 *             result = 1
 * 
 *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
 *                 result *= length
 * 
 */
    __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "View.MemoryView":595
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 *                 result *= length             # <<<<<<<<<<<<<<
 * 
 *             self._size = result
 */
      __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
      __pyx_t_6 = 0;
    }

    /* "View.MemoryView":597
 *                 result *= length
 * 
 *             self._size = result             # <<<<<<<<<<<<<<
 * 
 *         return self._size
 */
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    __Pyx_GOTREF(__pyx_v_self->_size);
    __Pyx_DECREF(__pyx_v_self->_size);
    __pyx_v_self->_size = __pyx_v_result;

    /* "View.MemoryView":591
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
 */
  }

  /* "View.MemoryView":599
 *             self._size = result
 * 
 *         return self._size             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_size);
  __pyx_r = __pyx_v_self->_size;
  goto __pyx_L0;

  /* "View.MemoryView":590
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         if self._size is None:
 *             result = 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":601
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
 */

/* Python wrapper */
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "View.MemoryView":602
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":603
 *     def __len__(self):
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         return 0
 */
    __pyx_r = (__pyx_v_self->view.shape[0]);
    goto __pyx_L0;

    /* "View.MemoryView":602
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
 */
  }

  /* "View.MemoryView":605
 *             return self.view.shape[0]
 * 
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":601
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
 */

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

/* "View.MemoryView":607
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":608
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":609
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "View.MemoryView":608
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":607
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
 */

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

/* "View.MemoryView":611
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "View.MemoryView":612
 * 
 *     def __str__(self):
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":611
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":615
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("is_c_contig", 0);

  /* "View.MemoryView":618
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 */
  __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));

  /* "View.MemoryView":619
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def is_f_contig(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":615
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":621
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("is_f_contig", 0);

  /* "View.MemoryView":624
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 */
  __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));

  /* "View.MemoryView":625
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":621
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":627
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_mslice;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "View.MemoryView":629
 *     def copy(self):
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &mslice)
 */
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));

  /* "View.MemoryView":631
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 * 
 *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
 *                                    self.view.itemsize,
 */
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));

  /* "View.MemoryView":632
 * 
 *         slice_copy(self, &mslice)
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                    self.view.itemsize,
 *                                    flags|PyBUF_C_CONTIGUOUS,
 */
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 632, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":637
 *                                    self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
 * 
 *     def copy_fortran(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":627
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":639
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("copy_fortran", 0);

  /* "View.MemoryView":641
 *     def copy_fortran(self):
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &src)
 */
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));

  /* "View.MemoryView":643
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 * 
 *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
 *                                 self.view.itemsize,
 */
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));

  /* "View.MemoryView":644
 * 
 *         slice_copy(self, &src)
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                 self.view.itemsize,
 *                                 flags|PyBUF_F_CONTIGUOUS,
 */
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 644, __pyx_L1_error)
  __pyx_v_dst = __pyx_t_1;

  /* "View.MemoryView":649
 *                                 self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":639
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_1__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___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_3__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___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":653
 * 
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 */

static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
  struct __pyx_memoryview_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);

  /* "View.MemoryView":654
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
 *     result.typeinfo = typeinfo
 *     return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_o);
  __Pyx_GIVEREF(__pyx_v_o);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":655
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_v_result->typeinfo = __pyx_v_typeinfo;

  /* "View.MemoryView":656
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_check')
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":653
 * 
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":659
 * 
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
 *     return isinstance(o, memoryview)
 * 
 */

static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("memoryview_check", 0);

  /* "View.MemoryView":660
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):
 *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
 * 
 * cdef tuple _unellipsify(object index, int ndim):
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); 
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":659
 * 
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
 *     return isinstance(o, memoryview)
 * 
 */

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

/* "View.MemoryView":662
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
 */

static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
  PyObject *__pyx_v_tup = NULL;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_have_slices;
  int __pyx_v_seen_ellipsis;
  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
  PyObject *__pyx_v_item = NULL;
  Py_ssize_t __pyx_v_nslices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("_unellipsify", 0);

  /* "View.MemoryView":667
 *     full slices.
 *     """
 *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
 *         tup = (index,)
 *     else:
 */
  __pyx_t_1 = PyTuple_Check(__pyx_v_index); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":668
 *     """
 *     if not isinstance(index, tuple):
 *         tup = (index,)             # <<<<<<<<<<<<<<
 *     else:
 *         tup = index
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
    __pyx_v_tup = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "View.MemoryView":667
 *     full slices.
 *     """
 *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
 *         tup = (index,)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":670
 *         tup = (index,)
 *     else:
 *         tup = index             # <<<<<<<<<<<<<<
 * 
 *     result = []
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_index);
    __pyx_v_tup = __pyx_v_index;
  }
  __pyx_L3:;

  /* "View.MemoryView":672
 *         tup = index
 * 
 *     result = []             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_result = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":673
 * 
 *     result = []
 *     have_slices = False             # <<<<<<<<<<<<<<
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 */
  __pyx_v_have_slices = 0;

  /* "View.MemoryView":674
 *     result = []
 *     have_slices = False
 *     seen_ellipsis = False             # <<<<<<<<<<<<<<
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 */
  __pyx_v_seen_ellipsis = 0;

  /* "View.MemoryView":675
 *     have_slices = False
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_3 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
    __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 675, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 675, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 675, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 675, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "View.MemoryView":676
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 */
    __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":677
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True
 */
      __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
      if (__pyx_t_1) {

        /* "View.MemoryView":678
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
 *                 seen_ellipsis = True
 *             else:
 */
        __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 678, __pyx_L1_error)
        __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 678, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        { Py_ssize_t __pyx_temp;
          for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
            __Pyx_INCREF(__pyx_slice__4);
            __Pyx_GIVEREF(__pyx_slice__4);
            PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__4);
          }
        }
        __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 678, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "View.MemoryView":679
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
 *             else:
 *                 result.append(slice(None))
 */
        __pyx_v_seen_ellipsis = 1;

        /* "View.MemoryView":677
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True
 */
        goto __pyx_L7;
      }

      /* "View.MemoryView":681
 *                 seen_ellipsis = True
 *             else:
 *                 result.append(slice(None))             # <<<<<<<<<<<<<<
 *             have_slices = True
 *         else:
 */
      /*else*/ {
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__4); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 681, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":682
 *             else:
 *                 result.append(slice(None))
 *             have_slices = True             # <<<<<<<<<<<<<<
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):
 */
      __pyx_v_have_slices = 1;

      /* "View.MemoryView":676
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":684
 *             have_slices = True
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 */
    /*else*/ {
      __pyx_t_2 = PySlice_Check(__pyx_v_item); 
      __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
      if (__pyx_t_10) {
      } else {
        __pyx_t_1 = __pyx_t_10;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
      __pyx_t_1 = __pyx_t_10;
      __pyx_L9_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "View.MemoryView":685
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):
 *                 raise TypeError("Cannot index with type '%s'" % type(item))             # <<<<<<<<<<<<<<
 * 
 *             have_slices = have_slices or isinstance(item, slice)
 */
        __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 685, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 685, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(__pyx_t_11, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __PYX_ERR(1, 685, __pyx_L1_error)

        /* "View.MemoryView":684
 *             have_slices = True
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 */
      }

      /* "View.MemoryView":687
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 *             have_slices = have_slices or isinstance(item, slice)             # <<<<<<<<<<<<<<
 *             result.append(item)
 * 
 */
      __pyx_t_10 = (__pyx_v_have_slices != 0);
      if (!__pyx_t_10) {
      } else {
        __pyx_t_1 = __pyx_t_10;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_10 = PySlice_Check(__pyx_v_item); 
      __pyx_t_2 = (__pyx_t_10 != 0);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L11_bool_binop_done:;
      __pyx_v_have_slices = __pyx_t_1;

      /* "View.MemoryView":688
 * 
 *             have_slices = have_slices or isinstance(item, slice)
 *             result.append(item)             # <<<<<<<<<<<<<<
 * 
 *     nslices = ndim - len(result)
 */
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 688, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "View.MemoryView":675
 *     have_slices = False
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":690
 *             result.append(item)
 * 
 *     nslices = ndim - len(result)             # <<<<<<<<<<<<<<
 *     if nslices:
 *         result.extend([slice(None)] * nslices)
 */
  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 690, __pyx_L1_error)
  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);

  /* "View.MemoryView":691
 * 
 *     nslices = ndim - len(result)
 *     if nslices:             # <<<<<<<<<<<<<<
 *         result.extend([slice(None)] * nslices)
 * 
 */
  __pyx_t_1 = (__pyx_v_nslices != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":692
 *     nslices = ndim - len(result)
 *     if nslices:
 *         result.extend([slice(None)] * nslices)             # <<<<<<<<<<<<<<
 * 
 *     return have_slices or nslices, tuple(result)
 */
    __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
        __Pyx_INCREF(__pyx_slice__4);
        __Pyx_GIVEREF(__pyx_slice__4);
        PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__4);
      }
    }
    __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "View.MemoryView":691
 * 
 *     nslices = ndim - len(result)
 *     if nslices:             # <<<<<<<<<<<<<<
 *         result.extend([slice(None)] * nslices)
 * 
 */
  }

  /* "View.MemoryView":694
 *         result.extend([slice(None)] * nslices)
 * 
 *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_have_slices) {
  } else {
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_L14_bool_binop_done:;
  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":662
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":696
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 */

static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t *__pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);

  /* "View.MemoryView":697
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")
 */
  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
    __pyx_t_1 = __pyx_t_3;
    __pyx_v_suboffset = (__pyx_t_1[0]);

    /* "View.MemoryView":698
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Indirect dimensions not supported")
 * 
 */
    __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":699
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(1, 699, __pyx_L1_error)

      /* "View.MemoryView":698
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Indirect dimensions not supported")
 * 
 */
    }
  }

  /* "View.MemoryView":696
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":706
 * 
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
 *     cdef bint negative_step
 */

static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
  int __pyx_v_new_ndim;
  int __pyx_v_suboffset_dim;
  int __pyx_v_dim;
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  __Pyx_memviewslice *__pyx_v_p_src;
  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
  __Pyx_memviewslice *__pyx_v_p_dst;
  int *__pyx_v_p_suboffset_dim;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_stop;
  Py_ssize_t __pyx_v_step;
  int __pyx_v_have_start;
  int __pyx_v_have_stop;
  int __pyx_v_have_step;
  PyObject *__pyx_v_index = NULL;
  struct __pyx_memoryview_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_memoryview_obj *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __Pyx_RefNannySetupContext("memview_slice", 0);

  /* "View.MemoryView":707
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
 *     cdef bint negative_step
 *     cdef __Pyx_memviewslice src, dst
 */
  __pyx_v_new_ndim = 0;
  __pyx_v_suboffset_dim = -1;

  /* "View.MemoryView":714
 * 
 * 
 *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
 * 
 *     cdef _memoryviewslice memviewsliceobj
 */
  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));

  /* "View.MemoryView":718
 *     cdef _memoryviewslice memviewsliceobj
 * 
 *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(1, 718, __pyx_L1_error)
    }
  }
  #endif

  /* "View.MemoryView":720
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":721
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 */
    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 721, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":722
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, &src)
 */
    __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);

    /* "View.MemoryView":720
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":724
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
 *         p_src = &src
 * 
 */
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));

    /* "View.MemoryView":725
 *     else:
 *         slice_copy(memview, &src)
 *         p_src = &src             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_p_src = (&__pyx_v_src);
  }
  __pyx_L3:;

  /* "View.MemoryView":731
 * 
 * 
 *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
 *     dst.data = p_src.data
 * 
 */
  __pyx_t_4 = __pyx_v_p_src->memview;
  __pyx_v_dst.memview = __pyx_t_4;

  /* "View.MemoryView":732
 * 
 *     dst.memview = p_src.memview
 *     dst.data = p_src.data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __pyx_v_p_src->data;
  __pyx_v_dst.data = __pyx_t_5;

  /* "View.MemoryView":737
 * 
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
 *     cdef int *p_suboffset_dim = &suboffset_dim
 *     cdef Py_ssize_t start, stop, step
 */
  __pyx_v_p_dst = (&__pyx_v_dst);

  /* "View.MemoryView":738
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst
 *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t start, stop, step
 *     cdef bint have_start, have_stop, have_step
 */
  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);

  /* "View.MemoryView":742
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             slice_memviewslice(
 */
  __pyx_t_6 = 0;
  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
    __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 742, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 742, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 742, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 742, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 742, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 742, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_v_dim = __pyx_t_6;
    __pyx_t_6 = (__pyx_t_6 + 1);

    /* "View.MemoryView":743
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 */
    __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":747
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 *                 index, 0, 0, # start, stop, step             # <<<<<<<<<<<<<<
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 */
      __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 747, __pyx_L1_error)

      /* "View.MemoryView":744
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 */
      __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 744, __pyx_L1_error)

      /* "View.MemoryView":743
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":750
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 */
    __pyx_t_2 = (__pyx_v_index == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":751
 *                 False)
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 */
      (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;

      /* "View.MemoryView":752
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1
 */
      (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;

      /* "View.MemoryView":753
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
 *             new_ndim += 1
 *         else:
 */
      (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;

      /* "View.MemoryView":754
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 *         else:
 *             start = index.start or 0
 */
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);

      /* "View.MemoryView":750
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":756
 *             new_ndim += 1
 *         else:
 *             start = index.start or 0             # <<<<<<<<<<<<<<
 *             stop = index.stop or 0
 *             step = index.step or 0
 */
    /*else*/ {
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 756, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 756, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L7_bool_binop_done:;
      __pyx_v_start = __pyx_t_10;

      /* "View.MemoryView":757
 *         else:
 *             start = index.start or 0
 *             stop = index.stop or 0             # <<<<<<<<<<<<<<
 *             step = index.step or 0
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 757, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 757, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L9_bool_binop_done:;
      __pyx_v_stop = __pyx_t_10;

      /* "View.MemoryView":758
 *             start = index.start or 0
 *             stop = index.stop or 0
 *             step = index.step or 0             # <<<<<<<<<<<<<<
 * 
 *             have_start = index.start is not None
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 758, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 758, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L11_bool_binop_done:;
      __pyx_v_step = __pyx_t_10;

      /* "View.MemoryView":760
 *             step = index.step or 0
 * 
 *             have_start = index.start is not None             # <<<<<<<<<<<<<<
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_start = __pyx_t_1;

      /* "View.MemoryView":761
 * 
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
 *             have_step = index.step is not None
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_stop = __pyx_t_1;

      /* "View.MemoryView":762
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None             # <<<<<<<<<<<<<<
 * 
 *             slice_memviewslice(
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_step = __pyx_t_1;

      /* "View.MemoryView":764
 *             have_step = index.step is not None
 * 
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 */
      __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 764, __pyx_L1_error)

      /* "View.MemoryView":770
 *                 have_start, have_stop, have_step,
 *                 True)
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
 */
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
    }
    __pyx_L6:;

    /* "View.MemoryView":742
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             slice_memviewslice(
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":772
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":773
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));

    /* "View.MemoryView":774
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_dtype_func,
 *                                     memview.dtype_is_object)
 */
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 774, __pyx_L1_error) }

    /* "View.MemoryView":775
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 *     else:
 */
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 775, __pyx_L1_error) }

    /* "View.MemoryView":773
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
 */
    __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 773, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":772
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 */
  }

  /* "View.MemoryView":778
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));

    /* "View.MemoryView":779
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
 *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "View.MemoryView":778
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
 */
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 778, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":706
 * 
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
 *     cdef bint negative_step
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":803
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')
 * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
 *         __Pyx_memviewslice *dst,
 *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
 */

static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
  Py_ssize_t __pyx_v_new_shape;
  int __pyx_v_negative_step;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "View.MemoryView":823
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
 */
  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":825
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
 */
    __pyx_t_1 = ((__pyx_v_start < 0) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":826
 * 
 *         if start < 0:
 *             start += shape             # <<<<<<<<<<<<<<
 *         if not 0 <= start < shape:
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 */
      __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

      /* "View.MemoryView":825
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
 */
    }

    /* "View.MemoryView":827
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
 */
    __pyx_t_1 = (0 <= __pyx_v_start);
    if (__pyx_t_1) {
      __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
    }
    __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":828
 *             start += shape
 *         if not 0 <= start < shape:
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
 *     else:
 * 
 */
      __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 828, __pyx_L1_error)

      /* "View.MemoryView":827
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
 */
    }

    /* "View.MemoryView":823
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":831
 *     else:
 * 
 *         negative_step = have_step != 0 and step < 0             # <<<<<<<<<<<<<<
 * 
 *         if have_step and step == 0:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_1 = ((__pyx_v_step < 0) != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L6_bool_binop_done:;
    __pyx_v_negative_step = __pyx_t_2;

    /* "View.MemoryView":833
 *         negative_step = have_step != 0 and step < 0
 * 
 *         if have_step and step == 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
 * 
 */
    __pyx_t_1 = (__pyx_v_have_step != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_1 = ((__pyx_v_step == 0) != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L9_bool_binop_done:;
    if (__pyx_t_2) {

      /* "View.MemoryView":834
 * 
 *         if have_step and step == 0:
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 834, __pyx_L1_error)

      /* "View.MemoryView":833
 *         negative_step = have_step != 0 and step < 0
 * 
 *         if have_step and step == 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
 * 
 */
    }

    /* "View.MemoryView":837
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
 */
    __pyx_t_2 = (__pyx_v_have_start != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":838
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
 */
      __pyx_t_2 = ((__pyx_v_start < 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":839
 *         if have_start:
 *             if start < 0:
 *                 start += shape             # <<<<<<<<<<<<<<
 *                 if start < 0:
 *                     start = 0
 */
        __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

        /* "View.MemoryView":840
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
 */
        __pyx_t_2 = ((__pyx_v_start < 0) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":841
 *                 start += shape
 *                 if start < 0:
 *                     start = 0             # <<<<<<<<<<<<<<
 *             elif start >= shape:
 *                 if negative_step:
 */
          __pyx_v_start = 0;

          /* "View.MemoryView":840
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
 */
        }

        /* "View.MemoryView":838
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
 */
        goto __pyx_L12;
      }

      /* "View.MemoryView":842
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
 */
      __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":843
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
 */
        __pyx_t_2 = (__pyx_v_negative_step != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":844
 *             elif start >= shape:
 *                 if negative_step:
 *                     start = shape - 1             # <<<<<<<<<<<<<<
 *                 else:
 *                     start = shape
 */
          __pyx_v_start = (__pyx_v_shape - 1);

          /* "View.MemoryView":843
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
 */
          goto __pyx_L14;
        }

        /* "View.MemoryView":846
 *                     start = shape - 1
 *                 else:
 *                     start = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
 */
        /*else*/ {
          __pyx_v_start = __pyx_v_shape;
        }
        __pyx_L14:;

        /* "View.MemoryView":842
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
 */
      }
      __pyx_L12:;

      /* "View.MemoryView":837
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
 */
      goto __pyx_L11;
    }

    /* "View.MemoryView":848
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
 */
    /*else*/ {
      __pyx_t_2 = (__pyx_v_negative_step != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":849
 *         else:
 *             if negative_step:
 *                 start = shape - 1             # <<<<<<<<<<<<<<
 *             else:
 *                 start = 0
 */
        __pyx_v_start = (__pyx_v_shape - 1);

        /* "View.MemoryView":848
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
 */
        goto __pyx_L15;
      }

      /* "View.MemoryView":851
 *                 start = shape - 1
 *             else:
 *                 start = 0             # <<<<<<<<<<<<<<
 * 
 *         if have_stop:
 */
      /*else*/ {
        __pyx_v_start = 0;
      }
      __pyx_L15:;
    }
    __pyx_L11:;

    /* "View.MemoryView":853
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
 */
    __pyx_t_2 = (__pyx_v_have_stop != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":854
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
 */
      __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":855
 *         if have_stop:
 *             if stop < 0:
 *                 stop += shape             # <<<<<<<<<<<<<<
 *                 if stop < 0:
 *                     stop = 0
 */
        __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);

        /* "View.MemoryView":856
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
 */
        __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":857
 *                 stop += shape
 *                 if stop < 0:
 *                     stop = 0             # <<<<<<<<<<<<<<
 *             elif stop > shape:
 *                 stop = shape
 */
          __pyx_v_stop = 0;

          /* "View.MemoryView":856
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
 */
        }

        /* "View.MemoryView":854
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
 */
        goto __pyx_L17;
      }

      /* "View.MemoryView":858
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
 */
      __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":859
 *                     stop = 0
 *             elif stop > shape:
 *                 stop = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
 */
        __pyx_v_stop = __pyx_v_shape;

        /* "View.MemoryView":858
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
 */
      }
      __pyx_L17:;

      /* "View.MemoryView":853
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
 */
      goto __pyx_L16;
    }

    /* "View.MemoryView":861
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
 */
    /*else*/ {
      __pyx_t_2 = (__pyx_v_negative_step != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":862
 *         else:
 *             if negative_step:
 *                 stop = -1             # <<<<<<<<<<<<<<
 *             else:
 *                 stop = shape
 */
        __pyx_v_stop = -1L;

        /* "View.MemoryView":861
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
 */
        goto __pyx_L19;
      }

      /* "View.MemoryView":864
 *                 stop = -1
 *             else:
 *                 stop = shape             # <<<<<<<<<<<<<<
 * 
 *         if not have_step:
 */
      /*else*/ {
        __pyx_v_stop = __pyx_v_shape;
      }
      __pyx_L19:;
    }
    __pyx_L16:;

    /* "View.MemoryView":866
 *                 stop = shape
 * 
 *         if not have_step:             # <<<<<<<<<<<<<<
 *             step = 1
 * 
 */
    __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":867
 * 
 *         if not have_step:
 *             step = 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_step = 1;

      /* "View.MemoryView":866
 *                 stop = shape
 * 
 *         if not have_step:             # <<<<<<<<<<<<<<
 *             step = 1
 * 
 */
    }

    /* "View.MemoryView":871
 * 
 *         with cython.cdivision(True):
 *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
 * 
 *             if (stop - start) - step * new_shape:
 */
    __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);

    /* "View.MemoryView":873
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
 */
    __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":874
 * 
 *             if (stop - start) - step * new_shape:
 *                 new_shape += 1             # <<<<<<<<<<<<<<
 * 
 *         if new_shape < 0:
 */
      __pyx_v_new_shape = (__pyx_v_new_shape + 1);

      /* "View.MemoryView":873
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
 */
    }

    /* "View.MemoryView":876
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
 */
    __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":877
 * 
 *         if new_shape < 0:
 *             new_shape = 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_new_shape = 0;

      /* "View.MemoryView":876
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
 */
    }

    /* "View.MemoryView":880
 * 
 * 
 *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset
 */
    (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);

    /* "View.MemoryView":881
 * 
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
 *         dst.suboffsets[new_ndim] = suboffset
 * 
 */
    (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;

    /* "View.MemoryView":882
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
  }
  __pyx_L3:;

  /* "View.MemoryView":885
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
 */
  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":886
 * 
 *     if suboffset_dim[0] < 0:
 *         dst.data += start * stride             # <<<<<<<<<<<<<<
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 */
    __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));

    /* "View.MemoryView":885
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
 */
    goto __pyx_L23;
  }

  /* "View.MemoryView":888
 *         dst.data += start * stride
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
 * 
 *     if suboffset >= 0:
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
    (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
  }
  __pyx_L23:;

  /* "View.MemoryView":890
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
 */
  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":891
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 */
    __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":892
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 */
      __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":893
 *         if not is_slice:
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
 */
        __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);

        /* "View.MemoryView":892
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 */
        goto __pyx_L26;
      }

      /* "View.MemoryView":895
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
 *                                      "must be indexed and not sliced", dim)
 *         else:
 */
      /*else*/ {

        /* "View.MemoryView":896
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
 *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
 *         else:
 *             suboffset_dim[0] = new_ndim
 */
        __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 895, __pyx_L1_error)
      }
      __pyx_L26:;

      /* "View.MemoryView":891
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 */
      goto __pyx_L25;
    }

    /* "View.MemoryView":898
 *                                      "must be indexed and not sliced", dim)
 *         else:
 *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
    /*else*/ {
      (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
    }
    __pyx_L25:;

    /* "View.MemoryView":890
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
 */
  }

  /* "View.MemoryView":900
 *             suboffset_dim[0] = new_ndim
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":803
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')
 * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
 *         __Pyx_memviewslice *dst,
 *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":906
 * 
 * @cname('__pyx_pybuffer_index')
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 */

static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_suboffset;
  Py_ssize_t __pyx_v_itemsize;
  char *__pyx_v_resultp;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("pybuffer_index", 0);

  /* "View.MemoryView":908
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t itemsize = view.itemsize
 *     cdef char *resultp
 */
  __pyx_v_suboffset = -1L;

  /* "View.MemoryView":909
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
 *     cdef char *resultp
 * 
 */
  __pyx_t_1 = __pyx_v_view->itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":912
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len / itemsize
 *         stride = itemsize
 */
  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":913
 * 
 *     if view.ndim == 0:
 *         shape = view.len / itemsize             # <<<<<<<<<<<<<<
 *         stride = itemsize
 *     else:
 */
    if (unlikely(__pyx_v_itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 913, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(1, 913, __pyx_L1_error)
    }
    __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);

    /* "View.MemoryView":914
 *     if view.ndim == 0:
 *         shape = view.len / itemsize
 *         stride = itemsize             # <<<<<<<<<<<<<<
 *     else:
 *         shape = view.shape[dim]
 */
    __pyx_v_stride = __pyx_v_itemsize;

    /* "View.MemoryView":912
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len / itemsize
 *         stride = itemsize
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":916
 *         stride = itemsize
 *     else:
 *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 */
  /*else*/ {
    __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);

    /* "View.MemoryView":917
 *     else:
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]
 */
    __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);

    /* "View.MemoryView":918
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
 */
    __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":919
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
 * 
 *     if index < 0:
 */
      __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);

      /* "View.MemoryView":918
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
 */
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":921
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
 */
  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":922
 * 
 *     if index < 0:
 *         index += view.shape[dim]             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 */
    __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));

    /* "View.MemoryView":923
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
    __pyx_t_2 = ((__pyx_v_index < 0) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":924
 *         index += view.shape[dim]
 *         if index < 0:
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
 * 
 *     if index >= shape:
 */
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(1, 924, __pyx_L1_error)

      /* "View.MemoryView":923
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
    }

    /* "View.MemoryView":921
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
 */
  }

  /* "View.MemoryView":926
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":927
 * 
 *     if index >= shape:
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
 * 
 *     resultp = bufp + index * stride
 */
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 927, __pyx_L1_error)

    /* "View.MemoryView":926
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
  }

  /* "View.MemoryView":929
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset
 */
  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));

  /* "View.MemoryView":930
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 */
  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":931
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
 * 
 *     return resultp
 */
    __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);

    /* "View.MemoryView":930
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 */
  }

  /* "View.MemoryView":933
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 *     return resultp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_resultp;
  goto __pyx_L0;

  /* "View.MemoryView":906
 * 
 * @cname('__pyx_pybuffer_index')
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":939
 * 
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 */

static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
  int __pyx_v_ndim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  long __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;

  /* "View.MemoryView":940
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
 *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 */
  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
  __pyx_v_ndim = __pyx_t_1;

  /* "View.MemoryView":942
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t *strides = memslice.strides
 * 
 */
  __pyx_t_2 = __pyx_v_memslice->shape;
  __pyx_v_shape = __pyx_t_2;

  /* "View.MemoryView":943
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __pyx_v_memslice->strides;
  __pyx_v_strides = __pyx_t_2;

  /* "View.MemoryView":947
 * 
 *     cdef int i, j
 *     for i in range(ndim / 2):             # <<<<<<<<<<<<<<
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 */
  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":948
 *     cdef int i, j
 *     for i in range(ndim / 2):
 *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]
 */
    __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);

    /* "View.MemoryView":949
 *     for i in range(ndim / 2):
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 */
    __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
    __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
    (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
    (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;

    /* "View.MemoryView":950
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 */
    __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
    __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
    (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
    (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;

    /* "View.MemoryView":952
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 */
    __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_7) {

      /* "View.MemoryView":953
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
 * 
 *     return 1
 */
      __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 953, __pyx_L1_error)

      /* "View.MemoryView":952
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 */
    }
  }

  /* "View.MemoryView":955
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 *     return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "View.MemoryView":939
 * 
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":972
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 */

/* Python wrapper */
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

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

static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":973
 * 
 *     def __dealloc__(self):
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 */
  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);

  /* "View.MemoryView":972
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 */

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

/* "View.MemoryView":975
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
 */

static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":976
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":977
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":976
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
 */
  }

  /* "View.MemoryView":979
 *             return self.to_object_func(itemp)
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":975
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":981
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
 */

static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":982
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":983
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)
 */
    __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 983, __pyx_L1_error)

    /* "View.MemoryView":982
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":985
 *             self.to_dtype_func(itemp, value)
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":981
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":988
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":989
 *     @property
 *     def base(self):
 *         return self.from_object             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->from_object);
  __pyx_r = __pyx_v_self->from_object;
  goto __pyx_L0;

  /* "View.MemoryView":988
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_1__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___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __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___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_3__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___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(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__78, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":995
 * 
 * @cname('__pyx_memoryview_fromslice')
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
 *                           int ndim,
 *                           object (*to_object_func)(char *),
 */

static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TypeInfo *__pyx_t_4;
  Py_buffer __pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  Py_ssize_t *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);

  /* "View.MemoryView":1003
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1004
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "View.MemoryView":1003
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "View.MemoryView":1009
 * 
 * 
 *     result = _memoryviewslice(None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     result.from_slice = memviewslice
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":1011
 *     result = _memoryviewslice(None, 0, dtype_is_object)
 * 
 *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 */
  __pyx_v_result->from_slice = __pyx_v_memviewslice;

  /* "View.MemoryView":1012
 * 
 *     result.from_slice = memviewslice
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base
 */
  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);

  /* "View.MemoryView":1014
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base             # <<<<<<<<<<<<<<
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_result->from_object);
  __Pyx_DECREF(__pyx_v_result->from_object);
  __pyx_v_result->from_object = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "View.MemoryView":1015
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base
 *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
 * 
 *     result.view = memviewslice.memview.view
 */
  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;

  /* "View.MemoryView":1017
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 */
  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
  __pyx_v_result->__pyx_base.view = __pyx_t_5;

  /* "View.MemoryView":1018
 * 
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 */
  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);

  /* "View.MemoryView":1019
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)
 */
  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;

  /* "View.MemoryView":1020
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
 *     Py_INCREF(Py_None)
 * 
 */
  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;

  /* "View.MemoryView":1021
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 */
  Py_INCREF(Py_None);

  /* "View.MemoryView":1023
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
 */
  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1024
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
 *     else:
 *         result.flags = PyBUF_RECORDS_RO
 */
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;

    /* "View.MemoryView":1023
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
 */
    goto __pyx_L4;
  }

  /* "View.MemoryView":1026
 *         result.flags = PyBUF_RECORDS
 *     else:
 *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 */
  /*else*/ {
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
  }
  __pyx_L4:;

  /* "View.MemoryView":1028
 *         result.flags = PyBUF_RECORDS_RO
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
 * 
 */
  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);

  /* "View.MemoryView":1029
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);

  /* "View.MemoryView":1032
 * 
 * 
 *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 */
  __pyx_v_result->__pyx_base.view.suboffsets = NULL;

  /* "View.MemoryView":1033
 * 
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 */
  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_v_suboffset = (__pyx_t_6[0]);

    /* "View.MemoryView":1034
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
 */
    __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":1035
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);

      /* "View.MemoryView":1036
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break             # <<<<<<<<<<<<<<
 * 
 *     result.view.len = result.view.itemsize
 */
      goto __pyx_L6_break;

      /* "View.MemoryView":1034
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
 */
    }
  }
  __pyx_L6_break:;

  /* "View.MemoryView":1038
 *             break
 * 
 *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length
 */
  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;

  /* "View.MemoryView":1039
 * 
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         result.view.len *= length
 * 
 */
  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":1040
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length             # <<<<<<<<<<<<<<
 * 
 *     result.to_object_func = to_object_func
 */
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1040, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
  }

  /* "View.MemoryView":1042
 *         result.view.len *= length
 * 
 *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
 *     result.to_dtype_func = to_dtype_func
 * 
 */
  __pyx_v_result->to_object_func = __pyx_v_to_object_func;

  /* "View.MemoryView":1043
 * 
 *     result.to_object_func = to_object_func
 *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;

  /* "View.MemoryView":1045
 *     result.to_dtype_func = to_dtype_func
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":995
 * 
 * @cname('__pyx_memoryview_fromslice')
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
 *                           int ndim,
 *                           object (*to_object_func)(char *),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1048
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
 *                                                    __Pyx_memviewslice *mslice):
 *     cdef _memoryviewslice obj
 */

static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
  __Pyx_memviewslice *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);

  /* "View.MemoryView":1051
 *                                                    __Pyx_memviewslice *mslice):
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1052
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview             # <<<<<<<<<<<<<<
 *         return &obj.from_slice
 *     else:
 */
    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1052, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":1053
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview
 *         return &obj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, mslice)
 */
    __pyx_r = (&__pyx_v_obj->from_slice);
    goto __pyx_L0;

    /* "View.MemoryView":1051
 *                                                    __Pyx_memviewslice *mslice):
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
 */
  }

  /* "View.MemoryView":1055
 *         return &obj.from_slice
 *     else:
 *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
 *         return mslice
 * 
 */
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);

    /* "View.MemoryView":1056
 *     else:
 *         slice_copy(memview, mslice)
 *         return mslice             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_slice_copy')
 */
    __pyx_r = __pyx_v_mslice;
    goto __pyx_L0;
  }

  /* "View.MemoryView":1048
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
 *                                                    __Pyx_memviewslice *mslice):
 *     cdef _memoryviewslice obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1059
 * 
 * @cname('__pyx_memoryview_slice_copy')
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
 *     cdef int dim
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 */

static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
  int __pyx_v_dim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  Py_ssize_t *__pyx_v_suboffsets;
  __Pyx_RefNannyDeclarations
  Py_ssize_t *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  __Pyx_RefNannySetupContext("slice_copy", 0);

  /* "View.MemoryView":1063
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 * 
 *     shape = memview.view.shape             # <<<<<<<<<<<<<<
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets
 */
  __pyx_t_1 = __pyx_v_memview->view.shape;
  __pyx_v_shape = __pyx_t_1;

  /* "View.MemoryView":1064
 * 
 *     shape = memview.view.shape
 *     strides = memview.view.strides             # <<<<<<<<<<<<<<
 *     suboffsets = memview.view.suboffsets
 * 
 */
  __pyx_t_1 = __pyx_v_memview->view.strides;
  __pyx_v_strides = __pyx_t_1;

  /* "View.MemoryView":1065
 *     shape = memview.view.shape
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 */
  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
  __pyx_v_suboffsets = __pyx_t_1;

  /* "View.MemoryView":1067
 *     suboffsets = memview.view.suboffsets
 * 
 *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
 *     dst.data = <char *> memview.view.buf
 * 
 */
  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);

  /* "View.MemoryView":1068
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
 * 
 *     for dim in range(memview.view.ndim):
 */
  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);

  /* "View.MemoryView":1070
 *     dst.data = <char *> memview.view.buf
 * 
 *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 */
  __pyx_t_2 = __pyx_v_memview->view.ndim;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_dim = __pyx_t_4;

    /* "View.MemoryView":1071
 * 
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 */
    (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);

    /* "View.MemoryView":1072
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
 */
    (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);

    /* "View.MemoryView":1073
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object')
 */
    if ((__pyx_v_suboffsets != 0)) {
      __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
    } else {
      __pyx_t_5 = -1L;
    }
    (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
  }

  /* "View.MemoryView":1059
 * 
 * @cname('__pyx_memoryview_slice_copy')
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
 *     cdef int dim
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 */

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

/* "View.MemoryView":1076
 * 
 * @cname('__pyx_memoryview_copy_object')
 * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 */

static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
  __Pyx_memviewslice __pyx_v_memviewslice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("memoryview_copy", 0);

  /* "View.MemoryView":1079
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
 */
  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));

  /* "View.MemoryView":1080
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)
 *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1076
 * 
 * @cname('__pyx_memoryview_copy_object')
 * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1083
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
 *     """
 *     Create a new memoryview object from a given memoryview object and slice.
 */

static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
  PyObject *(*__pyx_v_to_object_func)(char *);
  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *(*__pyx_t_3)(char *);
  int (*__pyx_t_4)(char *, PyObject *);
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);

  /* "View.MemoryView":1090
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1091
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 */
    __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
    __pyx_v_to_object_func = __pyx_t_3;

    /* "View.MemoryView":1092
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
 *     else:
 *         to_object_func = NULL
 */
    __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
    __pyx_v_to_dtype_func = __pyx_t_4;

    /* "View.MemoryView":1090
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1094
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 *         to_object_func = NULL             # <<<<<<<<<<<<<<
 *         to_dtype_func = NULL
 * 
 */
  /*else*/ {
    __pyx_v_to_object_func = NULL;

    /* "View.MemoryView":1095
 *     else:
 *         to_object_func = NULL
 *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 */
    __pyx_v_to_dtype_func = NULL;
  }
  __pyx_L3:;

  /* "View.MemoryView":1097
 *         to_dtype_func = NULL
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "View.MemoryView":1099
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1083
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
 *     """
 *     Create a new memoryview object from a given memoryview object and slice.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1105
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
 *     if arg < 0:
 *         return -arg
 */

static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
  Py_ssize_t __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":1106
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:             # <<<<<<<<<<<<<<
 *         return -arg
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1107
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:
 *         return -arg             # <<<<<<<<<<<<<<
 *     else:
 *         return arg
 */
    __pyx_r = (-__pyx_v_arg);
    goto __pyx_L0;

    /* "View.MemoryView":1106
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:             # <<<<<<<<<<<<<<
 *         return -arg
 *     else:
 */
  }

  /* "View.MemoryView":1109
 *         return -arg
 *     else:
 *         return arg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_get_best_slice_order')
 */
  /*else*/ {
    __pyx_r = __pyx_v_arg;
    goto __pyx_L0;
  }

  /* "View.MemoryView":1105
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
 *     if arg < 0:
 *         return -arg
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1112
 * 
 * @cname('__pyx_get_best_slice_order')
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Figure out the best memory access order for a given slice.
 */

static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_c_stride;
  Py_ssize_t __pyx_v_f_stride;
  char __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1117
 *     """
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t f_stride = 0
 * 
 */
  __pyx_v_c_stride = 0;

  /* "View.MemoryView":1118
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0
 *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
 */
  __pyx_v_f_stride = 0;

  /* "View.MemoryView":1120
 *     cdef Py_ssize_t f_stride = 0
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 */
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1121
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
 */
    __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1122
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1123
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
      goto __pyx_L4_break;

      /* "View.MemoryView":1121
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
 */
    }
  }
  __pyx_L4_break:;

  /* "View.MemoryView":1125
 *             break
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 */
  __pyx_t_1 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1126
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
 */
    __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1127
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1128
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 */
      goto __pyx_L7_break;

      /* "View.MemoryView":1126
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
 */
    }
  }
  __pyx_L7_break:;

  /* "View.MemoryView":1130
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
 */
  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1131
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 *         return 'C'             # <<<<<<<<<<<<<<
 *     else:
 *         return 'F'
 */
    __pyx_r = 'C';
    goto __pyx_L0;

    /* "View.MemoryView":1130
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
 */
  }

  /* "View.MemoryView":1133
 *         return 'C'
 *     else:
 *         return 'F'             # <<<<<<<<<<<<<<
 * 
 * @cython.cdivision(True)
 */
  /*else*/ {
    __pyx_r = 'F';
    goto __pyx_L0;
  }

  /* "View.MemoryView":1112
 * 
 * @cname('__pyx_get_best_slice_order')
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Figure out the best memory access order for a given slice.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1136
 * 
 * @cython.cdivision(True)
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
 *                                    char *dst_data, Py_ssize_t *dst_strides,
 *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
 */

static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
  Py_ssize_t __pyx_v_dst_extent;
  Py_ssize_t __pyx_v_src_stride;
  Py_ssize_t __pyx_v_dst_stride;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;

  /* "View.MemoryView":1143
 * 
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 */
  __pyx_v_src_extent = (__pyx_v_src_shape[0]);

  /* "View.MemoryView":1144
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 */
  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);

  /* "View.MemoryView":1145
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 */
  __pyx_v_src_stride = (__pyx_v_src_strides[0]);

  /* "View.MemoryView":1146
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
 */
  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);

  /* "View.MemoryView":1148
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 */
  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1149
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
    __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "View.MemoryView":1150
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 *        else:
 */
    __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
    if (__pyx_t_2) {
      __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
    }
    __pyx_t_3 = (__pyx_t_2 != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;

    /* "View.MemoryView":1149
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
    if (__pyx_t_1) {

      /* "View.MemoryView":1151
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
 *        else:
 *            for i in range(dst_extent):
 */
      (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));

      /* "View.MemoryView":1149
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
      goto __pyx_L4;
    }

    /* "View.MemoryView":1153
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 *        else:
 *            for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride
 */
    /*else*/ {
      __pyx_t_4 = __pyx_v_dst_extent;
      __pyx_t_5 = __pyx_t_4;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        __pyx_v_i = __pyx_t_6;

        /* "View.MemoryView":1154
 *        else:
 *            for i in range(dst_extent):
 *                memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
 *                src_data += src_stride
 *                dst_data += dst_stride
 */
        (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));

        /* "View.MemoryView":1155
 *            for i in range(dst_extent):
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride             # <<<<<<<<<<<<<<
 *                dst_data += dst_stride
 *     else:
 */
        __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

        /* "View.MemoryView":1156
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride
 *                dst_data += dst_stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(dst_extent):
 */
        __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
      }
    }
    __pyx_L4:;

    /* "View.MemoryView":1148
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1158
 *                dst_data += dst_stride
 *     else:
 *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *             _copy_strided_to_strided(src_data, src_strides + 1,
 *                                      dst_data, dst_strides + 1,
 */
  /*else*/ {
    __pyx_t_4 = __pyx_v_dst_extent;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "View.MemoryView":1159
 *     else:
 *         for i in range(dst_extent):
 *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
 *                                      dst_data, dst_strides + 1,
 *                                      src_shape + 1, dst_shape + 1,
 */
      _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);

      /* "View.MemoryView":1163
 *                                      src_shape + 1, dst_shape + 1,
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride             # <<<<<<<<<<<<<<
 *             dst_data += dst_stride
 * 
 */
      __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

      /* "View.MemoryView":1164
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride
 *             dst_data += dst_stride             # <<<<<<<<<<<<<<
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
 */
      __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1136
 * 
 * @cython.cdivision(True)
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
 *                                    char *dst_data, Py_ssize_t *dst_strides,
 *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
 */

  /* function exit code */
}

/* "View.MemoryView":1166
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 */

static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {

  /* "View.MemoryView":1169
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
 */
  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1166
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1173
 * 
 * @cname('__pyx_memoryview_slice_get_size')
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef int i
 */

static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1176
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef int i
 *     cdef Py_ssize_t size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_size = __pyx_t_1;

  /* "View.MemoryView":1178
 *     cdef Py_ssize_t size = src.memview.view.itemsize
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         size *= src.shape[i]
 * 
 */
  __pyx_t_2 = __pyx_v_ndim;
  __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;

    /* "View.MemoryView":1179
 * 
 *     for i in range(ndim):
 *         size *= src.shape[i]             # <<<<<<<<<<<<<<
 * 
 *     return size
 */
    __pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i]));
  }

  /* "View.MemoryView":1181
 *         size *= src.shape[i]
 * 
 *     return size             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_fill_contig_strides_array')
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "View.MemoryView":1173
 * 
 * @cname('__pyx_memoryview_slice_get_size')
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef int i
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1184
 * 
 * @cname('__pyx_fill_contig_strides_array')
 * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
 *                 int ndim, char order) nogil:
 */

static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1193
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
 */
  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1194
 * 
 *     if order == 'F':
 *         for idx in range(ndim):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride = stride * shape[idx]
 */
    __pyx_t_2 = __pyx_v_ndim;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_idx = __pyx_t_4;

      /* "View.MemoryView":1195
 *     if order == 'F':
 *         for idx in range(ndim):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride = stride * shape[idx]
 *     else:
 */
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1196
 *         for idx in range(ndim):
 *             strides[idx] = stride
 *             stride = stride * shape[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 */
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }

    /* "View.MemoryView":1193
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1198
 *             stride = stride * shape[idx]
 *     else:
 *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride = stride * shape[idx]
 */
  /*else*/ {
    for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
      __pyx_v_idx = __pyx_t_2;

      /* "View.MemoryView":1199
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride = stride * shape[idx]
 * 
 */
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1200
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride
 *             stride = stride * shape[idx]             # <<<<<<<<<<<<<<
 * 
 *     return stride
 */
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1202
 *             stride = stride * shape[idx]
 * 
 *     return stride             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 */
  __pyx_r = __pyx_v_stride;
  goto __pyx_L0;

  /* "View.MemoryView":1184
 * 
 * @cname('__pyx_fill_contig_strides_array')
 * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
 *                 int ndim, char order) nogil:
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1205
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                              __Pyx_memviewslice *tmpslice,
 *                              char order,
 */

static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
  int __pyx_v_i;
  void *__pyx_v_result;
  size_t __pyx_v_itemsize;
  size_t __pyx_v_size;
  void *__pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_memoryview_obj *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;

  /* "View.MemoryView":1216
 *     cdef void *result
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 */
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1217
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
 * 
 *     result = malloc(size)
 */
  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);

  /* "View.MemoryView":1219
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 *     result = malloc(size)             # <<<<<<<<<<<<<<
 *     if not result:
 *         _err(MemoryError, NULL)
 */
  __pyx_v_result = malloc(__pyx_v_size);

  /* "View.MemoryView":1220
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err(MemoryError, NULL)
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1221
 *     result = malloc(size)
 *     if not result:
 *         _err(MemoryError, NULL)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error)

    /* "View.MemoryView":1220
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err(MemoryError, NULL)
 * 
 */
  }

  /* "View.MemoryView":1224
 * 
 * 
 *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 */
  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);

  /* "View.MemoryView":1225
 * 
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 */
  __pyx_t_4 = __pyx_v_src->memview;
  __pyx_v_tmpslice->memview = __pyx_t_4;

  /* "View.MemoryView":1226
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1
 */
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1227
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
 *         tmpslice.suboffsets[i] = -1
 * 
 */
    (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);

    /* "View.MemoryView":1228
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
 */
    (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1230
 *         tmpslice.suboffsets[i] = -1
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,             # <<<<<<<<<<<<<<
 *                               ndim, order)
 * 
 */
  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));

  /* "View.MemoryView":1234
 * 
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0
 */
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1235
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
 */
    __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1236
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     if slice_is_contig(src[0], order, ndim):
 */
      (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;

      /* "View.MemoryView":1235
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
 */
    }
  }

  /* "View.MemoryView":1238
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
 */
  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1239
 * 
 *     if slice_is_contig(src[0], order, ndim):
 *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 */
    (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));

    /* "View.MemoryView":1238
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
 */
    goto __pyx_L9;
  }

  /* "View.MemoryView":1241
 *         memcpy(result, src.data, size)
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  /*else*/ {
    copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
  }
  __pyx_L9:;

  /* "View.MemoryView":1243
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":1205
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                              __Pyx_memviewslice *tmpslice,
 *                              char order,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1248
 * 
 * @cname('__pyx_memoryview_err_extents')
 * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 */

static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err_extents", 0);

  /* "View.MemoryView":1251
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 *                                                         (i, extent1, extent2))             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_dim')
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;

  /* "View.MemoryView":1250
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %             # <<<<<<<<<<<<<<
 *                                                         (i, extent1, extent2))
 * 
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __PYX_ERR(1, 1250, __pyx_L1_error)

  /* "View.MemoryView":1248
 * 
 * @cname('__pyx_memoryview_err_extents')
 * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1254
 * 
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise error(msg.decode('ascii') % dim)
 * 
 */

static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err_dim", 0);
  __Pyx_INCREF(__pyx_v_error);

  /* "View.MemoryView":1255
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
 *     raise error(msg.decode('ascii') % dim)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err')
 */
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_error);
  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 1255, __pyx_L1_error)

  /* "View.MemoryView":1254
 * 
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise error(msg.decode('ascii') % dim)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1258
 * 
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))
 */

static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err", 0);
  __Pyx_INCREF(__pyx_v_error);

  /* "View.MemoryView":1259
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:             # <<<<<<<<<<<<<<
 *         raise error(msg.decode('ascii'))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":1260
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))             # <<<<<<<<<<<<<<
 *     else:
 *         raise error
 */
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_error);
    __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 1260, __pyx_L1_error)

    /* "View.MemoryView":1259
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:             # <<<<<<<<<<<<<<
 *         raise error(msg.decode('ascii'))
 *     else:
 */
  }

  /* "View.MemoryView":1262
 *         raise error(msg.decode('ascii'))
 *     else:
 *         raise error             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_contents')
 */
  /*else*/ {
    __Pyx_Raise(__pyx_v_error, 0, 0, 0);
    __PYX_ERR(1, 1262, __pyx_L1_error)
  }

  /* "View.MemoryView":1258
 * 
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1265
 * 
 * @cname('__pyx_memoryview_copy_contents')
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice dst,
 *                                   int src_ndim, int dst_ndim,
 */

static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
  void *__pyx_v_tmpdata;
  size_t __pyx_v_itemsize;
  int __pyx_v_i;
  char __pyx_v_order;
  int __pyx_v_broadcasting;
  int __pyx_v_direct_copy;
  __Pyx_memviewslice __pyx_v_tmp;
  int __pyx_v_ndim;
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  void *__pyx_t_7;
  int __pyx_t_8;

  /* "View.MemoryView":1273
 *     Check for overlapping memory and verify the shapes.
 *     """
 *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 */
  __pyx_v_tmpdata = NULL;

  /* "View.MemoryView":1274
 *     """
 *     cdef void *tmpdata = NULL
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 */
  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1276
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False
 */
  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);

  /* "View.MemoryView":1277
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
 *     cdef bint direct_copy = False
 *     cdef __Pyx_memviewslice tmp
 */
  __pyx_v_broadcasting = 0;

  /* "View.MemoryView":1278
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
 *     cdef __Pyx_memviewslice tmp
 * 
 */
  __pyx_v_direct_copy = 0;

  /* "View.MemoryView":1281
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 */
  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1282
 * 
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 */
    __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);

    /* "View.MemoryView":1281
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1283
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 */
  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1284
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)
 */
    __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);

    /* "View.MemoryView":1283
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":1286
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
  __pyx_t_3 = __pyx_v_dst_ndim;
  __pyx_t_4 = __pyx_v_src_ndim;
  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
    __pyx_t_5 = __pyx_t_3;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_ndim = __pyx_t_5;

  /* "View.MemoryView":1288
 *     cdef int ndim = max(src_ndim, dst_ndim)
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 */
  __pyx_t_5 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_5;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1289
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 */
    __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1290
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
 */
      __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":1291
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 *                 broadcasting = True             # <<<<<<<<<<<<<<
 *                 src.strides[i] = 0
 *             else:
 */
        __pyx_v_broadcasting = 1;

        /* "View.MemoryView":1292
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 */
        (__pyx_v_src.strides[__pyx_v_i]) = 0;

        /* "View.MemoryView":1290
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
 */
        goto __pyx_L7;
      }

      /* "View.MemoryView":1294
 *                 src.strides[i] = 0
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
 * 
 *         if src.suboffsets[i] >= 0:
 */
      /*else*/ {
        __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":1289
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 */
    }

    /* "View.MemoryView":1296
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 */
    __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1297
 * 
 *         if src.suboffsets[i] >= 0:
 *             _err_dim(ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 */
      __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)

      /* "View.MemoryView":1296
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 */
    }
  }

  /* "View.MemoryView":1299
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
 */
  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1301
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
 */
    __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1302
 * 
 *         if not slice_is_contig(src, order, ndim):
 *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 */
      __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);

      /* "View.MemoryView":1301
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
 */
    }

    /* "View.MemoryView":1304
 *             order = get_best_order(&dst, ndim)
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
 *         src = tmp
 * 
 */
    __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error)
    __pyx_v_tmpdata = __pyx_t_7;

    /* "View.MemoryView":1305
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 *         src = tmp             # <<<<<<<<<<<<<<
 * 
 *     if not broadcasting:
 */
    __pyx_v_src = __pyx_v_tmp;

    /* "View.MemoryView":1299
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
 */
  }

  /* "View.MemoryView":1307
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1310
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 */
    __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1311
 * 
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 */
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);

      /* "View.MemoryView":1310
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 */
      goto __pyx_L12;
    }

    /* "View.MemoryView":1312
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 */
    __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1313
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
 * 
 *         if direct_copy:
 */
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);

      /* "View.MemoryView":1312
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 */
    }
    __pyx_L12:;

    /* "View.MemoryView":1315
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    __pyx_t_2 = (__pyx_v_direct_copy != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1317
 *         if direct_copy:
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 */
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

      /* "View.MemoryView":1318
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)
 */
      (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));

      /* "View.MemoryView":1319
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 *             free(tmpdata)
 *             return 0
 */
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

      /* "View.MemoryView":1320
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */
      free(__pyx_v_tmpdata);

      /* "View.MemoryView":1321
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "View.MemoryView":1315
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    }

    /* "View.MemoryView":1307
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":1323
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (__pyx_v_order == 'F');
  if (__pyx_t_2) {
    __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
  }
  __pyx_t_8 = (__pyx_t_2 != 0);
  if (__pyx_t_8) {

    /* "View.MemoryView":1326
 * 
 * 
 *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&dst)
 * 
 */
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1326, __pyx_L1_error)

    /* "View.MemoryView":1327
 * 
 *         transpose_memslice(&src)
 *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1327, __pyx_L1_error)

    /* "View.MemoryView":1323
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":1329
 *         transpose_memslice(&dst)
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 */
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1330
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 * 
 */
  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1331
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 * 
 *     free(tmpdata)
 */
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1333
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 * 
 *     free(tmpdata)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  free(__pyx_v_tmpdata);

  /* "View.MemoryView":1334
 * 
 *     free(tmpdata)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1265
 * 
 * @cname('__pyx_memoryview_copy_contents')
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice dst,
 *                                   int src_ndim, int dst_ndim,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1337
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
 *                             int ndim,
 *                             int ndim_other) nogil:
 */

static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
  int __pyx_v_i;
  int __pyx_v_offset;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "View.MemoryView":1341
 *                             int ndim_other) nogil:
 *     cdef int i
 *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
 */
  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);

  /* "View.MemoryView":1343
 *     cdef int offset = ndim_other - ndim
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 */
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1344
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 */
    (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);

    /* "View.MemoryView":1345
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 */
    (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);

    /* "View.MemoryView":1346
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(offset):
 */
    (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
  }

  /* "View.MemoryView":1348
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 *     for i in range(offset):             # <<<<<<<<<<<<<<
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 */
  __pyx_t_1 = __pyx_v_offset;
  __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;

    /* "View.MemoryView":1349
 * 
 *     for i in range(offset):
 *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1
 */
    (__pyx_v_mslice->shape[__pyx_v_i]) = 1;

    /* "View.MemoryView":1350
 *     for i in range(offset):
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i] = -1
 * 
 */
    (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);

    /* "View.MemoryView":1351
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1337
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
 *                             int ndim,
 *                             int ndim_other) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1359
 * 
 * @cname('__pyx_memoryview_refcount_copying')
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
 *                            int ndim, bint inc) nogil:
 * 
 */

static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
  int __pyx_t_1;

  /* "View.MemoryView":1363
 * 
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
 *                                            dst.strides, ndim, inc)
 */
  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1364
 * 
 *     if dtype_is_object:
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,             # <<<<<<<<<<<<<<
 *                                            dst.strides, ndim, inc)
 * 
 */
    __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);

    /* "View.MemoryView":1363
 * 
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
 *                                            dst.strides, ndim, inc)
 */
  }

  /* "View.MemoryView":1359
 * 
 * @cname('__pyx_memoryview_refcount_copying')
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
 *                            int ndim, bint inc) nogil:
 * 
 */

  /* function exit code */
}

/* "View.MemoryView":1368
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 */

static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  __Pyx_RefNannyDeclarations
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);

  /* "View.MemoryView":1371
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 */
  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);

  /* "View.MemoryView":1368
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "View.MemoryView":1374
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                     Py_ssize_t *strides, int ndim, bint inc):
 *     cdef Py_ssize_t i
 */

static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);

  /* "View.MemoryView":1378
 *     cdef Py_ssize_t i
 * 
 *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
 *         if ndim == 1:
 *             if inc:
 */
  __pyx_t_1 = (__pyx_v_shape[0]);
  __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;

    /* "View.MemoryView":1379
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
 */
    __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
    if (__pyx_t_4) {

      /* "View.MemoryView":1380
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 */
      __pyx_t_4 = (__pyx_v_inc != 0);
      if (__pyx_t_4) {

        /* "View.MemoryView":1381
 *         if ndim == 1:
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])
 */
        Py_INCREF((((PyObject **)__pyx_v_data)[0]));

        /* "View.MemoryView":1380
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 */
        goto __pyx_L6;
      }

      /* "View.MemoryView":1383
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,
 */
      /*else*/ {
        Py_DECREF((((PyObject **)__pyx_v_data)[0]));
      }
      __pyx_L6:;

      /* "View.MemoryView":1379
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":1385
 *                 Py_DECREF((<PyObject **> data)[0])
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
 *                                       ndim - 1, inc)
 * 
 */
    /*else*/ {

      /* "View.MemoryView":1386
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,
 *                                       ndim - 1, inc)             # <<<<<<<<<<<<<<
 * 
 *         data += strides[0]
 */
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
    }
    __pyx_L5:;

    /* "View.MemoryView":1388
 *                                       ndim - 1, inc)
 * 
 *         data += strides[0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
  }

  /* "View.MemoryView":1374
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                     Py_ssize_t *strides, int ndim, bint inc):
 *     cdef Py_ssize_t i
 */

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

/* "View.MemoryView":1394
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 */

static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {

  /* "View.MemoryView":1397
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
 *                          itemsize, item)
 */
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1398
 *                               bint dtype_is_object) nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,             # <<<<<<<<<<<<<<
 *                          itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, True)
 */
  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);

  /* "View.MemoryView":1400
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
 *                          itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1394
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1404
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                               Py_ssize_t *strides, int ndim,
 *                               size_t itemsize, void *item) nogil:
 */

static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_extent;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;

  /* "View.MemoryView":1408
 *                               size_t itemsize, void *item) nogil:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t extent = shape[0]
 * 
 */
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1409
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]
 *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
 */
  __pyx_v_extent = (__pyx_v_shape[0]);

  /* "View.MemoryView":1411
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 */
  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1412
 * 
 *     if ndim == 1:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             memcpy(data, item, itemsize)
 *             data += stride
 */
    __pyx_t_2 = __pyx_v_extent;
    __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;

      /* "View.MemoryView":1413
 *     if ndim == 1:
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
 *             data += stride
 *     else:
 */
      (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));

      /* "View.MemoryView":1414
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 *             data += stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(extent):
 */
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }

    /* "View.MemoryView":1411
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1416
 *             data += stride
 *     else:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             _slice_assign_scalar(data, shape + 1, strides + 1,
 *                                 ndim - 1, itemsize, item)
 */
  /*else*/ {
    __pyx_t_2 = __pyx_v_extent;
    __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;

      /* "View.MemoryView":1417
 *     else:
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
 *                                 ndim - 1, itemsize, item)
 *             data += stride
 */
      __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);

      /* "View.MemoryView":1419
 *             _slice_assign_scalar(data, shape + 1, strides + 1,
 *                                 ndim - 1, itemsize, item)
 *             data += stride             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1404
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                               Py_ssize_t *strides, int ndim,
 *                               size_t itemsize, void *item) nogil:
 */

  /* function exit code */
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb068931:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xb068931:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPose __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPose;

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPose(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *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_7psychxr_6libovr_7_libovr_LibOVRPose *)o);
  p->__pyx_vtab = __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose;
  p->_pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_ori = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_bbox = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRPose(PyObject *o) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_5__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_pos);
  Py_CLEAR(p->_ori);
  Py_CLEAR(p->_bbox);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRPose(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)o;
  if (p->_pos) {
    e = (*v)(((PyObject *)p->_pos), a); if (e) return e;
  }
  if (p->_ori) {
    e = (*v)(((PyObject *)p->_ori), a); if (e) return e;
  }
  if (p->_bbox) {
    e = (*v)(((PyObject *)p->_bbox), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRPose(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)o;
  tmp = ((PyObject*)p->_pos);
  p->_pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_ori);
  p->_ori = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_bbox);
  p->_bbox = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_richcompare_7psychxr_6libovr_7_libovr_LibOVRPose(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_13__eq__(o1, o2);
    }
    case Py_NE: {
      return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_15__ne__(o1, o2);
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_bounds(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_10LibOVRPose_bounds(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6bounds_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_10LibOVRPose_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3pos_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_ori(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_10LibOVRPose_ori(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_3ori_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_posOri(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_10LibOVRPose_posOri(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_6posOri_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_at(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_2at_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_up(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_2up_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_modelMatrix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_11modelMatrix_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_inverseModelMatrix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_18inverseModelMatrix_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRPose[] = {
  {"__deepcopy__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_17__deepcopy__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_16__deepcopy__},
  {"isEqual", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_19isEqual, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_18isEqual},
  {"duplicate", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_21duplicate, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_20duplicate},
  {"setIdentity", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_25setIdentity, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_24setIdentity},
  {"getPos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_27getPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_26getPos},
  {"setPos", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_29setPos, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_28setPos},
  {"getOri", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_31getOri, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_30getOri},
  {"setOri", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_33setOri, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_32setOri},
  {"getAt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_35getAt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_34getAt},
  {"getUp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_37getUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_36getUp},
  {"getOriAxisAngle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_39getOriAxisAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_38getOriAxisAngle},
  {"setOriAxisAngle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_41setOriAxisAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_40setOriAxisAngle},
  {"getYawPitchRoll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_43getYawPitchRoll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_42getYawPitchRoll},
  {"getOriAngle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_45getOriAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_44getOriAngle},
  {"alignTo", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_47alignTo, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_46alignTo},
  {"getSwingTwist", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_49getSwingTwist, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_48getSwingTwist},
  {"getAngleTo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_51getAngleTo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_50getAngleTo},
  {"getAzimuthElevation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_53getAzimuthElevation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_52getAzimuthElevation},
  {"getModelMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_55getModelMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_54getModelMatrix},
  {"getViewMatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_57getViewMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_56getViewMatrix},
  {"normalize", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_59normalize, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_58normalize},
  {"invert", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_61invert, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_60invert},
  {"inverted", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_63inverted, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_62inverted},
  {"rotate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_65rotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_64rotate},
  {"inverseRotate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_67inverseRotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_66inverseRotate},
  {"translate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_69translate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_68translate},
  {"transform", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_71transform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_70transform},
  {"inverseTransform", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_73inverseTransform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_72inverseTransform},
  {"transformNormal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_75transformNormal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_74transformNormal},
  {"inverseTransformNormal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_77inverseTransformNormal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_76inverseTransformNormal},
  {"apply", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_79apply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_78apply},
  {"distanceTo", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_81distanceTo, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_80distanceTo},
  {"raycastSphere", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_83raycastSphere, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_82raycastSphere},
  {"interp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_85interp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_84interp},
  {"isVisible", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_87isVisible, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_86isVisible},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_89__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_88__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_91__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_90__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRPose[] = {
  {(char *)"bounds", __pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_bounds, __pyx_setprop_7psychxr_6libovr_7_libovr_10LibOVRPose_bounds, (char *)"Bounding object associated with this pose.", 0},
  {(char *)"pos", __pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_pos, __pyx_setprop_7psychxr_6libovr_7_libovr_10LibOVRPose_pos, (char *)"ndarray : Position vector [X, Y, Z].\n\n        Examples\n        --------\n\n        Set the position of the pose::\n\n            myPose.pos = [0., 0., -1.5]\n\n        Get the x, y, and z coordinates of a pose::\n\n            x, y, z = myPose.pos\n\n        The `ndarray` returned by `pos` directly references the position field\n        data in the pose data structure (`ovrPosef`). Updating values will\n        directly edit the values in the structure. For instance, you can specify\n        a component of a pose's position::\n\n            myPose.pos[2] = -10.0  # z = -10.0\n\n        Assigning `pos` a name will create a reference to that `ndarray` which\n        can edit values in the structure::\n\n            p = myPose.pos\n            p[1] = 1.5  # sets the Y position of 'myPose' to 1.5\n\n        ", 0},
  {(char *)"ori", __pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_ori, __pyx_setprop_7psychxr_6libovr_7_libovr_10LibOVRPose_ori, (char *)"ndarray : Orientation quaternion [X, Y, Z, W].\n        ", 0},
  {(char *)"posOri", __pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_posOri, __pyx_setprop_7psychxr_6libovr_7_libovr_10LibOVRPose_posOri, (char *)"tuple (ndarray, ndarray) : Position vector and\n        orientation quaternion.\n        ", 0},
  {(char *)"at", __pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_at, 0, (char *)"ndarray : Forward vector of this pose (-Z is forward)\n        (read-only).\n        ", 0},
  {(char *)"up", __pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_up, 0, (char *)"ndarray : Up vector of this pose (+Y is up) (read-only).", 0},
  {(char *)"modelMatrix", __pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_modelMatrix, 0, (char *)"Pose as a 4x4 homogeneous transformation matrix.", 0},
  {(char *)"inverseModelMatrix", __pyx_getprop_7psychxr_6libovr_7_libovr_10LibOVRPose_inverseModelMatrix, 0, (char *)"Pose as a 4x4 homogeneous inverse transformation matrix.", 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_LibOVRPose = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_7__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_11__invert__, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_9__imul__, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRPose", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRPose, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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*/
  &__pyx_tp_as_number_LibOVRPose, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_23__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "LibOVRPose(pos=(0., 0., 0.), ori=(0., 0., 0., 1.))\nClass for representing rigid body poses.\n\n    This class is an abstract representation of a rigid body pose, where the\n    position of the body in a scene is represented by a vector/coordinate and\n    the orientation with a quaternion. LibOVR uses poses to represent the\n    posture of tracked devices (e.g. HMD, touch controllers, etc.) and other\n    objects in a VR scene. They can be manipulated and interacted with using\n    class methods and attributes. Rigid body poses assume a right-handed\n    coordinate system (-Z is forward and +Y is up).\n\n    Poses can be manipulated using operators such as ``*``, ``~``, and ``*=``.\n    One pose can be transformed by another by multiplying them using the\n    ``*`` operator::\n\n        newPose = pose1 * pose2\n\n    The above code returns `pose2` transformed by `pose1`, putting `pose2` into\n    the reference frame of `pose1`. Using the inplace multiplication operator\n    ``*=``, you can transform a poss into another reference frame without making\n    a copy. One can get the inverse of a pose by using the ``~`` operator::\n\n        poseInverse = ~pose\n\n    Poses can be converted to 4x4 transformation matrices with `asMatrix` and\n    `getViewMatrix`. One can use these matrices when rendering to transform the\n    vertices of a model associated with the pose by passing them to OpenGL.\n\n    This class is a wrapper for the ``OVR::ovrPosef`` data structure. Fields\n    ``OVR::ovrPosef.Orientation`` and ``OVR::ovrPosef.Position`` are accessed\n    using `ndarray` proxy objects which share the same memory. Therefore, data\n    accessed and written to those objects will directly change the field values\n    of the referenced ``OVR::ovrPosef`` struct. ``OVR::ovrPosef.Orientation``\n    and ``OVR::ovrPosef.Position`` can be accessed and edited using the\n    :py:class:`~LibOVRPose.ori` and :py:class:`~LibOVRPose.pos` class\n    attributes, respectively. Methods asso""ciated with this class perform various\n    operations using the functions provided by `OVR_MATH.h\n    <https://developer.oculus.com/reference/libovr/1.37/o_v_r_math_8h/>`_, which\n    is part of the Oculus PC SDK.\n\n    Parameters\n    ----------\n    pos : array_like\n        Position vector (x, y, z).\n    ori : array_like\n        Orientation quaternion vector (x, y, z, w).\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRPose, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRPose, /*tp_clear*/
  __pyx_tp_richcompare_7psychxr_6libovr_7_libovr_LibOVRPose, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRPose, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRPose, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_10LibOVRPose_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPose, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPoseState __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPoseState;

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPoseState(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *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_7psychxr_6libovr_7_libovr_LibOVRPoseState *)o);
  p->__pyx_vtab = __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState;
  p->_thePose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None); Py_INCREF(Py_None);
  p->_linearVelocity = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_angularVelocity = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_linearAcceleration = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_angularAcceleration = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_3__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRPoseState(PyObject *o) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_5__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_thePose);
  Py_CLEAR(p->_linearVelocity);
  Py_CLEAR(p->_angularVelocity);
  Py_CLEAR(p->_linearAcceleration);
  Py_CLEAR(p->_angularAcceleration);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRPoseState(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)o;
  if (p->_thePose) {
    e = (*v)(((PyObject *)p->_thePose), a); if (e) return e;
  }
  if (p->_linearVelocity) {
    e = (*v)(((PyObject *)p->_linearVelocity), a); if (e) return e;
  }
  if (p->_angularVelocity) {
    e = (*v)(((PyObject *)p->_angularVelocity), a); if (e) return e;
  }
  if (p->_linearAcceleration) {
    e = (*v)(((PyObject *)p->_linearAcceleration), a); if (e) return e;
  }
  if (p->_angularAcceleration) {
    e = (*v)(((PyObject *)p->_angularAcceleration), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRPoseState(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)o;
  tmp = ((PyObject*)p->_thePose);
  p->_thePose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_linearVelocity);
  p->_linearVelocity = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_angularVelocity);
  p->_angularVelocity = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_linearAcceleration);
  p->_linearAcceleration = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_angularAcceleration);
  p->_angularAcceleration = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_thePose(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_thePose(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7thePose_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_angularVelocity(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_angularVelocity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15angularVelocity_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_linearVelocity(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_linearVelocity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14linearVelocity_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_angularAcceleration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_angularAcceleration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_19angularAcceleration_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_linearAcceleration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_linearAcceleration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_18linearAcceleration_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_timeInSeconds(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_timeInSeconds(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13timeInSeconds_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRPoseState[] = {
  {"__deepcopy__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_7__deepcopy__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_6__deepcopy__},
  {"duplicate", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_9duplicate, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_8duplicate},
  {"timeIntegrate", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_11timeIntegrate, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_10timeIntegrate},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_13__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_15__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState_14__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRPoseState[] = {
  {(char *)"thePose", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_thePose, __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_thePose, (char *)"Rigid body pose.", 0},
  {(char *)"angularVelocity", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_angularVelocity, __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_angularVelocity, (char *)"Angular velocity vector in radians/sec.", 0},
  {(char *)"linearVelocity", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_linearVelocity, __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_linearVelocity, (char *)"Linear velocity vector in meters/sec.", 0},
  {(char *)"angularAcceleration", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_angularAcceleration, __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_angularAcceleration, (char *)"Angular acceleration vector in radians/s^2.", 0},
  {(char *)"linearAcceleration", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_linearAcceleration, __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_linearAcceleration, (char *)"Linear acceleration vector in meters/s^2.", 0},
  {(char *)"timeInSeconds", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_timeInSeconds, __pyx_setprop_7psychxr_6libovr_7_libovr_15LibOVRPoseState_timeInSeconds, (char *)"Absolute time this data refers to in seconds.", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRPoseState", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRPoseState, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "LibOVRPoseState(thePose=None, linearVelocity=(0., 0., 0.), angularVelocity=(0., 0., 0.), linearAcceleration=(0., 0., 0.), angularAcceleration=(0., 0., 0.), double timeInSeconds=0.0)\nClass for representing rigid body poses with additional state\n    information.\n\n    Pose states contain the pose of the tracked body, but also angular and\n    linear motion derivatives experienced by the pose. The pose within a state\n    can be accessed via the :py:attr:`~psychxr.libovr.LibOVRPoseState.thePose`\n    attribute.\n\n    Velocity and acceleration for linear and angular motion can be used to\n    compute forces applied to rigid bodies and predict the future positions of\n    objects (see :py:meth:`~psychxr.libovr.LibOVRPoseState.timeIntegrate`). You\n    can create `LibOVRPoseState` objects using data from other sources, such as\n    *n*DOF IMUs for use with VR environments.\n\n    Parameters\n    ----------\n    thePose : LibOVRPose, list, tuple or None\n        Rigid body pose this state refers to. Can be a `LibOVRPose` pose\n        instance or a tuple/list of a position coordinate (x, y, z) and\n        orientation quaternion (x, y, z, w). If ``None`` the pose will be\n        initialized as an identity pose.\n    linearVelocity : array_like\n        Linear acceleration vector [vx, vy, vz] in meters/sec.\n    angularVelocity : array_like\n        Angular velocity vector [vx, vy, vz] in radians/sec.\n    linearAcceleration : array_like\n        Linear acceleration vector [ax, ay, az] in meters/sec^2.\n    angularAcceleration : array_like\n        Angular acceleration vector [ax, ay, az] in radians/sec^2.\n    timeInSeconds : float\n        Time in seconds this state refers to.\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRPoseState, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRPoseState, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRPoseState, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRPoseState, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPoseState_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPoseState, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRTrackingState __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRTrackingState;

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRTrackingState(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *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_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)o);
  p->__pyx_vtab = __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRTrackingState;
  p->_headPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)Py_None); Py_INCREF(Py_None);
  p->_leftHandPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)Py_None); Py_INCREF(Py_None);
  p->_rightHandPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)Py_None); Py_INCREF(Py_None);
  p->_calibratedOrigin = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRTrackingState(PyObject *o) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_5__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_headPoseState);
  Py_CLEAR(p->_leftHandPoseState);
  Py_CLEAR(p->_rightHandPoseState);
  Py_CLEAR(p->_calibratedOrigin);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRTrackingState(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)o;
  if (p->_headPoseState) {
    e = (*v)(((PyObject *)p->_headPoseState), a); if (e) return e;
  }
  if (p->_leftHandPoseState) {
    e = (*v)(((PyObject *)p->_leftHandPoseState), a); if (e) return e;
  }
  if (p->_rightHandPoseState) {
    e = (*v)(((PyObject *)p->_rightHandPoseState), a); if (e) return e;
  }
  if (p->_calibratedOrigin) {
    e = (*v)(((PyObject *)p->_calibratedOrigin), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRTrackingState(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *)o;
  tmp = ((PyObject*)p->_headPoseState);
  p->_headPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_leftHandPoseState);
  p->_leftHandPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_rightHandPoseState);
  p->_rightHandPoseState = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_calibratedOrigin);
  p->_calibratedOrigin = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_headPose(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8headPose_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_handPoses(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9handPoses_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_statusFlags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_11statusFlags_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_positionValid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_13positionValid_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_orientationValid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16orientationValid_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_handStatusFlags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_15handStatusFlags_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_handPositionValid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_17handPositionValid_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_handOrientationValid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_20handOrientationValid_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_calibratedOrigin(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_16calibratedOrigin_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRTrackingState[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_7__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_9__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_8__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRTrackingState[] = {
  {(char *)"headPose", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_headPose, 0, (char *)"Head pose state (`LibOVRPoseState`).", 0},
  {(char *)"handPoses", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_handPoses, 0, (char *)"Hand pose states (`LibOVRPoseState`, `LibOVRPoseState`).\n\n        Examples\n        --------\n        Get the left and right hand pose states::\n\n            leftHandPoseState, rightHandPoseState = trackingState.handPoses\n\n        ", 0},
  {(char *)"statusFlags", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_statusFlags, 0, (char *)"Head tracking status flags (`int`).\n\n        Examples\n        --------\n        Check if orientation was tracked and data is valid for use::\n\n            # check if orientation is tracked and valid\n            statusFlags = STATUS_ORIENTATION_TRACKED | STATUS_ORIENTATION_VALID\n            if (trackingState.statusFlags & statusFlags) == statusFlags:\n                print(\"Orientation is tracked and valid\")\n\n        ", 0},
  {(char *)"positionValid", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_positionValid, 0, (char *)"`True` if position tracking is valid.", 0},
  {(char *)"orientationValid", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_orientationValid, 0, (char *)"`True` if orientation tracking is valid.", 0},
  {(char *)"handStatusFlags", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_handStatusFlags, 0, (char *)"Hand tracking status flags (`int`, `int`).", 0},
  {(char *)"handPositionValid", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_handPositionValid, 0, (char *)"Hand position tracking is valid (`bool`, `bool`).\n\n        Examples\n        --------\n        Check if position is valid for the right hand's tracking state::\n\n            rightHandOriTracked = trackingState.handPositionValid[HAND_RIGHT]\n\n        ", 0},
  {(char *)"handOrientationValid", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_handOrientationValid, 0, (char *)"Hand orientation tracking is valid (`bool`, `bool`).\n\n        Examples\n        --------\n        Check if orientation is valid for the right hand's tracking state::\n\n            rightHandOriTracked = trackingState.handOrientationValid[HAND_RIGHT]\n\n        ", 0},
  {(char *)"calibratedOrigin", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_calibratedOrigin, 0, (char *)"Pose of the calibrated origin.\n\n        This pose is used to find the calibrated origin in space if\n        :func:`recenterTrackingOrigin` or :func:`specifyTrackingOrigin` was\n        called. If those functions we never called during a session, this will\n        return an identity pose, which reflects the tracking origin type.\n\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRTrackingState", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRTrackingState, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "LibOVRTrackingState()\nClass for tracking state information.\n\n    Instances of this class are returned by :func:`getTrackingState` calls, with\n    data referenced to the specified absolute time. Pose states with tracked\n    position and orientation, as well as first and second order motion\n    derivatives, for the head and hands can be accessed through attributes\n    :py:attr:`~LibOVRTrackingState.headPose` and\n    :py:attr:`~LibOVRTrackingState.handPoses`.\n\n    Status flags describe the status of sensor tracking when a tracking\n    state was sampled, accessible for the head and hands through the\n    :py:attr:`~LibOVRTrackingState.statusFlags` and\n    :py:attr:`~LibOVRTrackingState.handStatusFlags`, respectively. You can\n    check each status bit by using the following values:\n\n    * ``STATUS_ORIENTATION_TRACKED``: Orientation is tracked/reported.\n    * ``STATUS_ORIENTATION_VALID``: Orientation is valid for application use.\n    * ``STATUS_POSITION_TRACKED``: Position is tracked/reported.\n    * ``STATUS_POSITION_VALID``: Position is valid for application use.\n\n    As of SDK 1.39, `*_VALID` flags should be used to determine if tracking data\n    is usable by the application.\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRTrackingState, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRTrackingState, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRTrackingState, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRTrackingState, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRTrackingState, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRBounds __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRBounds;

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRBounds(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *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_7psychxr_6libovr_7_libovr_LibOVRBounds *)o);
  p->__pyx_vtab = __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRBounds;
  p->_mins = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->_maxs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_3__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRBounds(PyObject *o) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_5__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_mins);
  Py_CLEAR(p->_maxs);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRBounds(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)o;
  if (p->_mins) {
    e = (*v)(((PyObject *)p->_mins), a); if (e) return e;
  }
  if (p->_maxs) {
    e = (*v)(((PyObject *)p->_maxs), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRBounds(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *)o;
  tmp = ((PyObject*)p->_mins);
  p->_mins = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_maxs);
  p->_maxs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_isValid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7isValid_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_extents(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_extents(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7extents_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_mins(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_mins(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4mins_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_maxs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_maxs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_4maxs_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRBounds[] = {
  {"clear", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_7clear, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_6clear},
  {"fit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_9fit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_8fit},
  {"addPoint", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_11addPoint, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_10addPoint},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_13__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_15__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds_14__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRBounds[] = {
  {(char *)"isValid", __pyx_getprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_isValid, 0, (char *)"``True`` if a bounding box is valid. Bounding boxes are valid if all\n        dimensions of `mins` are less than each of `maxs` which is the case\n        after :py:meth:`~LibOVRBounds.clear` is called.\n\n        If a bounding box is invalid, :func:`cullPose` will always return\n        ``True``.\n\n        ", 0},
  {(char *)"extents", __pyx_getprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_extents, __pyx_setprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_extents, (char *)"The extents of the bounding box (`mins`, `maxs`).", 0},
  {(char *)"mins", __pyx_getprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_mins, __pyx_setprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_mins, (char *)"Point defining the minimum extent of the bounding box.", 0},
  {(char *)"maxs", __pyx_getprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_maxs, __pyx_setprop_7psychxr_6libovr_7_libovr_12LibOVRBounds_maxs, (char *)"Point defining the maximum extent of the bounding box.", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRBounds", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRBounds, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "LibOVRBounds(extents=None)\nClass for constructing and representing 3D axis-aligned bounding boxes.\n\n    A bounding box is a construct which represents a 3D rectangular volume\n    about some pose, defined by its minimum and maximum extents in the reference\n    frame of the pose. The axes of the bounding box are aligned to the axes of\n    the world or the associated pose.\n\n    Bounding boxes are primarily used for visibility testing; to determine if\n    the extents of an object associated with a pose (eg. the vertices of a\n    model) falls completely outside of the viewing frustum. If so, the model can\n    be culled during rendering to avoid wasting CPU/GPU resources on objects not\n    visible to the viewer. See :func:`cullPose` for more information.\n\n    Parameters\n    ----------\n    extents : tuple, optional\n        Minimum and maximum extents of the bounding box (`mins`, `maxs`) where\n        `mins` and `maxs` specified as coordinates [x, y, z]. If no extents are\n        specified, the bounding box will be invalid until defined.\n\n    Examples\n    --------\n    Create a bounding box and add it to a pose::\n\n            # minumum and maximum extents of the bounding box\n            mins = (-.5, -.5, -.5)\n            maxs = (.5, .5, .5)\n            bounds = (mins, maxs)\n            # create the bounding box and add it to a pose\n            bbox = LibOVRBounds(bounds)\n            modelPose = LibOVRPose()\n            modelPose.boundingBox = bbox\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRBounds, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRBounds, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRBounds, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRBounds, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_12LibOVRBounds_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRBounds, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *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_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)o);
  p->_pose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None); Py_INCREF(Py_None);
  p->_leveledPose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo(PyObject *o) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_pose);
  Py_CLEAR(p->_leveledPose);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)o;
  if (p->_pose) {
    e = (*v)(((PyObject *)p->_pose), a); if (e) return e;
  }
  if (p->_leveledPose) {
    e = (*v)(((PyObject *)p->_leveledPose), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo *)o;
  tmp = ((PyObject*)p->_pose);
  p->_pose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_leveledPose);
  p->_leveledPose = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_trackerIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_12trackerIndex_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_pose(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4pose_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_leveledPose(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11leveledPose_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_isConnected(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11isConnected_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_isPoseTracked(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13isPoseTracked_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_horizontalFov(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_13horizontalFov_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_verticalFov(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_11verticalFov_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_nearZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_5nearZ_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_farZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4farZ_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_5__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_7__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo[] = {
  {(char *)"trackerIndex", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_trackerIndex, 0, (char *)"Tracker index this objects refers to (read-only).", 0},
  {(char *)"pose", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_pose, 0, (char *)"The pose of the sensor (read-only).", 0},
  {(char *)"leveledPose", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_leveledPose, 0, (char *)"Gravity aligned pose of the sensor (read-only).", 0},
  {(char *)"isConnected", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_isConnected, 0, (char *)"True if the sensor is connected and available (read-only).", 0},
  {(char *)"isPoseTracked", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_isPoseTracked, 0, (char *)"True if the sensor has a valid pose (read-only).", 0},
  {(char *)"horizontalFov", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_horizontalFov, 0, (char *)"Horizontal FOV of the sensor in radians (read-only).", 0},
  {(char *)"verticalFov", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_verticalFov, 0, (char *)"Vertical FOV of the sensor in radians (read-only).", 0},
  {(char *)"nearZ", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_nearZ, 0, (char *)"Near clipping plane of the sensor frustum in meters (read-only).", 0},
  {(char *)"farZ", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_farZ, 0, (char *)"Far clipping plane of the sensor frustum in meters (read-only).", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRTrackerInfo", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "LibOVRTrackerInfo()\nClass for storing tracker (sensor) information such as pose, status, and\n    camera frustum information. This object is returned by calling\n    :func:`~psychxr.libovr.getTrackerInfo`. Attributes of this class are\n    read-only.\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRHmdInfo __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRHmdInfo;

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHmdInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *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_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *)o);
  p->__pyx_vtab = __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRHmdInfo;
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRHmdInfo(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);
    ++Py_REFCNT(o);
    __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_5__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hmdType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7hmdType_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hasOrientationTracking(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_22hasOrientationTracking_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hasPositionTracking(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasPositionTracking_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hasMagYawCorrection(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_19hasMagYawCorrection_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_isDebugDevice(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13isDebugDevice_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_productName(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11productName_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_manufacturer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12manufacturer_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_serialNumber(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_12serialNumber_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_resolution(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_10resolution_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_refreshRate(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_11refreshRate_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_3hid_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_firmwareVersion(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15firmwareVersion_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_defaultEyeFov(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_13defaultEyeFov_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_maxEyeFov(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9maxEyeFov_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_symmetricEyeFov(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_15symmetricEyeFov_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRHmdInfo[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_7__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_9__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_8__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRHmdInfo[] = {
  {(char *)"hmdType", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hmdType, 0, (char *)"HMD type currently used.\n\n        Valid values returned are ``HMD_NONE``, ``HMD_DK1``, ``HMD_DKHD``,\n        ``HMD_DK2``, ``HMD_CB``, ``HMD_OTHER``, ``HMD_E3_2015``, ``HMD_ES06``,\n        ``HMD_ES09``, ``HMD_ES11``, `HMD_CV1``, ``HMD_RIFTS``.\n\n        ", 0},
  {(char *)"hasOrientationTracking", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hasOrientationTracking, 0, (char *)"``True`` if the HMD is capable of tracking orientation.", 0},
  {(char *)"hasPositionTracking", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hasPositionTracking, 0, (char *)"``True`` if the HMD is capable of tracking position.", 0},
  {(char *)"hasMagYawCorrection", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hasMagYawCorrection, 0, (char *)"``True`` if this HMD supports yaw drift correction.", 0},
  {(char *)"isDebugDevice", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_isDebugDevice, 0, (char *)"``True`` if the HMD is a virtual debug device.", 0},
  {(char *)"productName", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_productName, 0, (char *)"Get the product name for this device.\n\n        Returns\n        -------\n        str\n            Product name string (utf-8).\n\n        ", 0},
  {(char *)"manufacturer", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_manufacturer, 0, (char *)"Get the device manufacturer name.\n\n        Returns\n        -------\n        str\n            Manufacturer name string (utf-8).\n\n        ", 0},
  {(char *)"serialNumber", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_serialNumber, 0, (char *)"Get the device serial number.\n\n        Returns\n        -------\n        str\n            Serial number (utf-8).\n\n        ", 0},
  {(char *)"resolution", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_resolution, 0, (char *)"Horizontal and vertical resolution of the display in pixels.\n\n        Returns\n        -------\n        ndarray\n            Resolution of the display [w, h].\n\n        ", 0},
  {(char *)"refreshRate", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_refreshRate, 0, (char *)"Nominal refresh rate in Hertz of the display.\n\n        Returns\n        -------\n        ndarray\n            Refresh rate in Hz.\n\n        ", 0},
  {(char *)"hid", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_hid, 0, (char *)"USB human interface device class identifiers.\n\n        Returns\n        -------\n        tuple (int, int)\n            USB HIDs (vendor, product).\n\n        ", 0},
  {(char *)"firmwareVersion", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_firmwareVersion, 0, (char *)"Firmware version for this device.\n\n        Returns\n        -------\n        tuple (int, int)\n            Firmware version (major, minor).\n\n        ", 0},
  {(char *)"defaultEyeFov", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_defaultEyeFov, 0, (char *)"Default or recommended eye field-of-views (FOVs) provided by the API.\n\n        Returns\n        -------\n        tuple (ndarray, ndarray)\n            Pair of left and right eye FOVs specified as tangent angles [Up,\n            Down, Left, Right].\n\n        ", 0},
  {(char *)"maxEyeFov", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_maxEyeFov, 0, (char *)"Maximum eye field-of-views (FOVs) provided by the API.\n\n        Returns\n        -------\n        tuple (ndarray, ndarray)\n            Pair of left and right eye FOVs specified as tangent angles in\n            radians [Up, Down, Left, Right].\n\n        ", 0},
  {(char *)"symmetricEyeFov", __pyx_getprop_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_symmetricEyeFov, 0, (char *)"Symmetric field-of-views (FOVs) for mono rendering.\n\n        By default, the Rift uses off-axis FOVs. These frustum parameters make\n        it difficult to converge monoscopic stimuli.\n\n        Returns\n        -------\n        tuple (ndarray, ndarray)\n            Pair of left and right eye FOVs specified as tangent angles in\n            radians [Up, Down, Left, Right]. Both FOV objects will have the same\n            values.\n\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRHmdInfo", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRHmdInfo, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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*/
  "LibOVRHmdInfo()\nClass for general HMD information and capabilities. An instance of this\n    class is returned by calling :func:`~psychxr.libovr.getHmdInfo`.\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRHmdInfo, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRHmdInfo, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHmdInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRSessionStatus(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRSessionStatus(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_tp_richcompare_7psychxr_6libovr_7_libovr_LibOVRSessionStatus(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_5__eq__(o1, o2);
    }
    case Py_NE: {
      return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_7__ne__(o1, o2);
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_isVisible(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9isVisible_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_hmdPresent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdPresent_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_hmdMounted(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10hmdMounted_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_displayLost(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11displayLost_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_shouldQuit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10shouldQuit_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_shouldRecenter(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14shouldRecenter_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_hasInputFocus(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_13hasInputFocus_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_overlayPresent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14overlayPresent_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_depthRequested(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_14depthRequested_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRSessionStatus[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_9__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_11__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRSessionStatus[] = {
  {(char *)"isVisible", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_isVisible, 0, (char *)"``True`` the application has focus and visible in the HMD.", 0},
  {(char *)"hmdPresent", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_hmdPresent, 0, (char *)"``True`` if the HMD is present.", 0},
  {(char *)"hmdMounted", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_hmdMounted, 0, (char *)"``True`` if the HMD is being worn on the user's head.", 0},
  {(char *)"displayLost", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_displayLost, 0, (char *)"``True`` the the display was lost.\n\n        If occurs, the HMD was disconnected and the current session is invalid.\n        You need to destroy all resources associated with current session and\n        call :func:`create` again. Alternatively, you can raise an error and\n        shutdown the application.\n        ", 0},
  {(char *)"shouldQuit", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_shouldQuit, 0, (char *)"``True`` the application was signaled to quit.\n\n        This can occur if the user requests the application exit through the\n        system UI menu. You can ignore this flag if needed.\n        ", 0},
  {(char *)"shouldRecenter", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_shouldRecenter, 0, (char *)"``True`` if the application was signaled to recenter.\n\n        This happens when the user requests the application recenter the VR\n        scene on their current physical location through the system UI. You can\n        ignore this request or clear it by calling\n        :func:`clearShouldRecenterFlag`.\n\n        ", 0},
  {(char *)"hasInputFocus", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_hasInputFocus, 0, (char *)"``True`` if the application has input focus.\n\n        If the application has focus, the statistics presented by the\n        performance HUD will reflect the current application's frame statistics.\n\n        ", 0},
  {(char *)"overlayPresent", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_overlayPresent, 0, (char *)"``True`` if the system UI is visible.", 0},
  {(char *)"depthRequested", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_depthRequested, 0, (char *)"``True`` if the a depth texture is requested.\n\n        Notes\n        -----\n        * This feature is currently unused by PsychXR.\n\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRSessionStatus", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRSessionStatus), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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*/
  "LibOVRSessionStatus()\nClass for storing session status information. An instance of this class\n    is returned when :func:`getSessionStatus` is called.\n\n    One can check if there was a status change between calls of\n    :func:`getSessionStatus` by using the ``==`` and ``!=`` operators on the\n    returned :py:class:`LibOVRSessionStatus` instances.\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_isTriggering(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12isTriggering_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_closestDistance(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_15closestDistance_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_closestPoint(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_12closestPoint_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_closestPointNormal(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_18closestPointNormal_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_5__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_7__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult[] = {
  {(char *)"isTriggering", __pyx_getprop_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_isTriggering, 0, (char *)"``True`` if the play area boundary is triggering. Since the boundary\n        fades-in, it might not be perceptible when this is called.\n        ", 0},
  {(char *)"closestDistance", __pyx_getprop_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_closestDistance, 0, (char *)"Closest point to the boundary in meters.", 0},
  {(char *)"closestPoint", __pyx_getprop_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_closestPoint, 0, (char *)"Closest point on the boundary surface.", 0},
  {(char *)"closestPointNormal", __pyx_getprop_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_closestPointNormal, 0, (char *)"Unit normal of the closest boundary surface.", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRBoundaryTestResult", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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*/
  "LibOVRBoundaryTestResult()\nClass for boundary collision test data. An instance of this class is\n    returned when :func:`testBoundary` is called.\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame;

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *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_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)o);
  p->__pyx_vtab = __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame;
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame(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);
    ++Py_REFCNT(o);
    __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_5__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_hmdVsyncIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13hmdVsyncIndex_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appFrameIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_13appFrameIndex_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appDroppedFrameCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20appDroppedFrameCount_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appMotionToPhotonLatency(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24appMotionToPhotonLatency_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appQueueAheadTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appQueueAheadTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appCpuElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appCpuElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appGpuElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17appGpuElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorFrameIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_20compositorFrameIndex_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorDroppedFrameCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_27compositorDroppedFrameCount_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorLatency(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_17compositorLatency_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorCpuElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorCpuElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorGpuElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_24compositorGpuElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorCpuStartToGpuEndElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_37compositorCpuStartToGpuEndElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorGpuEndToVsyncElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_34compositorGpuEndToVsyncElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_timeToVsync(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11timeToVsync_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_aswIsActive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_11aswIsActive_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_aswActivatedToggleCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_23aswActivatedToggleCount_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_aswPresentedFrameCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_22aswPresentedFrameCount_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_aswFailedFrameCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_19aswFailedFrameCount_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_7__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_9__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_8__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame[] = {
  {(char *)"hmdVsyncIndex", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_hmdVsyncIndex, 0, (char *)"Increments every HMD vertical sync signal.", 0},
  {(char *)"appFrameIndex", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appFrameIndex, 0, (char *)"Index increments after each call to :func:`endFrame`.", 0},
  {(char *)"appDroppedFrameCount", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appDroppedFrameCount, 0, (char *)"If :func:`endFrame` is not called on-time, this will increment (i.e.\n        missed HMD vertical sync deadline).\n\n        Examples\n        --------\n        Check if the application dropped a frame::\n\n            framesDropped = frameStats.frameStats[0].appDroppedFrameCount >\n                lastFrameStats.frameStats[0].appDroppedFrameCount\n\n        ", 0},
  {(char *)"appMotionToPhotonLatency", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appMotionToPhotonLatency, 0, (char *)"Motion-to-photon latency in seconds computed using the marker set by\n        :func:`getTrackingState` or the sensor sample time set by\n        :func:`setSensorSampleTime`.\n        ", 0},
  {(char *)"appQueueAheadTime", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appQueueAheadTime, 0, (char *)"Queue-ahead time in seconds. If >11 ms, the CPU is outpacing the GPU\n        workload by 1 frame.\n        ", 0},
  {(char *)"appCpuElapsedTime", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appCpuElapsedTime, 0, (char *)"Time in seconds the CPU spent between calls of :func:`endFrame`. Form\n        the point when :func:`endFrame` releases control back to the\n        application, to the next time it is called.\n        ", 0},
  {(char *)"appGpuElapsedTime", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_appGpuElapsedTime, 0, (char *)"Time in seconds the GPU spent between calls of :func:`endFrame`.", 0},
  {(char *)"compositorFrameIndex", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorFrameIndex, 0, (char *)"Increments when the compositor completes a distortion pass, happens\n        regardless if :func:`endFrame` was called late.\n        ", 0},
  {(char *)"compositorDroppedFrameCount", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorDroppedFrameCount, 0, (char *)"Number of frames dropped by the compositor. This can happen\n        spontaneously for reasons not related to application performance.\n        ", 0},
  {(char *)"compositorLatency", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorLatency, 0, (char *)"Motion-to-photon latency of the compositor, which include the\n        latency of 'timewarp' needed to correct for application latency and\n        dropped application frames.\n        ", 0},
  {(char *)"compositorCpuElapsedTime", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorCpuElapsedTime, 0, (char *)"Time in seconds the compositor spends on the CPU.", 0},
  {(char *)"compositorGpuElapsedTime", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorGpuElapsedTime, 0, (char *)"Time in seconds the compositor spends on the GPU.", 0},
  {(char *)"compositorCpuStartToGpuEndElapsedTime", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorCpuStartToGpuEndElapsedTime, 0, (char *)"Time in seconds between the point the compositor executes and\n        completes distortion/timewarp. Value is -1.0 if GPU time is not\n        available.\n        ", 0},
  {(char *)"compositorGpuEndToVsyncElapsedTime", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_compositorGpuEndToVsyncElapsedTime, 0, (char *)"Time in seconds left between the compositor is complete and the\n        target vertical synchronization (v-sync) on the HMD.", 0},
  {(char *)"timeToVsync", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_timeToVsync, 0, (char *)"Total time elapsed from when CPU control is handed off to the\n        compositor to HMD vertical synchronization signal (V-Sync).\n\n        ", 0},
  {(char *)"aswIsActive", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_aswIsActive, 0, (char *)"``True`` if Asynchronous Space Warp (ASW) was active this frame.", 0},
  {(char *)"aswActivatedToggleCount", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_aswActivatedToggleCount, 0, (char *)"How many frames ASW activated during the runtime of this application.\n        ", 0},
  {(char *)"aswPresentedFrameCount", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_aswPresentedFrameCount, 0, (char *)"Number of frames the compositor extrapolated using ASW.", 0},
  {(char *)"aswFailedFrameCount", __pyx_getprop_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_aswFailedFrameCount, 0, (char *)"Number of frames the compositor failed to present extrapolated frames\n        using ASW.\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRPerfStatsPerCompositorFrame", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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*/
  "LibOVRPerfStatsPerCompositorFrame()\nClass for frame performance statistics per compositor frame.\n\n    Instances of this class are returned by calling :func:`getPerfStats` and\n    accessing the :py:attr:`LibOVRPerfStats.frameStats` field of the returned\n    :class:`LibOVRPerfStats` instance.\n\n    Data contained in this class provide information about compositor\n    performance. Metrics include motion-to-photon latency, dropped frames, and\n    elapsed times of various stages of frame processing to the vertical\n    synchronization (V-Sync) signal of the HMD.\n\n    Calling :func:`resetFrameStats` will reset integer fields of this class in\n    successive calls to :func:`getPerfStats`.\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_7psychxr_6libovr_7_libovr_LibOVRPerfStats __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPerfStats;

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPerfStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *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_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)o);
  p->__pyx_vtab = __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStats;
  p->compFrame0 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  p->compFrame1 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  p->compFrame2 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  p->compFrame3 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  p->compFrame4 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRPerfStats(PyObject *o) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_5__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->compFrame0);
  Py_CLEAR(p->compFrame1);
  Py_CLEAR(p->compFrame2);
  Py_CLEAR(p->compFrame3);
  Py_CLEAR(p->compFrame4);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRPerfStats(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)o;
  if (p->compFrame0) {
    e = (*v)(((PyObject *)p->compFrame0), a); if (e) return e;
  }
  if (p->compFrame1) {
    e = (*v)(((PyObject *)p->compFrame1), a); if (e) return e;
  }
  if (p->compFrame2) {
    e = (*v)(((PyObject *)p->compFrame2), a); if (e) return e;
  }
  if (p->compFrame3) {
    e = (*v)(((PyObject *)p->compFrame3), a); if (e) return e;
  }
  if (p->compFrame4) {
    e = (*v)(((PyObject *)p->compFrame4), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRPerfStats(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *)o;
  tmp = ((PyObject*)p->compFrame0);
  p->compFrame0 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->compFrame1);
  p->compFrame1 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->compFrame2);
  p->compFrame2 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->compFrame3);
  p->compFrame3 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->compFrame4);
  p->compFrame4 = ((struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_frameStats(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_10frameStats_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_frameStatsCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_15frameStatsCount_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_anyFrameStatsDropped(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_20anyFrameStatsDropped_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_adaptiveGpuPerformanceScale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_27adaptiveGpuPerformanceScale_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_aswIsAvailable(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_14aswIsAvailable_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_visibleProcessId(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_16visibleProcessId_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRPerfStats[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_7__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_9__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_8__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRPerfStats[] = {
  {(char *)"frameStats", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_frameStats, 0, (char *)"Performance stats per compositor frame. Statistics are in reverse\n        chronological order where the first index is the most recent. Only\n        indices 0 to :py:attr:`LibOVRPerfStats.frameStatsCount` are valid.\n        ", 0},
  {(char *)"frameStatsCount", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_frameStatsCount, 0, (char *)"Number of compositor frame statistics available. The maximum number\n        of frame statistics is 5. If 1 is returned, the application is calling\n        :func:`getFrameStats` at a rate equal to or greater than the refresh\n        rate of the display.\n        ", 0},
  {(char *)"anyFrameStatsDropped", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_anyFrameStatsDropped, 0, (char *)"``True`` if compositor frame statistics have been dropped. This\n        occurs if :func:`getPerfStats` is called at a rate less than 1/5th the\n        refresh rate of the HMD. You can obtain the refresh rate for your model\n        of HMD by calling :func:`getHmdInfo` and accessing the\n        :py:attr:`LibOVRHmdInfo.refreshRate` field of the returned\n        :py:class:`LibOVRHmdInfo` instance.\n\n        ", 0},
  {(char *)"adaptiveGpuPerformanceScale", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_adaptiveGpuPerformanceScale, 0, (char *)"Adaptive performance scale value. This value ranges between 0.0 and\n        1.0. If the application is taking up too many GPU resources, this value\n        will be less than 1.0, indicating the application needs to throttle GPU\n        usage somehow to maintain performance. If the value is 1.0, the GPU is\n        being utilized the correct amount for the application.\n\n        ", 0},
  {(char *)"aswIsAvailable", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_aswIsAvailable, 0, (char *)"``True`` is ASW is enabled.", 0},
  {(char *)"visibleProcessId", __pyx_getprop_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_visibleProcessId, 0, (char *)"Visible process ID.\n\n        Since performance stats can be obtained for any application running on\n        the LibOVR runtime that has focus, this value should equal the current\n        process ID returned by ``os.getpid()`` to ensure the statistics returned\n        are for the current application.\n\n        Examples\n        --------\n        Check if frame statistics are for the present PsychXR application::\n\n            perfStats = getPerfStats()\n            if perfStats.visibleProcessId == os.getpid():\n                # has focus, performance stats are for this application\n\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRPerfStats", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRPerfStats, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "LibOVRPerfStats()\nClass for frame performance statistics.\n\n    Instances of this class are returned by calling :func:`getPerfStats`.\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRPerfStats, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRPerfStats, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRPerfStats, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRPerfStats, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRPerfStats, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_3__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_sampleRateHz(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_12sampleRateHz_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_sampleTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_10sampleTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_queueMinSizeToAvoidStarvation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_29queueMinSizeToAvoidStarvation_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_submitMinSamples(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMinSamples_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_submitMaxSamples(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_16submitMaxSamples_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_submitOptimalSamples(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_20submitOptimalSamples_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_5__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_7__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo[] = {
  {(char *)"sampleRateHz", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_sampleRateHz, 0, (char *)"Haptics engine frequency/sample-rate.", 0},
  {(char *)"sampleTime", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_sampleTime, 0, (char *)"Time in seconds per sample. You can compute the total playback time\n        of a haptics buffer with the formula ``sampleTime * samplesCount``.\n\n        ", 0},
  {(char *)"queueMinSizeToAvoidStarvation", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_queueMinSizeToAvoidStarvation, 0, (char *)"Queue size required to prevent starving the haptics engine.", 0},
  {(char *)"submitMinSamples", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_submitMinSamples, 0, (char *)"Minimum number of samples that can be sent to the haptics engine.", 0},
  {(char *)"submitMaxSamples", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_submitMaxSamples, 0, (char *)"Maximum number of samples that can be sent to the haptics engine.", 0},
  {(char *)"submitOptimalSamples", __pyx_getprop_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_submitOptimalSamples, 0, (char *)"Optimal number of samples for the haptics engine.", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRHapticsInfo", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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*/
  "LibOVRHapticsInfo()\nClass for touch haptics engine information.\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *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_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)o);
  p->_samples = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_3__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer(PyObject *o) {
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_samples);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)o;
  if (p->_samples) {
    e = (*v)(((PyObject *)p->_samples), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *p = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer *)o;
  tmp = ((PyObject*)p->_samples);
  p->_samples = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_samples(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_1__get__(o);
}

static int __pyx_setprop_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_samples(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7samples_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_samplesCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_12samplesCount_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_5__reduce_cython__, METH_NOARGS, __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_7__setstate_cython__, METH_O, __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer[] = {
  {(char *)"samples", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_samples, __pyx_setprop_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_samples, (char *)"Haptics buffer samples. Each sample specifies the amplitude of\n        vibration at a given point of playback. Must have a length less than\n        ``HAPTICS_BUFFER_SAMPLES_MAX``.\n\n        Warnings\n        --------\n        Do not change the value of `samples` during haptic buffer playback. This\n        may crash the application. Check the playback status of the haptics\n        engine before setting the array.\n\n        ", 0},
  {(char *)"samplesCount", __pyx_getprop_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_samplesCount, 0, (char *)"Number of haptic buffer samples stored. This value will always be\n        less than ``HAPTICS_BUFFER_SAMPLES_MAX``.\n\n        ", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.LibOVRHapticsBuffer", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "LibOVRHapticsBuffer(buffer)\nClass for haptics buffer data for controller vibration.\n\n    Instances of this class store a buffer of vibration amplitude values which\n    can be passed to the haptics engine for playback using the\n    :func:`submitControllerVibration` function. Samples are stored as a 1D array\n    of 32-bit floating-point values ranging between 0.0 and 1.0, with a maximum\n    length of ``HAPTICS_BUFFER_SAMPLES_MAX - 1``. You can access this buffer\n    through the :py:attr:`~LibOVRHapticsBuffer.samples` attribute.\n\n    One can use `Numpy` functions to generate samples for the haptics buffer.\n    Here is an example were amplitude ramps down over playback::\n\n        samples = np.linspace(\n            1.0, 0.0, num=HAPTICS_BUFFER_SAMPLES_MAX-1, dtype=np.float32)\n        hbuff = LibOVRHapticsBuffer(samples)\n        # vibrate right Touch controller\n        submitControllerVibration(CONTROLLER_TYPE_RTOUCH, hbuff)\n\n    For information about the haptics engine, such as sampling frequency, call\n    :func:`getHapticsInfo` and inspect the returned\n    :py:class:`LibOVRHapticsInfo` object.\n\n    Parameters\n    ----------\n    buffer : array_like\n        Buffer of samples. Must be a 1D array of floating point values between\n        0.0 and 1.0. If an `ndarray` with dtype `float32` is specified, the\n        buffer will be set without copying.\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;

static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_array_obj *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_array_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_array;
  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_array(PyObject *o) {
  struct __pyx_array_obj *p = (struct __pyx_array_obj *)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);
    ++Py_REFCNT(o);
    __pyx_array___dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->mode);
  Py_CLEAR(p->_format);
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_array___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_array___getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
}

static PyMethodDef __pyx_methods_array[] = {
  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_array[] = {
  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_array = {
  __pyx_array___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_array, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_array = {
  __pyx_array___len__, /*mp_length*/
  __pyx_array___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_array = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_array = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.array", /*tp_name*/
  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_array, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*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*/
  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_array, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_array, /*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_array, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_array, /*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_array, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_MemviewEnum_obj *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_MemviewEnum_obj *)o);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_Enum(PyObject *o) {
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_Enum(PyObject *o) {
  PyObject* tmp;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_Enum[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type___pyx_MemviewEnum = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.Enum", /*tp_name*/
  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_MemviewEnum___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_Enum, /*tp_traverse*/
  __pyx_tp_clear_Enum, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_Enum, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_MemviewEnum___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_Enum, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;

static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryview_obj *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_memoryview_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_memoryview;
  p->obj = Py_None; Py_INCREF(Py_None);
  p->_size = Py_None; Py_INCREF(Py_None);
  p->_array_interface = Py_None; Py_INCREF(Py_None);
  p->view.obj = NULL;
  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_memoryview(PyObject *o) {
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_memoryview___dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->obj);
  Py_CLEAR(p->_size);
  Py_CLEAR(p->_array_interface);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  if (p->obj) {
    e = (*v)(p->obj, a); if (e) return e;
  }
  if (p->_size) {
    e = (*v)(p->_size, a); if (e) return e;
  }
  if (p->_array_interface) {
    e = (*v)(p->_array_interface, a); if (e) return e;
  }
  if (p->view.obj) {
    e = (*v)(p->view.obj, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_memoryview(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  tmp = ((PyObject*)p->obj);
  p->obj = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_size);
  p->_size = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_array_interface);
  p->_array_interface = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  Py_CLEAR(p->view.obj);
  return 0;
}
static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_memoryview___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
}

static PyMethodDef __pyx_methods_memoryview[] = {
  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_memoryview[] = {
  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
  __pyx_memoryview___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_memoryview, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
  __pyx_memoryview___len__, /*mp_length*/
  __pyx_memoryview___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_memoryview = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr.memoryview", /*tp_name*/
  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_memoryview___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_memoryview___str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_memoryview, /*tp_traverse*/
  __pyx_tp_clear_memoryview, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_memoryview, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_memoryview, /*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_memoryview, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;

static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryviewslice_obj *p;
  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryviewslice_obj *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
  p->from_object = Py_None; Py_INCREF(Py_None);
  p->from_slice.memview = NULL;
  return o;
}

static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_memoryviewslice___dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->from_object);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_memoryview(o);
}

static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
  if (p->from_object) {
    e = (*v)(p->from_object, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  __pyx_tp_clear_memoryview(o);
  tmp = ((PyObject*)p->from_object);
  p->from_object = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
  return 0;
}

static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
}

static PyMethodDef __pyx_methods__memoryviewslice[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type___pyx_memoryviewslice = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.libovr._libovr._memoryviewslice", /*tp_name*/
  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_memoryview___repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_memoryview___str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Internal class for passing memoryview slices to Python", /*tp_doc*/
  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods__memoryviewslice, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets__memoryviewslice, /*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__memoryviewslice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #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__libovr(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__libovr},
  {0, NULL}
};
#endif

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

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
  {&__pyx_kp_u_0_2_2, __pyx_k_0_2_2, sizeof(__pyx_k_0_2_2), 0, 1, 0, 0},
  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
  {&__pyx_kp_u_Array_has_invalid_number_of_dime, __pyx_k_Array_has_invalid_number_of_dime, sizeof(__pyx_k_Array_has_invalid_number_of_dime), 0, 1, 0, 0},
  {&__pyx_kp_u_Array_too_large_must_have_length, __pyx_k_Array_too_large_must_have_length, sizeof(__pyx_k_Array_too_large_must_have_length), 0, 1, 0, 0},
  {&__pyx_n_s_BOUNDARY_OUTER, __pyx_k_BOUNDARY_OUTER, sizeof(__pyx_k_BOUNDARY_OUTER), 0, 0, 1, 1},
  {&__pyx_n_u_BOUNDARY_OUTER, __pyx_k_BOUNDARY_OUTER, sizeof(__pyx_k_BOUNDARY_OUTER), 0, 1, 0, 1},
  {&__pyx_n_s_BOUNDARY_PLAY_AREA, __pyx_k_BOUNDARY_PLAY_AREA, sizeof(__pyx_k_BOUNDARY_PLAY_AREA), 0, 0, 1, 1},
  {&__pyx_n_u_BOUNDARY_PLAY_AREA, __pyx_k_BOUNDARY_PLAY_AREA, sizeof(__pyx_k_BOUNDARY_PLAY_AREA), 0, 1, 0, 1},
  {&__pyx_n_s_BUILD_NUMBER, __pyx_k_BUILD_NUMBER, sizeof(__pyx_k_BUILD_NUMBER), 0, 0, 1, 1},
  {&__pyx_n_u_BUILD_NUMBER, __pyx_k_BUILD_NUMBER, sizeof(__pyx_k_BUILD_NUMBER), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_A, __pyx_k_BUTTON_A, sizeof(__pyx_k_BUTTON_A), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_A, __pyx_k_BUTTON_A, sizeof(__pyx_k_BUTTON_A), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_B, __pyx_k_BUTTON_B, sizeof(__pyx_k_BUTTON_B), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_B, __pyx_k_BUTTON_B, sizeof(__pyx_k_BUTTON_B), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_BACK, __pyx_k_BUTTON_BACK, sizeof(__pyx_k_BUTTON_BACK), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_BACK, __pyx_k_BUTTON_BACK, sizeof(__pyx_k_BUTTON_BACK), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_DOWN, __pyx_k_BUTTON_DOWN, sizeof(__pyx_k_BUTTON_DOWN), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_DOWN, __pyx_k_BUTTON_DOWN, sizeof(__pyx_k_BUTTON_DOWN), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_ENTER, __pyx_k_BUTTON_ENTER, sizeof(__pyx_k_BUTTON_ENTER), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_ENTER, __pyx_k_BUTTON_ENTER, sizeof(__pyx_k_BUTTON_ENTER), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_HOME, __pyx_k_BUTTON_HOME, sizeof(__pyx_k_BUTTON_HOME), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_HOME, __pyx_k_BUTTON_HOME, sizeof(__pyx_k_BUTTON_HOME), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_LEFT, __pyx_k_BUTTON_LEFT, sizeof(__pyx_k_BUTTON_LEFT), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_LEFT, __pyx_k_BUTTON_LEFT, sizeof(__pyx_k_BUTTON_LEFT), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_LMASK, __pyx_k_BUTTON_LMASK, sizeof(__pyx_k_BUTTON_LMASK), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_LMASK, __pyx_k_BUTTON_LMASK, sizeof(__pyx_k_BUTTON_LMASK), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_LSHOULDER, __pyx_k_BUTTON_LSHOULDER, sizeof(__pyx_k_BUTTON_LSHOULDER), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_LSHOULDER, __pyx_k_BUTTON_LSHOULDER, sizeof(__pyx_k_BUTTON_LSHOULDER), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_LTHUMB, __pyx_k_BUTTON_LTHUMB, sizeof(__pyx_k_BUTTON_LTHUMB), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_LTHUMB, __pyx_k_BUTTON_LTHUMB, sizeof(__pyx_k_BUTTON_LTHUMB), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_PRIVATE, __pyx_k_BUTTON_PRIVATE, sizeof(__pyx_k_BUTTON_PRIVATE), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_PRIVATE, __pyx_k_BUTTON_PRIVATE, sizeof(__pyx_k_BUTTON_PRIVATE), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_RIGHT, __pyx_k_BUTTON_RIGHT, sizeof(__pyx_k_BUTTON_RIGHT), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_RIGHT, __pyx_k_BUTTON_RIGHT, sizeof(__pyx_k_BUTTON_RIGHT), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_RMASK, __pyx_k_BUTTON_RMASK, sizeof(__pyx_k_BUTTON_RMASK), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_RMASK, __pyx_k_BUTTON_RMASK, sizeof(__pyx_k_BUTTON_RMASK), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_RSHOULDER, __pyx_k_BUTTON_RSHOULDER, sizeof(__pyx_k_BUTTON_RSHOULDER), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_RSHOULDER, __pyx_k_BUTTON_RSHOULDER, sizeof(__pyx_k_BUTTON_RSHOULDER), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_RTHUMB, __pyx_k_BUTTON_RTHUMB, sizeof(__pyx_k_BUTTON_RTHUMB), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_RTHUMB, __pyx_k_BUTTON_RTHUMB, sizeof(__pyx_k_BUTTON_RTHUMB), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_UP, __pyx_k_BUTTON_UP, sizeof(__pyx_k_BUTTON_UP), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_UP, __pyx_k_BUTTON_UP, sizeof(__pyx_k_BUTTON_UP), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_VOLDOWN, __pyx_k_BUTTON_VOLDOWN, sizeof(__pyx_k_BUTTON_VOLDOWN), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_VOLDOWN, __pyx_k_BUTTON_VOLDOWN, sizeof(__pyx_k_BUTTON_VOLDOWN), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_VOLUP, __pyx_k_BUTTON_VOLUP, sizeof(__pyx_k_BUTTON_VOLUP), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_VOLUP, __pyx_k_BUTTON_VOLUP, sizeof(__pyx_k_BUTTON_VOLUP), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_X, __pyx_k_BUTTON_X, sizeof(__pyx_k_BUTTON_X), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_X, __pyx_k_BUTTON_X, sizeof(__pyx_k_BUTTON_X), 0, 1, 0, 1},
  {&__pyx_n_s_BUTTON_Y, __pyx_k_BUTTON_Y, sizeof(__pyx_k_BUTTON_Y), 0, 0, 1, 1},
  {&__pyx_n_u_BUTTON_Y, __pyx_k_BUTTON_Y, sizeof(__pyx_k_BUTTON_Y), 0, 1, 0, 1},
  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
  {&__pyx_n_s_CONTROLLER_TYPE_LTOUCH, __pyx_k_CONTROLLER_TYPE_LTOUCH, sizeof(__pyx_k_CONTROLLER_TYPE_LTOUCH), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_LTOUCH, __pyx_k_CONTROLLER_TYPE_LTOUCH, sizeof(__pyx_k_CONTROLLER_TYPE_LTOUCH), 0, 1, 0, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_NONE, __pyx_k_CONTROLLER_TYPE_NONE, sizeof(__pyx_k_CONTROLLER_TYPE_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_OBJECT0, __pyx_k_CONTROLLER_TYPE_OBJECT0, sizeof(__pyx_k_CONTROLLER_TYPE_OBJECT0), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_OBJECT0, __pyx_k_CONTROLLER_TYPE_OBJECT0, sizeof(__pyx_k_CONTROLLER_TYPE_OBJECT0), 0, 1, 0, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_OBJECT1, __pyx_k_CONTROLLER_TYPE_OBJECT1, sizeof(__pyx_k_CONTROLLER_TYPE_OBJECT1), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_OBJECT1, __pyx_k_CONTROLLER_TYPE_OBJECT1, sizeof(__pyx_k_CONTROLLER_TYPE_OBJECT1), 0, 1, 0, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_OBJECT2, __pyx_k_CONTROLLER_TYPE_OBJECT2, sizeof(__pyx_k_CONTROLLER_TYPE_OBJECT2), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_OBJECT2, __pyx_k_CONTROLLER_TYPE_OBJECT2, sizeof(__pyx_k_CONTROLLER_TYPE_OBJECT2), 0, 1, 0, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_OBJECT3, __pyx_k_CONTROLLER_TYPE_OBJECT3, sizeof(__pyx_k_CONTROLLER_TYPE_OBJECT3), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_OBJECT3, __pyx_k_CONTROLLER_TYPE_OBJECT3, sizeof(__pyx_k_CONTROLLER_TYPE_OBJECT3), 0, 1, 0, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_REMOTE, __pyx_k_CONTROLLER_TYPE_REMOTE, sizeof(__pyx_k_CONTROLLER_TYPE_REMOTE), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_REMOTE, __pyx_k_CONTROLLER_TYPE_REMOTE, sizeof(__pyx_k_CONTROLLER_TYPE_REMOTE), 0, 1, 0, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_RTOUCH, __pyx_k_CONTROLLER_TYPE_RTOUCH, sizeof(__pyx_k_CONTROLLER_TYPE_RTOUCH), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_RTOUCH, __pyx_k_CONTROLLER_TYPE_RTOUCH, sizeof(__pyx_k_CONTROLLER_TYPE_RTOUCH), 0, 1, 0, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_TOUCH, __pyx_k_CONTROLLER_TYPE_TOUCH, sizeof(__pyx_k_CONTROLLER_TYPE_TOUCH), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_TOUCH, __pyx_k_CONTROLLER_TYPE_TOUCH, sizeof(__pyx_k_CONTROLLER_TYPE_TOUCH), 0, 1, 0, 1},
  {&__pyx_n_s_CONTROLLER_TYPE_XBOX, __pyx_k_CONTROLLER_TYPE_XBOX, sizeof(__pyx_k_CONTROLLER_TYPE_XBOX), 0, 0, 1, 1},
  {&__pyx_n_u_CONTROLLER_TYPE_XBOX, __pyx_k_CONTROLLER_TYPE_XBOX, sizeof(__pyx_k_CONTROLLER_TYPE_XBOX), 0, 1, 0, 1},
  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
  {&__pyx_kp_u_Cannot_get_buffer_ID_NULL_eye_bu, __pyx_k_Cannot_get_buffer_ID_NULL_eye_bu, sizeof(__pyx_k_Cannot_get_buffer_ID_NULL_eye_bu), 0, 1, 0, 0},
  {&__pyx_kp_u_Cannot_get_swap_chain_length_NUL, __pyx_k_Cannot_get_swap_chain_length_NUL, sizeof(__pyx_k_Cannot_get_swap_chain_length_NUL), 0, 1, 0, 0},
  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
  {&__pyx_kp_u_Copyright_2019_Matthew_D_Cutone, __pyx_k_Copyright_2019_Matthew_D_Cutone, sizeof(__pyx_k_Copyright_2019_Matthew_D_Cutone), 0, 1, 0, 0},
  {&__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_COLOR, __pyx_k_DEBUG_HUD_STEREO_GUIDE_COLOR, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_COLOR), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_COLOR, __pyx_k_DEBUG_HUD_STEREO_GUIDE_COLOR, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_COLOR), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB, __pyx_k_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB, __pyx_k_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_POSITION, __pyx_k_DEBUG_HUD_STEREO_GUIDE_POSITION, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_POSITION), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_POSITION, __pyx_k_DEBUG_HUD_STEREO_GUIDE_POSITION, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_POSITION), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_SIZE, __pyx_k_DEBUG_HUD_STEREO_GUIDE_SIZE, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_SIZE), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_SIZE, __pyx_k_DEBUG_HUD_STEREO_GUIDE_SIZE, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_SIZE), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR, __pyx_k_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR, __pyx_k_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR, sizeof(__pyx_k_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_MODE, __pyx_k_DEBUG_HUD_STEREO_MODE, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_MODE, __pyx_k_DEBUG_HUD_STEREO_MODE, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_MODE_CROSSHAIR, __pyx_k_DEBUG_HUD_STEREO_MODE_CROSSHAIR, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE_CROSSHAIR), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_MODE_CROSSHAIR, __pyx_k_DEBUG_HUD_STEREO_MODE_CROSSHAIR, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE_CROSSHAIR), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_MODE_OFF, __pyx_k_DEBUG_HUD_STEREO_MODE_OFF, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE_OFF), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_MODE_OFF, __pyx_k_DEBUG_HUD_STEREO_MODE_OFF, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE_OFF), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_MODE_QUAD, __pyx_k_DEBUG_HUD_STEREO_MODE_QUAD, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE_QUAD), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD, __pyx_k_DEBUG_HUD_STEREO_MODE_QUAD, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE_QUAD), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG_HUD_STEREO_MODE_QUAD_WITH, __pyx_k_DEBUG_HUD_STEREO_MODE_QUAD_WITH, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE_QUAD_WITH), 0, 0, 1, 1},
  {&__pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD_WITH, __pyx_k_DEBUG_HUD_STEREO_MODE_QUAD_WITH, sizeof(__pyx_k_DEBUG_HUD_STEREO_MODE_QUAD_WITH), 0, 1, 0, 1},
  {&__pyx_n_s_DEFAULT_EYE_HEIGHT, __pyx_k_DEFAULT_EYE_HEIGHT, sizeof(__pyx_k_DEFAULT_EYE_HEIGHT), 0, 0, 1, 1},
  {&__pyx_n_u_DEFAULT_EYE_HEIGHT, __pyx_k_DEFAULT_EYE_HEIGHT, sizeof(__pyx_k_DEFAULT_EYE_HEIGHT), 0, 1, 0, 1},
  {&__pyx_n_s_DEFAULT_GENDER, __pyx_k_DEFAULT_GENDER, sizeof(__pyx_k_DEFAULT_GENDER), 0, 0, 1, 1},
  {&__pyx_n_u_DEFAULT_GENDER, __pyx_k_DEFAULT_GENDER, sizeof(__pyx_k_DEFAULT_GENDER), 0, 1, 0, 1},
  {&__pyx_n_s_DEFAULT_NECK_TO_EYE_HORIZONTAL, __pyx_k_DEFAULT_NECK_TO_EYE_HORIZONTAL, sizeof(__pyx_k_DEFAULT_NECK_TO_EYE_HORIZONTAL), 0, 0, 1, 1},
  {&__pyx_n_u_DEFAULT_NECK_TO_EYE_HORIZONTAL, __pyx_k_DEFAULT_NECK_TO_EYE_HORIZONTAL, sizeof(__pyx_k_DEFAULT_NECK_TO_EYE_HORIZONTAL), 0, 1, 0, 1},
  {&__pyx_n_s_DEFAULT_NECK_TO_EYE_VERTICAL, __pyx_k_DEFAULT_NECK_TO_EYE_VERTICAL, sizeof(__pyx_k_DEFAULT_NECK_TO_EYE_VERTICAL), 0, 0, 1, 1},
  {&__pyx_n_u_DEFAULT_NECK_TO_EYE_VERTICAL, __pyx_k_DEFAULT_NECK_TO_EYE_VERTICAL, sizeof(__pyx_k_DEFAULT_NECK_TO_EYE_VERTICAL), 0, 1, 0, 1},
  {&__pyx_n_s_DEFAULT_PLAYER_HEIGHT, __pyx_k_DEFAULT_PLAYER_HEIGHT, sizeof(__pyx_k_DEFAULT_PLAYER_HEIGHT), 0, 0, 1, 1},
  {&__pyx_n_u_DEFAULT_PLAYER_HEIGHT, __pyx_k_DEFAULT_PLAYER_HEIGHT, sizeof(__pyx_k_DEFAULT_PLAYER_HEIGHT), 0, 1, 0, 1},
  {&__pyx_n_s_DEG_TO_RADF, __pyx_k_DEG_TO_RADF, sizeof(__pyx_k_DEG_TO_RADF), 0, 0, 1, 1},
  {&__pyx_n_s_DLL_COMPATIBLE_VERSION, __pyx_k_DLL_COMPATIBLE_VERSION, sizeof(__pyx_k_DLL_COMPATIBLE_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_DLL_COMPATIBLE_VERSION, __pyx_k_DLL_COMPATIBLE_VERSION, sizeof(__pyx_k_DLL_COMPATIBLE_VERSION), 0, 1, 0, 1},
  {&__pyx_kp_u_Default_value_must_be_type_str_o, __pyx_k_Default_value_must_be_type_str_o, sizeof(__pyx_k_Default_value_must_be_type_str_o), 0, 1, 0, 0},
  {&__pyx_n_s_DepthRequested, __pyx_k_DepthRequested, sizeof(__pyx_k_DepthRequested), 0, 0, 1, 1},
  {&__pyx_n_s_DisplayLost, __pyx_k_DisplayLost, sizeof(__pyx_k_DisplayLost), 0, 0, 1, 1},
  {&__pyx_n_s_ERROR_APPLICATION_VISIBLE, __pyx_k_ERROR_APPLICATION_VISIBLE, sizeof(__pyx_k_ERROR_APPLICATION_VISIBLE), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_APPLICATION_VISIBLE, __pyx_k_ERROR_APPLICATION_VISIBLE, sizeof(__pyx_k_ERROR_APPLICATION_VISIBLE), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_AUDIO_COM_ERROR, __pyx_k_ERROR_AUDIO_COM_ERROR, sizeof(__pyx_k_ERROR_AUDIO_COM_ERROR), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_AUDIO_COM_ERROR, __pyx_k_ERROR_AUDIO_COM_ERROR, sizeof(__pyx_k_ERROR_AUDIO_COM_ERROR), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_AUDIO_DEVICE_NOT_FOUND, __pyx_k_ERROR_AUDIO_DEVICE_NOT_FOUND, sizeof(__pyx_k_ERROR_AUDIO_DEVICE_NOT_FOUND), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_AUDIO_DEVICE_NOT_FOUND, __pyx_k_ERROR_AUDIO_DEVICE_NOT_FOUND, sizeof(__pyx_k_ERROR_AUDIO_DEVICE_NOT_FOUND), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_BLACKLISTED_GFX_DRIVER, __pyx_k_ERROR_BLACKLISTED_GFX_DRIVER, sizeof(__pyx_k_ERROR_BLACKLISTED_GFX_DRIVER), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_BLACKLISTED_GFX_DRIVER, __pyx_k_ERROR_BLACKLISTED_GFX_DRIVER, sizeof(__pyx_k_ERROR_BLACKLISTED_GFX_DRIVER), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_CLIENT_SKIPPED_DESTROY, __pyx_k_ERROR_CLIENT_SKIPPED_DESTROY, sizeof(__pyx_k_ERROR_CLIENT_SKIPPED_DESTROY), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_CLIENT_SKIPPED_DESTROY, __pyx_k_ERROR_CLIENT_SKIPPED_DESTROY, sizeof(__pyx_k_ERROR_CLIENT_SKIPPED_DESTROY), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_CLIENT_SKIPPED_SHUTDOWN, __pyx_k_ERROR_CLIENT_SKIPPED_SHUTDOWN, sizeof(__pyx_k_ERROR_CLIENT_SKIPPED_SHUTDOWN), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_CLIENT_SKIPPED_SHUTDOWN, __pyx_k_ERROR_CLIENT_SKIPPED_SHUTDOWN, sizeof(__pyx_k_ERROR_CLIENT_SKIPPED_SHUTDOWN), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_CLIENT_VERSION, __pyx_k_ERROR_CLIENT_VERSION, sizeof(__pyx_k_ERROR_CLIENT_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_CLIENT_VERSION, __pyx_k_ERROR_CLIENT_VERSION, sizeof(__pyx_k_ERROR_CLIENT_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_CONTENT_PROTECTION_NOT_AVA, __pyx_k_ERROR_CONTENT_PROTECTION_NOT_AVA, sizeof(__pyx_k_ERROR_CONTENT_PROTECTION_NOT_AVA), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_CONTENT_PROTECTION_NOT_AVA, __pyx_k_ERROR_CONTENT_PROTECTION_NOT_AVA, sizeof(__pyx_k_ERROR_CONTENT_PROTECTION_NOT_AVA), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DEVICE_UNAVAILABLE, __pyx_k_ERROR_DEVICE_UNAVAILABLE, sizeof(__pyx_k_ERROR_DEVICE_UNAVAILABLE), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DEVICE_UNAVAILABLE, __pyx_k_ERROR_DEVICE_UNAVAILABLE, sizeof(__pyx_k_ERROR_DEVICE_UNAVAILABLE), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DISABLED_OR_DEFAULT_ADAPTE, __pyx_k_ERROR_DISABLED_OR_DEFAULT_ADAPTE, sizeof(__pyx_k_ERROR_DISABLED_OR_DEFAULT_ADAPTE), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DISABLED_OR_DEFAULT_ADAPTE, __pyx_k_ERROR_DISABLED_OR_DEFAULT_ADAPTE, sizeof(__pyx_k_ERROR_DISABLED_OR_DEFAULT_ADAPTE), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DISALLOWED, __pyx_k_ERROR_DISALLOWED, sizeof(__pyx_k_ERROR_DISALLOWED), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DISALLOWED, __pyx_k_ERROR_DISALLOWED, sizeof(__pyx_k_ERROR_DISALLOWED), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DISPLAY_INIT, __pyx_k_ERROR_DISPLAY_INIT, sizeof(__pyx_k_ERROR_DISPLAY_INIT), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DISPLAY_INIT, __pyx_k_ERROR_DISPLAY_INIT, sizeof(__pyx_k_ERROR_DISPLAY_INIT), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DISPLAY_LIMIT_REACHED, __pyx_k_ERROR_DISPLAY_LIMIT_REACHED, sizeof(__pyx_k_ERROR_DISPLAY_LIMIT_REACHED), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DISPLAY_LIMIT_REACHED, __pyx_k_ERROR_DISPLAY_LIMIT_REACHED, sizeof(__pyx_k_ERROR_DISPLAY_LIMIT_REACHED), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DISPLAY_LOST, __pyx_k_ERROR_DISPLAY_LOST, sizeof(__pyx_k_ERROR_DISPLAY_LOST), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DISPLAY_LOST, __pyx_k_ERROR_DISPLAY_LOST, sizeof(__pyx_k_ERROR_DISPLAY_LOST), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DISPLAY_MANAGER_INIT, __pyx_k_ERROR_DISPLAY_MANAGER_INIT, sizeof(__pyx_k_ERROR_DISPLAY_MANAGER_INIT), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DISPLAY_MANAGER_INIT, __pyx_k_ERROR_DISPLAY_MANAGER_INIT, sizeof(__pyx_k_ERROR_DISPLAY_MANAGER_INIT), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DISPLAY_PLUGGED_INCORRECTY, __pyx_k_ERROR_DISPLAY_PLUGGED_INCORRECTY, sizeof(__pyx_k_ERROR_DISPLAY_PLUGGED_INCORRECTY), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DISPLAY_PLUGGED_INCORRECTY, __pyx_k_ERROR_DISPLAY_PLUGGED_INCORRECTY, sizeof(__pyx_k_ERROR_DISPLAY_PLUGGED_INCORRECTY), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_DISPLAY_REMOVED, __pyx_k_ERROR_DISPLAY_REMOVED, sizeof(__pyx_k_ERROR_DISPLAY_REMOVED), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_DISPLAY_REMOVED, __pyx_k_ERROR_DISPLAY_REMOVED, sizeof(__pyx_k_ERROR_DISPLAY_REMOVED), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_EXTERNAL_CAMERA_CAPTURE_FA, __pyx_k_ERROR_EXTERNAL_CAMERA_CAPTURE_FA, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_CAPTURE_FA), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_EXTERNAL_CAMERA_CAPTURE_FA, __pyx_k_ERROR_EXTERNAL_CAMERA_CAPTURE_FA, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_CAPTURE_FA), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_EXTERNAL_CAMERA_INITIALIZE, __pyx_k_ERROR_EXTERNAL_CAMERA_INITIALIZE, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_INITIALIZE), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_EXTERNAL_CAMERA_INITIALIZE, __pyx_k_ERROR_EXTERNAL_CAMERA_INITIALIZE, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_INITIALIZE), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_LISTS, __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS, __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2, __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2, __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_WRONG, __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_WRONG, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_NAME_WRONG), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_WRONG, __pyx_k_ERROR_EXTERNAL_CAMERA_NAME_WRONG, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_NAME_WRONG), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_EXTERNAL_CAMERA_NOT_CALIBR, __pyx_k_ERROR_EXTERNAL_CAMERA_NOT_CALIBR, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_NOT_CALIBR), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_EXTERNAL_CAMERA_NOT_CALIBR, __pyx_k_ERROR_EXTERNAL_CAMERA_NOT_CALIBR, sizeof(__pyx_k_ERROR_EXTERNAL_CAMERA_NOT_CALIBR), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_GRAPHICS_DEVICE_RESET, __pyx_k_ERROR_GRAPHICS_DEVICE_RESET, sizeof(__pyx_k_ERROR_GRAPHICS_DEVICE_RESET), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_GRAPHICS_DEVICE_RESET, __pyx_k_ERROR_GRAPHICS_DEVICE_RESET, sizeof(__pyx_k_ERROR_GRAPHICS_DEVICE_RESET), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR, __pyx_k_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR, sizeof(__pyx_k_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR, __pyx_k_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR, sizeof(__pyx_k_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_INCOMPATIBLE_OS, __pyx_k_ERROR_INCOMPATIBLE_OS, sizeof(__pyx_k_ERROR_INCOMPATIBLE_OS), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_INCOMPATIBLE_OS, __pyx_k_ERROR_INCOMPATIBLE_OS, sizeof(__pyx_k_ERROR_INCOMPATIBLE_OS), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_INITIALIZE, __pyx_k_ERROR_INITIALIZE, sizeof(__pyx_k_ERROR_INITIALIZE), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_INITIALIZE, __pyx_k_ERROR_INITIALIZE, sizeof(__pyx_k_ERROR_INITIALIZE), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_INITIALIZE_VULKAN, __pyx_k_ERROR_INITIALIZE_VULKAN, sizeof(__pyx_k_ERROR_INITIALIZE_VULKAN), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_INITIALIZE_VULKAN, __pyx_k_ERROR_INITIALIZE_VULKAN, sizeof(__pyx_k_ERROR_INITIALIZE_VULKAN), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_INSUFFICENT_ARRAY_SIZE, __pyx_k_ERROR_INSUFFICENT_ARRAY_SIZE, sizeof(__pyx_k_ERROR_INSUFFICENT_ARRAY_SIZE), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_INSUFFICENT_ARRAY_SIZE, __pyx_k_ERROR_INSUFFICENT_ARRAY_SIZE, sizeof(__pyx_k_ERROR_INSUFFICENT_ARRAY_SIZE), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_INVALID_HEADSET_ORIENTATIO, __pyx_k_ERROR_INVALID_HEADSET_ORIENTATIO, sizeof(__pyx_k_ERROR_INVALID_HEADSET_ORIENTATIO), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_INVALID_HEADSET_ORIENTATIO, __pyx_k_ERROR_INVALID_HEADSET_ORIENTATIO, sizeof(__pyx_k_ERROR_INVALID_HEADSET_ORIENTATIO), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_INVALID_OPERATION, __pyx_k_ERROR_INVALID_OPERATION, sizeof(__pyx_k_ERROR_INVALID_OPERATION), 0, 0, 1, 1},
  {&__pyx_n_s_ERROR_INVALID_PARAMETER, __pyx_k_ERROR_INVALID_PARAMETER, sizeof(__pyx_k_ERROR_INVALID_PARAMETER), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_INVALID_PARAMETER, __pyx_k_ERROR_INVALID_PARAMETER, sizeof(__pyx_k_ERROR_INVALID_PARAMETER), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_INVALID_SESSION, __pyx_k_ERROR_INVALID_SESSION, sizeof(__pyx_k_ERROR_INVALID_SESSION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_INVALID_SESSION, __pyx_k_ERROR_INVALID_SESSION, sizeof(__pyx_k_ERROR_INVALID_SESSION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_LEAKING_RESOURCES, __pyx_k_ERROR_LEAKING_RESOURCES, sizeof(__pyx_k_ERROR_LEAKING_RESOURCES), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_LEAKING_RESOURCES, __pyx_k_ERROR_LEAKING_RESOURCES, sizeof(__pyx_k_ERROR_LEAKING_RESOURCES), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_LIB_LOAD, __pyx_k_ERROR_LIB_LOAD, sizeof(__pyx_k_ERROR_LIB_LOAD), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_LIB_LOAD, __pyx_k_ERROR_LIB_LOAD, sizeof(__pyx_k_ERROR_LIB_LOAD), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_LIB_PATH, __pyx_k_ERROR_LIB_PATH, sizeof(__pyx_k_ERROR_LIB_PATH), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_LIB_PATH, __pyx_k_ERROR_LIB_PATH, sizeof(__pyx_k_ERROR_LIB_PATH), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_LIB_SIGN_CHECK, __pyx_k_ERROR_LIB_SIGN_CHECK, sizeof(__pyx_k_ERROR_LIB_SIGN_CHECK), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_LIB_SIGN_CHECK, __pyx_k_ERROR_LIB_SIGN_CHECK, sizeof(__pyx_k_ERROR_LIB_SIGN_CHECK), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_LIB_SYMBOLS, __pyx_k_ERROR_LIB_SYMBOLS, sizeof(__pyx_k_ERROR_LIB_SYMBOLS), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_LIB_SYMBOLS, __pyx_k_ERROR_LIB_SYMBOLS, sizeof(__pyx_k_ERROR_LIB_SYMBOLS), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_LOST_TRACKING, __pyx_k_ERROR_LOST_TRACKING, sizeof(__pyx_k_ERROR_LOST_TRACKING), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_LOST_TRACKING, __pyx_k_ERROR_LOST_TRACKING, sizeof(__pyx_k_ERROR_LOST_TRACKING), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_MEMORY_ALLOCATION_FAILURE, __pyx_k_ERROR_MEMORY_ALLOCATION_FAILURE, sizeof(__pyx_k_ERROR_MEMORY_ALLOCATION_FAILURE), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_MEMORY_ALLOCATION_FAILURE, __pyx_k_ERROR_MEMORY_ALLOCATION_FAILURE, sizeof(__pyx_k_ERROR_MEMORY_ALLOCATION_FAILURE), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_MISFORMATTED_BLOCK, __pyx_k_ERROR_MISFORMATTED_BLOCK, sizeof(__pyx_k_ERROR_MISFORMATTED_BLOCK), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_MISFORMATTED_BLOCK, __pyx_k_ERROR_MISFORMATTED_BLOCK, sizeof(__pyx_k_ERROR_MISFORMATTED_BLOCK), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_MISMATCHED_ADAPTERS, __pyx_k_ERROR_MISMATCHED_ADAPTERS, sizeof(__pyx_k_ERROR_MISMATCHED_ADAPTERS), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_MISMATCHED_ADAPTERS, __pyx_k_ERROR_MISMATCHED_ADAPTERS, sizeof(__pyx_k_ERROR_MISMATCHED_ADAPTERS), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_NOT_INITIALIZED, __pyx_k_ERROR_NOT_INITIALIZED, sizeof(__pyx_k_ERROR_NOT_INITIALIZED), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_NOT_INITIALIZED, __pyx_k_ERROR_NOT_INITIALIZED, sizeof(__pyx_k_ERROR_NOT_INITIALIZED), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_NO_CALIBRATION, __pyx_k_ERROR_NO_CALIBRATION, sizeof(__pyx_k_ERROR_NO_CALIBRATION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_NO_CALIBRATION, __pyx_k_ERROR_NO_CALIBRATION, sizeof(__pyx_k_ERROR_NO_CALIBRATION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_NO_EXTERNAL_CAMERA_INFO, __pyx_k_ERROR_NO_EXTERNAL_CAMERA_INFO, sizeof(__pyx_k_ERROR_NO_EXTERNAL_CAMERA_INFO), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_NO_EXTERNAL_CAMERA_INFO, __pyx_k_ERROR_NO_EXTERNAL_CAMERA_INFO, sizeof(__pyx_k_ERROR_NO_EXTERNAL_CAMERA_INFO), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_NO_HMD, __pyx_k_ERROR_NO_HMD, sizeof(__pyx_k_ERROR_NO_HMD), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_NO_HMD, __pyx_k_ERROR_NO_HMD, sizeof(__pyx_k_ERROR_NO_HMD), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_NO_VALID_VR_DISPLAY_SYSTEM, __pyx_k_ERROR_NO_VALID_VR_DISPLAY_SYSTEM, sizeof(__pyx_k_ERROR_NO_VALID_VR_DISPLAY_SYSTEM), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_NO_VALID_VR_DISPLAY_SYSTEM, __pyx_k_ERROR_NO_VALID_VR_DISPLAY_SYSTEM, sizeof(__pyx_k_ERROR_NO_VALID_VR_DISPLAY_SYSTEM), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_OBSOLETE, __pyx_k_ERROR_OBSOLETE, sizeof(__pyx_k_ERROR_OBSOLETE), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_OBSOLETE, __pyx_k_ERROR_OBSOLETE, sizeof(__pyx_k_ERROR_OBSOLETE), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_OLD_VERSION, __pyx_k_ERROR_OLD_VERSION, sizeof(__pyx_k_ERROR_OLD_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_OLD_VERSION, __pyx_k_ERROR_OLD_VERSION, sizeof(__pyx_k_ERROR_OLD_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_OUT_OF_DATE_GFX_DRIVER, __pyx_k_ERROR_OUT_OF_DATE_GFX_DRIVER, sizeof(__pyx_k_ERROR_OUT_OF_DATE_GFX_DRIVER), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_OUT_OF_DATE_GFX_DRIVER, __pyx_k_ERROR_OUT_OF_DATE_GFX_DRIVER, sizeof(__pyx_k_ERROR_OUT_OF_DATE_GFX_DRIVER), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_OUT_OF_DATE_OS, __pyx_k_ERROR_OUT_OF_DATE_OS, sizeof(__pyx_k_ERROR_OUT_OF_DATE_OS), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_OUT_OF_DATE_OS, __pyx_k_ERROR_OUT_OF_DATE_OS, sizeof(__pyx_k_ERROR_OUT_OF_DATE_OS), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_REINITIALIZATION, __pyx_k_ERROR_REINITIALIZATION, sizeof(__pyx_k_ERROR_REINITIALIZATION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_REINITIALIZATION, __pyx_k_ERROR_REINITIALIZATION, sizeof(__pyx_k_ERROR_REINITIALIZATION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_REMOTE_SESSION, __pyx_k_ERROR_REMOTE_SESSION, sizeof(__pyx_k_ERROR_REMOTE_SESSION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_REMOTE_SESSION, __pyx_k_ERROR_REMOTE_SESSION, sizeof(__pyx_k_ERROR_REMOTE_SESSION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_RUNTIME_EXCEPTION, __pyx_k_ERROR_RUNTIME_EXCEPTION, sizeof(__pyx_k_ERROR_RUNTIME_EXCEPTION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_RUNTIME_EXCEPTION, __pyx_k_ERROR_RUNTIME_EXCEPTION, sizeof(__pyx_k_ERROR_RUNTIME_EXCEPTION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_SERVER_START, __pyx_k_ERROR_SERVER_START, sizeof(__pyx_k_ERROR_SERVER_START), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_SERVER_START, __pyx_k_ERROR_SERVER_START, sizeof(__pyx_k_ERROR_SERVER_START), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_SERVICE_CONNECTION, __pyx_k_ERROR_SERVICE_CONNECTION, sizeof(__pyx_k_ERROR_SERVICE_CONNECTION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_SERVICE_CONNECTION, __pyx_k_ERROR_SERVICE_CONNECTION, sizeof(__pyx_k_ERROR_SERVICE_CONNECTION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_SERVICE_DEADLOCK_DETECTED, __pyx_k_ERROR_SERVICE_DEADLOCK_DETECTED, sizeof(__pyx_k_ERROR_SERVICE_DEADLOCK_DETECTED), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_SERVICE_DEADLOCK_DETECTED, __pyx_k_ERROR_SERVICE_DEADLOCK_DETECTED, sizeof(__pyx_k_ERROR_SERVICE_DEADLOCK_DETECTED), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_SERVICE_ERROR, __pyx_k_ERROR_SERVICE_ERROR, sizeof(__pyx_k_ERROR_SERVICE_ERROR), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_SERVICE_ERROR, __pyx_k_ERROR_SERVICE_ERROR, sizeof(__pyx_k_ERROR_SERVICE_ERROR), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_SERVICE_VERSION, __pyx_k_ERROR_SERVICE_VERSION, sizeof(__pyx_k_ERROR_SERVICE_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_SERVICE_VERSION, __pyx_k_ERROR_SERVICE_VERSION, sizeof(__pyx_k_ERROR_SERVICE_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_TEXTURE_SWAP_CHAIN_FULL, __pyx_k_ERROR_TEXTURE_SWAP_CHAIN_FULL, sizeof(__pyx_k_ERROR_TEXTURE_SWAP_CHAIN_FULL), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_FULL, __pyx_k_ERROR_TEXTURE_SWAP_CHAIN_FULL, sizeof(__pyx_k_ERROR_TEXTURE_SWAP_CHAIN_FULL), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_TEXTURE_SWAP_CHAIN_INVALID, __pyx_k_ERROR_TEXTURE_SWAP_CHAIN_INVALID, sizeof(__pyx_k_ERROR_TEXTURE_SWAP_CHAIN_INVALID), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_INVALID, __pyx_k_ERROR_TEXTURE_SWAP_CHAIN_INVALID, sizeof(__pyx_k_ERROR_TEXTURE_SWAP_CHAIN_INVALID), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_TIMEOUT, __pyx_k_ERROR_TIMEOUT, sizeof(__pyx_k_ERROR_TIMEOUT), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_TIMEOUT, __pyx_k_ERROR_TIMEOUT, sizeof(__pyx_k_ERROR_TIMEOUT), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_TRACKER_DRIVER_INIT, __pyx_k_ERROR_TRACKER_DRIVER_INIT, sizeof(__pyx_k_ERROR_TRACKER_DRIVER_INIT), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_TRACKER_DRIVER_INIT, __pyx_k_ERROR_TRACKER_DRIVER_INIT, sizeof(__pyx_k_ERROR_TRACKER_DRIVER_INIT), 0, 1, 0, 1},
  {&__pyx_n_s_ERROR_UNSUPPORTED, __pyx_k_ERROR_UNSUPPORTED, sizeof(__pyx_k_ERROR_UNSUPPORTED), 0, 0, 1, 1},
  {&__pyx_n_u_ERROR_UNSUPPORTED, __pyx_k_ERROR_UNSUPPORTED, sizeof(__pyx_k_ERROR_UNSUPPORTED), 0, 1, 0, 1},
  {&__pyx_n_s_EYE_COUNT, __pyx_k_EYE_COUNT, sizeof(__pyx_k_EYE_COUNT), 0, 0, 1, 1},
  {&__pyx_n_u_EYE_COUNT, __pyx_k_EYE_COUNT, sizeof(__pyx_k_EYE_COUNT), 0, 1, 0, 1},
  {&__pyx_n_s_EYE_LEFT, __pyx_k_EYE_LEFT, sizeof(__pyx_k_EYE_LEFT), 0, 0, 1, 1},
  {&__pyx_n_u_EYE_LEFT, __pyx_k_EYE_LEFT, sizeof(__pyx_k_EYE_LEFT), 0, 1, 0, 1},
  {&__pyx_n_s_EYE_RIGHT, __pyx_k_EYE_RIGHT, sizeof(__pyx_k_EYE_RIGHT), 0, 0, 1, 1},
  {&__pyx_n_u_EYE_RIGHT, __pyx_k_EYE_RIGHT, sizeof(__pyx_k_EYE_RIGHT), 0, 1, 0, 1},
  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
  {&__pyx_n_s_FEATURE_VERSION, __pyx_k_FEATURE_VERSION, sizeof(__pyx_k_FEATURE_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_FEATURE_VERSION, __pyx_k_FEATURE_VERSION, sizeof(__pyx_k_FEATURE_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_FORMAT_D16_UNORM, __pyx_k_FORMAT_D16_UNORM, sizeof(__pyx_k_FORMAT_D16_UNORM), 0, 0, 1, 1},
  {&__pyx_n_u_FORMAT_D16_UNORM, __pyx_k_FORMAT_D16_UNORM, sizeof(__pyx_k_FORMAT_D16_UNORM), 0, 1, 0, 1},
  {&__pyx_n_s_FORMAT_D24_UNORM_S8_UINT, __pyx_k_FORMAT_D24_UNORM_S8_UINT, sizeof(__pyx_k_FORMAT_D24_UNORM_S8_UINT), 0, 0, 1, 1},
  {&__pyx_n_u_FORMAT_D24_UNORM_S8_UINT, __pyx_k_FORMAT_D24_UNORM_S8_UINT, sizeof(__pyx_k_FORMAT_D24_UNORM_S8_UINT), 0, 1, 0, 1},
  {&__pyx_n_s_FORMAT_D32_FLOAT, __pyx_k_FORMAT_D32_FLOAT, sizeof(__pyx_k_FORMAT_D32_FLOAT), 0, 0, 1, 1},
  {&__pyx_n_u_FORMAT_D32_FLOAT, __pyx_k_FORMAT_D32_FLOAT, sizeof(__pyx_k_FORMAT_D32_FLOAT), 0, 1, 0, 1},
  {&__pyx_n_s_FORMAT_R11G11B10_FLOAT, __pyx_k_FORMAT_R11G11B10_FLOAT, sizeof(__pyx_k_FORMAT_R11G11B10_FLOAT), 0, 0, 1, 1},
  {&__pyx_n_u_FORMAT_R11G11B10_FLOAT, __pyx_k_FORMAT_R11G11B10_FLOAT, sizeof(__pyx_k_FORMAT_R11G11B10_FLOAT), 0, 1, 0, 1},
  {&__pyx_n_s_FORMAT_R16G16B16A16_FLOAT, __pyx_k_FORMAT_R16G16B16A16_FLOAT, sizeof(__pyx_k_FORMAT_R16G16B16A16_FLOAT), 0, 0, 1, 1},
  {&__pyx_n_u_FORMAT_R16G16B16A16_FLOAT, __pyx_k_FORMAT_R16G16B16A16_FLOAT, sizeof(__pyx_k_FORMAT_R16G16B16A16_FLOAT), 0, 1, 0, 1},
  {&__pyx_n_s_FORMAT_R8G8B8A8_UNORM, __pyx_k_FORMAT_R8G8B8A8_UNORM, sizeof(__pyx_k_FORMAT_R8G8B8A8_UNORM), 0, 0, 1, 1},
  {&__pyx_n_u_FORMAT_R8G8B8A8_UNORM, __pyx_k_FORMAT_R8G8B8A8_UNORM, sizeof(__pyx_k_FORMAT_R8G8B8A8_UNORM), 0, 1, 0, 1},
  {&__pyx_n_s_FORMAT_R8G8B8A8_UNORM_SRGB, __pyx_k_FORMAT_R8G8B8A8_UNORM_SRGB, sizeof(__pyx_k_FORMAT_R8G8B8A8_UNORM_SRGB), 0, 0, 1, 1},
  {&__pyx_n_u_FORMAT_R8G8B8A8_UNORM_SRGB, __pyx_k_FORMAT_R8G8B8A8_UNORM_SRGB, sizeof(__pyx_k_FORMAT_R8G8B8A8_UNORM_SRGB), 0, 1, 0, 1},
  {&__pyx_kp_u_Failed_to_allocate_array_deviceP, __pyx_k_Failed_to_allocate_array_deviceP, sizeof(__pyx_k_Failed_to_allocate_array_deviceP), 0, 1, 0, 0},
  {&__pyx_kp_u_Failed_to_allocate_array_devices, __pyx_k_Failed_to_allocate_array_devices, sizeof(__pyx_k_Failed_to_allocate_array_devices), 0, 1, 0, 0},
  {&__pyx_kp_u_Failed_to_allocate_ovrPosef_in_t, __pyx_k_Failed_to_allocate_ovrPosef_in_t, sizeof(__pyx_k_Failed_to_allocate_ovrPosef_in_t), 0, 1, 0, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
  {&__pyx_n_s_HAND_COUNT, __pyx_k_HAND_COUNT, sizeof(__pyx_k_HAND_COUNT), 0, 0, 1, 1},
  {&__pyx_n_u_HAND_COUNT, __pyx_k_HAND_COUNT, sizeof(__pyx_k_HAND_COUNT), 0, 1, 0, 1},
  {&__pyx_n_s_HAND_LEFT, __pyx_k_HAND_LEFT, sizeof(__pyx_k_HAND_LEFT), 0, 0, 1, 1},
  {&__pyx_n_u_HAND_LEFT, __pyx_k_HAND_LEFT, sizeof(__pyx_k_HAND_LEFT), 0, 1, 0, 1},
  {&__pyx_n_s_HAND_RIGHT, __pyx_k_HAND_RIGHT, sizeof(__pyx_k_HAND_RIGHT), 0, 0, 1, 1},
  {&__pyx_n_u_HAND_RIGHT, __pyx_k_HAND_RIGHT, sizeof(__pyx_k_HAND_RIGHT), 0, 1, 0, 1},
  {&__pyx_n_s_HAPTICS_BUFFER_SAMPLES_MAX, __pyx_k_HAPTICS_BUFFER_SAMPLES_MAX, sizeof(__pyx_k_HAPTICS_BUFFER_SAMPLES_MAX), 0, 0, 1, 1},
  {&__pyx_n_u_HAPTICS_BUFFER_SAMPLES_MAX, __pyx_k_HAPTICS_BUFFER_SAMPLES_MAX, sizeof(__pyx_k_HAPTICS_BUFFER_SAMPLES_MAX), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_CB, __pyx_k_HMD_CB, sizeof(__pyx_k_HMD_CB), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_CB, __pyx_k_HMD_CB, sizeof(__pyx_k_HMD_CB), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_CV1, __pyx_k_HMD_CV1, sizeof(__pyx_k_HMD_CV1), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_CV1, __pyx_k_HMD_CV1, sizeof(__pyx_k_HMD_CV1), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_DK1, __pyx_k_HMD_DK1, sizeof(__pyx_k_HMD_DK1), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_DK1, __pyx_k_HMD_DK1, sizeof(__pyx_k_HMD_DK1), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_DK2, __pyx_k_HMD_DK2, sizeof(__pyx_k_HMD_DK2), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_DK2, __pyx_k_HMD_DK2, sizeof(__pyx_k_HMD_DK2), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_DKHD, __pyx_k_HMD_DKHD, sizeof(__pyx_k_HMD_DKHD), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_DKHD, __pyx_k_HMD_DKHD, sizeof(__pyx_k_HMD_DKHD), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_E3_2015, __pyx_k_HMD_E3_2015, sizeof(__pyx_k_HMD_E3_2015), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_E3_2015, __pyx_k_HMD_E3_2015, sizeof(__pyx_k_HMD_E3_2015), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_ES06, __pyx_k_HMD_ES06, sizeof(__pyx_k_HMD_ES06), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_ES06, __pyx_k_HMD_ES06, sizeof(__pyx_k_HMD_ES06), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_ES09, __pyx_k_HMD_ES09, sizeof(__pyx_k_HMD_ES09), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_ES09, __pyx_k_HMD_ES09, sizeof(__pyx_k_HMD_ES09), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_ES11, __pyx_k_HMD_ES11, sizeof(__pyx_k_HMD_ES11), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_ES11, __pyx_k_HMD_ES11, sizeof(__pyx_k_HMD_ES11), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_NONE, __pyx_k_HMD_NONE, sizeof(__pyx_k_HMD_NONE), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_NONE, __pyx_k_HMD_NONE, sizeof(__pyx_k_HMD_NONE), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_OTHER, __pyx_k_HMD_OTHER, sizeof(__pyx_k_HMD_OTHER), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_OTHER, __pyx_k_HMD_OTHER, sizeof(__pyx_k_HMD_OTHER), 0, 1, 0, 1},
  {&__pyx_n_s_HMD_RIFTS, __pyx_k_HMD_RIFTS, sizeof(__pyx_k_HMD_RIFTS), 0, 0, 1, 1},
  {&__pyx_n_u_HMD_RIFTS, __pyx_k_HMD_RIFTS, sizeof(__pyx_k_HMD_RIFTS), 0, 1, 0, 1},
  {&__pyx_n_s_HasInputFocus, __pyx_k_HasInputFocus, sizeof(__pyx_k_HasInputFocus), 0, 0, 1, 1},
  {&__pyx_n_s_HmdMounted, __pyx_k_HmdMounted, sizeof(__pyx_k_HmdMounted), 0, 0, 1, 1},
  {&__pyx_n_s_HmdPresent, __pyx_k_HmdPresent, sizeof(__pyx_k_HmdPresent), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
  {&__pyx_kp_u_Interpolation_factor_must_be_bet, __pyx_k_Interpolation_factor_must_be_bet, sizeof(__pyx_k_Interpolation_factor_must_be_bet), 0, 1, 0, 0},
  {&__pyx_kp_u_Invalid_boundary_type_specified, __pyx_k_Invalid_boundary_type_specified, sizeof(__pyx_k_Invalid_boundary_type_specified), 0, 1, 0, 0},
  {&__pyx_kp_u_Invalid_controller_type_specifie, __pyx_k_Invalid_controller_type_specifie, sizeof(__pyx_k_Invalid_controller_type_specifie), 0, 1, 0, 0},
  {&__pyx_kp_u_Invalid_frequency_specified, __pyx_k_Invalid_frequency_specified, sizeof(__pyx_k_Invalid_frequency_specified), 0, 1, 0, 0},
  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
  {&__pyx_kp_u_Invalid_tracking_origin_type_spe, __pyx_k_Invalid_tracking_origin_type_spe, sizeof(__pyx_k_Invalid_tracking_origin_type_spe), 0, 1, 0, 0},
  {&__pyx_kp_u_Invalid_trigger_mode_specified, __pyx_k_Invalid_trigger_mode_specified, sizeof(__pyx_k_Invalid_trigger_mode_specified), 0, 1, 0, 0},
  {&__pyx_kp_u_Invalid_value_for_pose_must_be_L, __pyx_k_Invalid_value_for_pose_must_be_L, sizeof(__pyx_k_Invalid_value_for_pose_must_be_L), 0, 1, 0, 0},
  {&__pyx_n_s_IsVisible, __pyx_k_IsVisible, sizeof(__pyx_k_IsVisible), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_EYE_HEIGHT, __pyx_k_KEY_EYE_HEIGHT, sizeof(__pyx_k_KEY_EYE_HEIGHT), 0, 0, 1, 1},
  {&__pyx_n_u_KEY_EYE_HEIGHT, __pyx_k_KEY_EYE_HEIGHT, sizeof(__pyx_k_KEY_EYE_HEIGHT), 0, 1, 0, 1},
  {&__pyx_n_s_KEY_EYE_TO_NOSE_DISTANCE, __pyx_k_KEY_EYE_TO_NOSE_DISTANCE, sizeof(__pyx_k_KEY_EYE_TO_NOSE_DISTANCE), 0, 0, 1, 1},
  {&__pyx_n_u_KEY_EYE_TO_NOSE_DISTANCE, __pyx_k_KEY_EYE_TO_NOSE_DISTANCE, sizeof(__pyx_k_KEY_EYE_TO_NOSE_DISTANCE), 0, 1, 0, 1},
  {&__pyx_n_s_KEY_GENDER, __pyx_k_KEY_GENDER, sizeof(__pyx_k_KEY_GENDER), 0, 0, 1, 1},
  {&__pyx_n_u_KEY_GENDER, __pyx_k_KEY_GENDER, sizeof(__pyx_k_KEY_GENDER), 0, 1, 0, 1},
  {&__pyx_n_s_KEY_NAME, __pyx_k_KEY_NAME, sizeof(__pyx_k_KEY_NAME), 0, 0, 1, 1},
  {&__pyx_n_u_KEY_NAME, __pyx_k_KEY_NAME, sizeof(__pyx_k_KEY_NAME), 0, 1, 0, 1},
  {&__pyx_n_s_KEY_NECK_TO_EYE_DISTANCE, __pyx_k_KEY_NECK_TO_EYE_DISTANCE, sizeof(__pyx_k_KEY_NECK_TO_EYE_DISTANCE), 0, 0, 1, 1},
  {&__pyx_n_u_KEY_NECK_TO_EYE_DISTANCE, __pyx_k_KEY_NECK_TO_EYE_DISTANCE, sizeof(__pyx_k_KEY_NECK_TO_EYE_DISTANCE), 0, 1, 0, 1},
  {&__pyx_n_s_KEY_PLAYER_HEIGHT, __pyx_k_KEY_PLAYER_HEIGHT, sizeof(__pyx_k_KEY_PLAYER_HEIGHT), 0, 0, 1, 1},
  {&__pyx_n_u_KEY_PLAYER_HEIGHT, __pyx_k_KEY_PLAYER_HEIGHT, sizeof(__pyx_k_KEY_PLAYER_HEIGHT), 0, 1, 0, 1},
  {&__pyx_n_s_KEY_USER, __pyx_k_KEY_USER, sizeof(__pyx_k_KEY_USER), 0, 0, 1, 1},
  {&__pyx_n_u_KEY_USER, __pyx_k_KEY_USER, sizeof(__pyx_k_KEY_USER), 0, 1, 0, 1},
  {&__pyx_n_s_LAYER_FLAG_HEAD_LOCKED, __pyx_k_LAYER_FLAG_HEAD_LOCKED, sizeof(__pyx_k_LAYER_FLAG_HEAD_LOCKED), 0, 0, 1, 1},
  {&__pyx_n_u_LAYER_FLAG_HEAD_LOCKED, __pyx_k_LAYER_FLAG_HEAD_LOCKED, sizeof(__pyx_k_LAYER_FLAG_HEAD_LOCKED), 0, 1, 0, 1},
  {&__pyx_n_s_LAYER_FLAG_HIGH_QUALITY, __pyx_k_LAYER_FLAG_HIGH_QUALITY, sizeof(__pyx_k_LAYER_FLAG_HIGH_QUALITY), 0, 0, 1, 1},
  {&__pyx_n_u_LAYER_FLAG_HIGH_QUALITY, __pyx_k_LAYER_FLAG_HIGH_QUALITY, sizeof(__pyx_k_LAYER_FLAG_HIGH_QUALITY), 0, 1, 0, 1},
  {&__pyx_n_s_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT, __pyx_k_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT, sizeof(__pyx_k_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT), 0, 0, 1, 1},
  {&__pyx_n_u_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT, __pyx_k_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT, sizeof(__pyx_k_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT), 0, 1, 0, 1},
  {&__pyx_n_s_LAYER_HUD_CURRENT_LAYER, __pyx_k_LAYER_HUD_CURRENT_LAYER, sizeof(__pyx_k_LAYER_HUD_CURRENT_LAYER), 0, 0, 1, 1},
  {&__pyx_n_s_LAYER_HUD_MODE, __pyx_k_LAYER_HUD_MODE, sizeof(__pyx_k_LAYER_HUD_MODE), 0, 0, 1, 1},
  {&__pyx_n_s_LAYER_HUD_SHOW_ALL_LAYERS, __pyx_k_LAYER_HUD_SHOW_ALL_LAYERS, sizeof(__pyx_k_LAYER_HUD_SHOW_ALL_LAYERS), 0, 0, 1, 1},
  {&__pyx_n_s_LOG_LEVEL_DEBUG, __pyx_k_LOG_LEVEL_DEBUG, sizeof(__pyx_k_LOG_LEVEL_DEBUG), 0, 0, 1, 1},
  {&__pyx_n_u_LOG_LEVEL_DEBUG, __pyx_k_LOG_LEVEL_DEBUG, sizeof(__pyx_k_LOG_LEVEL_DEBUG), 0, 1, 0, 1},
  {&__pyx_n_s_LOG_LEVEL_ERROR, __pyx_k_LOG_LEVEL_ERROR, sizeof(__pyx_k_LOG_LEVEL_ERROR), 0, 0, 1, 1},
  {&__pyx_n_u_LOG_LEVEL_ERROR, __pyx_k_LOG_LEVEL_ERROR, sizeof(__pyx_k_LOG_LEVEL_ERROR), 0, 1, 0, 1},
  {&__pyx_n_s_LOG_LEVEL_INFO, __pyx_k_LOG_LEVEL_INFO, sizeof(__pyx_k_LOG_LEVEL_INFO), 0, 0, 1, 1},
  {&__pyx_n_u_LOG_LEVEL_INFO, __pyx_k_LOG_LEVEL_INFO, sizeof(__pyx_k_LOG_LEVEL_INFO), 0, 1, 0, 1},
  {&__pyx_kp_u_Laurie_M_Wilcox, __pyx_k_Laurie_M_Wilcox, sizeof(__pyx_k_Laurie_M_Wilcox), 0, 1, 0, 0},
  {&__pyx_n_s_LibOVRBoundaryTestResult, __pyx_k_LibOVRBoundaryTestResult, sizeof(__pyx_k_LibOVRBoundaryTestResult), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRBoundaryTestResult, __pyx_k_LibOVRBoundaryTestResult, sizeof(__pyx_k_LibOVRBoundaryTestResult), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRBounds, __pyx_k_LibOVRBounds, sizeof(__pyx_k_LibOVRBounds), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRBounds, __pyx_k_LibOVRBounds, sizeof(__pyx_k_LibOVRBounds), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRHapticsBuffer, __pyx_k_LibOVRHapticsBuffer, sizeof(__pyx_k_LibOVRHapticsBuffer), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRHapticsBuffer, __pyx_k_LibOVRHapticsBuffer, sizeof(__pyx_k_LibOVRHapticsBuffer), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRHapticsInfo, __pyx_k_LibOVRHapticsInfo, sizeof(__pyx_k_LibOVRHapticsInfo), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRHapticsInfo, __pyx_k_LibOVRHapticsInfo, sizeof(__pyx_k_LibOVRHapticsInfo), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRHmdInfo, __pyx_k_LibOVRHmdInfo, sizeof(__pyx_k_LibOVRHmdInfo), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRHmdInfo, __pyx_k_LibOVRHmdInfo, sizeof(__pyx_k_LibOVRHmdInfo), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRPerfStats, __pyx_k_LibOVRPerfStats, sizeof(__pyx_k_LibOVRPerfStats), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRPerfStats, __pyx_k_LibOVRPerfStats, sizeof(__pyx_k_LibOVRPerfStats), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRPerfStatsPerCompositorFram, __pyx_k_LibOVRPerfStatsPerCompositorFram, sizeof(__pyx_k_LibOVRPerfStatsPerCompositorFram), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRPerfStatsPerCompositorFram, __pyx_k_LibOVRPerfStatsPerCompositorFram, sizeof(__pyx_k_LibOVRPerfStatsPerCompositorFram), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRPose, __pyx_k_LibOVRPose, sizeof(__pyx_k_LibOVRPose), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRPose, __pyx_k_LibOVRPose, sizeof(__pyx_k_LibOVRPose), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRPoseState, __pyx_k_LibOVRPoseState, sizeof(__pyx_k_LibOVRPoseState), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRPoseState, __pyx_k_LibOVRPoseState, sizeof(__pyx_k_LibOVRPoseState), 0, 1, 0, 1},
  {&__pyx_kp_u_LibOVRPose_px_py_pz_rx_ry_rz_rw, __pyx_k_LibOVRPose_px_py_pz_rx_ry_rz_rw, sizeof(__pyx_k_LibOVRPose_px_py_pz_rx_ry_rz_rw), 0, 1, 0, 0},
  {&__pyx_n_s_LibOVRSessionStatus, __pyx_k_LibOVRSessionStatus, sizeof(__pyx_k_LibOVRSessionStatus), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRSessionStatus, __pyx_k_LibOVRSessionStatus, sizeof(__pyx_k_LibOVRSessionStatus), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRTrackerInfo, __pyx_k_LibOVRTrackerInfo, sizeof(__pyx_k_LibOVRTrackerInfo), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRTrackerInfo, __pyx_k_LibOVRTrackerInfo, sizeof(__pyx_k_LibOVRTrackerInfo), 0, 1, 0, 1},
  {&__pyx_n_s_LibOVRTrackingState, __pyx_k_LibOVRTrackingState, sizeof(__pyx_k_LibOVRTrackingState), 0, 0, 1, 1},
  {&__pyx_n_u_LibOVRTrackingState, __pyx_k_LibOVRTrackingState, sizeof(__pyx_k_LibOVRTrackingState), 0, 1, 0, 1},
  {&__pyx_n_s_MAJOR_VERSION, __pyx_k_MAJOR_VERSION, sizeof(__pyx_k_MAJOR_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_MAJOR_VERSION, __pyx_k_MAJOR_VERSION, sizeof(__pyx_k_MAJOR_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_MAX_PROVIDED_FRAME_STATS, __pyx_k_MAX_PROVIDED_FRAME_STATS, sizeof(__pyx_k_MAX_PROVIDED_FRAME_STATS), 0, 0, 1, 1},
  {&__pyx_n_u_MAX_PROVIDED_FRAME_STATS, __pyx_k_MAX_PROVIDED_FRAME_STATS, sizeof(__pyx_k_MAX_PROVIDED_FRAME_STATS), 0, 1, 0, 1},
  {&__pyx_n_s_MINOR_VERSION, __pyx_k_MINOR_VERSION, sizeof(__pyx_k_MINOR_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_MINOR_VERSION, __pyx_k_MINOR_VERSION, sizeof(__pyx_k_MINOR_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_MIN_REQUESTABLE_MINOR_VERSION, __pyx_k_MIN_REQUESTABLE_MINOR_VERSION, sizeof(__pyx_k_MIN_REQUESTABLE_MINOR_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_MIN_REQUESTABLE_MINOR_VERSION, __pyx_k_MIN_REQUESTABLE_MINOR_VERSION, sizeof(__pyx_k_MIN_REQUESTABLE_MINOR_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_MIRROR_OPTION_DEFAULT, __pyx_k_MIRROR_OPTION_DEFAULT, sizeof(__pyx_k_MIRROR_OPTION_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_u_MIRROR_OPTION_DEFAULT, __pyx_k_MIRROR_OPTION_DEFAULT, sizeof(__pyx_k_MIRROR_OPTION_DEFAULT), 0, 1, 0, 1},
  {&__pyx_n_s_MIRROR_OPTION_FORCE_SYMMETRIC_FO, __pyx_k_MIRROR_OPTION_FORCE_SYMMETRIC_FO, sizeof(__pyx_k_MIRROR_OPTION_FORCE_SYMMETRIC_FO), 0, 0, 1, 1},
  {&__pyx_n_u_MIRROR_OPTION_FORCE_SYMMETRIC_FO, __pyx_k_MIRROR_OPTION_FORCE_SYMMETRIC_FO, sizeof(__pyx_k_MIRROR_OPTION_FORCE_SYMMETRIC_FO), 0, 1, 0, 1},
  {&__pyx_n_s_MIRROR_OPTION_INCLUDE_GUARDIAN, __pyx_k_MIRROR_OPTION_INCLUDE_GUARDIAN, sizeof(__pyx_k_MIRROR_OPTION_INCLUDE_GUARDIAN), 0, 0, 1, 1},
  {&__pyx_n_u_MIRROR_OPTION_INCLUDE_GUARDIAN, __pyx_k_MIRROR_OPTION_INCLUDE_GUARDIAN, sizeof(__pyx_k_MIRROR_OPTION_INCLUDE_GUARDIAN), 0, 1, 0, 1},
  {&__pyx_n_s_MIRROR_OPTION_INCLUDE_NOTIFICATI, __pyx_k_MIRROR_OPTION_INCLUDE_NOTIFICATI, sizeof(__pyx_k_MIRROR_OPTION_INCLUDE_NOTIFICATI), 0, 0, 1, 1},
  {&__pyx_n_u_MIRROR_OPTION_INCLUDE_NOTIFICATI, __pyx_k_MIRROR_OPTION_INCLUDE_NOTIFICATI, sizeof(__pyx_k_MIRROR_OPTION_INCLUDE_NOTIFICATI), 0, 1, 0, 1},
  {&__pyx_n_s_MIRROR_OPTION_INCLUDE_SYSTEM_GUI, __pyx_k_MIRROR_OPTION_INCLUDE_SYSTEM_GUI, sizeof(__pyx_k_MIRROR_OPTION_INCLUDE_SYSTEM_GUI), 0, 0, 1, 1},
  {&__pyx_n_u_MIRROR_OPTION_INCLUDE_SYSTEM_GUI, __pyx_k_MIRROR_OPTION_INCLUDE_SYSTEM_GUI, sizeof(__pyx_k_MIRROR_OPTION_INCLUDE_SYSTEM_GUI), 0, 1, 0, 1},
  {&__pyx_n_s_MIRROR_OPTION_LEFT_EYE_ONLY, __pyx_k_MIRROR_OPTION_LEFT_EYE_ONLY, sizeof(__pyx_k_MIRROR_OPTION_LEFT_EYE_ONLY), 0, 0, 1, 1},
  {&__pyx_n_u_MIRROR_OPTION_LEFT_EYE_ONLY, __pyx_k_MIRROR_OPTION_LEFT_EYE_ONLY, sizeof(__pyx_k_MIRROR_OPTION_LEFT_EYE_ONLY), 0, 1, 0, 1},
  {&__pyx_n_s_MIRROR_OPTION_POST_DISTORTION, __pyx_k_MIRROR_OPTION_POST_DISTORTION, sizeof(__pyx_k_MIRROR_OPTION_POST_DISTORTION), 0, 0, 1, 1},
  {&__pyx_n_u_MIRROR_OPTION_POST_DISTORTION, __pyx_k_MIRROR_OPTION_POST_DISTORTION, sizeof(__pyx_k_MIRROR_OPTION_POST_DISTORTION), 0, 1, 0, 1},
  {&__pyx_n_s_MIRROR_OPTION_RIGHT_EYE_ONLY, __pyx_k_MIRROR_OPTION_RIGHT_EYE_ONLY, sizeof(__pyx_k_MIRROR_OPTION_RIGHT_EYE_ONLY), 0, 0, 1, 1},
  {&__pyx_n_u_MIRROR_OPTION_RIGHT_EYE_ONLY, __pyx_k_MIRROR_OPTION_RIGHT_EYE_ONLY, sizeof(__pyx_k_MIRROR_OPTION_RIGHT_EYE_ONLY), 0, 1, 0, 1},
  {&__pyx_n_u_MIT, __pyx_k_MIT, sizeof(__pyx_k_MIT), 0, 1, 0, 1},
  {&__pyx_kp_u_Matthew_D_Cutone, __pyx_k_Matthew_D_Cutone, sizeof(__pyx_k_Matthew_D_Cutone), 0, 1, 0, 0},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
  {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1},
  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
  {&__pyx_n_s_OverlayPresent, __pyx_k_OverlayPresent, sizeof(__pyx_k_OverlayPresent), 0, 0, 1, 1},
  {&__pyx_n_s_PATCH_VERSION, __pyx_k_PATCH_VERSION, sizeof(__pyx_k_PATCH_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_PATCH_VERSION, __pyx_k_PATCH_VERSION, sizeof(__pyx_k_PATCH_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_PERF_HUD_APP_RENDER_TIMING, __pyx_k_PERF_HUD_APP_RENDER_TIMING, sizeof(__pyx_k_PERF_HUD_APP_RENDER_TIMING), 0, 0, 1, 1},
  {&__pyx_n_u_PERF_HUD_APP_RENDER_TIMING, __pyx_k_PERF_HUD_APP_RENDER_TIMING, sizeof(__pyx_k_PERF_HUD_APP_RENDER_TIMING), 0, 1, 0, 1},
  {&__pyx_n_s_PERF_HUD_ASW_STATS, __pyx_k_PERF_HUD_ASW_STATS, sizeof(__pyx_k_PERF_HUD_ASW_STATS), 0, 0, 1, 1},
  {&__pyx_n_u_PERF_HUD_ASW_STATS, __pyx_k_PERF_HUD_ASW_STATS, sizeof(__pyx_k_PERF_HUD_ASW_STATS), 0, 1, 0, 1},
  {&__pyx_n_s_PERF_HUD_COMP_RENDER_TIMING, __pyx_k_PERF_HUD_COMP_RENDER_TIMING, sizeof(__pyx_k_PERF_HUD_COMP_RENDER_TIMING), 0, 0, 1, 1},
  {&__pyx_n_u_PERF_HUD_COMP_RENDER_TIMING, __pyx_k_PERF_HUD_COMP_RENDER_TIMING, sizeof(__pyx_k_PERF_HUD_COMP_RENDER_TIMING), 0, 1, 0, 1},
  {&__pyx_n_s_PERF_HUD_COUNT, __pyx_k_PERF_HUD_COUNT, sizeof(__pyx_k_PERF_HUD_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_PERF_HUD_LATENCY_TIMING, __pyx_k_PERF_HUD_LATENCY_TIMING, sizeof(__pyx_k_PERF_HUD_LATENCY_TIMING), 0, 0, 1, 1},
  {&__pyx_n_u_PERF_HUD_LATENCY_TIMING, __pyx_k_PERF_HUD_LATENCY_TIMING, sizeof(__pyx_k_PERF_HUD_LATENCY_TIMING), 0, 1, 0, 1},
  {&__pyx_n_s_PERF_HUD_MODE, __pyx_k_PERF_HUD_MODE, sizeof(__pyx_k_PERF_HUD_MODE), 0, 0, 1, 1},
  {&__pyx_n_u_PERF_HUD_MODE, __pyx_k_PERF_HUD_MODE, sizeof(__pyx_k_PERF_HUD_MODE), 0, 1, 0, 1},
  {&__pyx_n_s_PERF_HUD_OFF, __pyx_k_PERF_HUD_OFF, sizeof(__pyx_k_PERF_HUD_OFF), 0, 0, 1, 1},
  {&__pyx_n_u_PERF_HUD_OFF, __pyx_k_PERF_HUD_OFF, sizeof(__pyx_k_PERF_HUD_OFF), 0, 1, 0, 1},
  {&__pyx_n_s_PERF_HUD_PERF_SUMMARY, __pyx_k_PERF_HUD_PERF_SUMMARY, sizeof(__pyx_k_PERF_HUD_PERF_SUMMARY), 0, 0, 1, 1},
  {&__pyx_n_u_PERF_HUD_PERF_SUMMARY, __pyx_k_PERF_HUD_PERF_SUMMARY, sizeof(__pyx_k_PERF_HUD_PERF_SUMMARY), 0, 1, 0, 1},
  {&__pyx_n_s_PERF_HUD_VERSION_INFO, __pyx_k_PERF_HUD_VERSION_INFO, sizeof(__pyx_k_PERF_HUD_VERSION_INFO), 0, 0, 1, 1},
  {&__pyx_n_u_PERF_HUD_VERSION_INFO, __pyx_k_PERF_HUD_VERSION_INFO, sizeof(__pyx_k_PERF_HUD_VERSION_INFO), 0, 1, 0, 1},
  {&__pyx_n_s_PRODUCT_VERSION, __pyx_k_PRODUCT_VERSION, sizeof(__pyx_k_PRODUCT_VERSION), 0, 0, 1, 1},
  {&__pyx_n_u_PRODUCT_VERSION, __pyx_k_PRODUCT_VERSION, sizeof(__pyx_k_PRODUCT_VERSION), 0, 1, 0, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_kp_u_PsychXR_was_built_using_version, __pyx_k_PsychXR_was_built_using_version, sizeof(__pyx_k_PsychXR_was_built_using_version), 0, 1, 0, 0},
  {&__pyx_n_s_RAD_TO_DEGF, __pyx_k_RAD_TO_DEGF, sizeof(__pyx_k_RAD_TO_DEGF), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeWarning, __pyx_k_RuntimeWarning, sizeof(__pyx_k_RuntimeWarning), 0, 0, 1, 1},
  {&__pyx_n_s_STATUS_ORIENTATION_TRACKED, __pyx_k_STATUS_ORIENTATION_TRACKED, sizeof(__pyx_k_STATUS_ORIENTATION_TRACKED), 0, 0, 1, 1},
  {&__pyx_n_u_STATUS_ORIENTATION_TRACKED, __pyx_k_STATUS_ORIENTATION_TRACKED, sizeof(__pyx_k_STATUS_ORIENTATION_TRACKED), 0, 1, 0, 1},
  {&__pyx_n_s_STATUS_ORIENTATION_VALID, __pyx_k_STATUS_ORIENTATION_VALID, sizeof(__pyx_k_STATUS_ORIENTATION_VALID), 0, 0, 1, 1},
  {&__pyx_n_u_STATUS_ORIENTATION_VALID, __pyx_k_STATUS_ORIENTATION_VALID, sizeof(__pyx_k_STATUS_ORIENTATION_VALID), 0, 1, 0, 1},
  {&__pyx_n_s_STATUS_POSITION_TRACKED, __pyx_k_STATUS_POSITION_TRACKED, sizeof(__pyx_k_STATUS_POSITION_TRACKED), 0, 0, 1, 1},
  {&__pyx_n_u_STATUS_POSITION_TRACKED, __pyx_k_STATUS_POSITION_TRACKED, sizeof(__pyx_k_STATUS_POSITION_TRACKED), 0, 1, 0, 1},
  {&__pyx_n_s_STATUS_POSITION_VALID, __pyx_k_STATUS_POSITION_VALID, sizeof(__pyx_k_STATUS_POSITION_VALID), 0, 0, 1, 1},
  {&__pyx_n_u_STATUS_POSITION_VALID, __pyx_k_STATUS_POSITION_VALID, sizeof(__pyx_k_STATUS_POSITION_VALID), 0, 1, 0, 1},
  {&__pyx_n_s_SUCCESS, __pyx_k_SUCCESS, sizeof(__pyx_k_SUCCESS), 0, 0, 1, 1},
  {&__pyx_n_u_SUCCESS, __pyx_k_SUCCESS, sizeof(__pyx_k_SUCCESS), 0, 1, 0, 1},
  {&__pyx_n_s_SUCCESS_BOUNDARY_INVALID, __pyx_k_SUCCESS_BOUNDARY_INVALID, sizeof(__pyx_k_SUCCESS_BOUNDARY_INVALID), 0, 0, 1, 1},
  {&__pyx_n_u_SUCCESS_BOUNDARY_INVALID, __pyx_k_SUCCESS_BOUNDARY_INVALID, sizeof(__pyx_k_SUCCESS_BOUNDARY_INVALID), 0, 1, 0, 1},
  {&__pyx_n_s_SUCCESS_DEVICE_UNAVAILABLE, __pyx_k_SUCCESS_DEVICE_UNAVAILABLE, sizeof(__pyx_k_SUCCESS_DEVICE_UNAVAILABLE), 0, 0, 1, 1},
  {&__pyx_n_u_SUCCESS_DEVICE_UNAVAILABLE, __pyx_k_SUCCESS_DEVICE_UNAVAILABLE, sizeof(__pyx_k_SUCCESS_DEVICE_UNAVAILABLE), 0, 1, 0, 1},
  {&__pyx_n_s_SUCCESS_NOT_VISIBLE, __pyx_k_SUCCESS_NOT_VISIBLE, sizeof(__pyx_k_SUCCESS_NOT_VISIBLE), 0, 0, 1, 1},
  {&__pyx_n_u_SUCCESS_NOT_VISIBLE, __pyx_k_SUCCESS_NOT_VISIBLE, sizeof(__pyx_k_SUCCESS_NOT_VISIBLE), 0, 1, 0, 1},
  {&__pyx_n_s_ShouldQuit, __pyx_k_ShouldQuit, sizeof(__pyx_k_ShouldQuit), 0, 0, 1, 1},
  {&__pyx_n_s_ShouldRecenter, __pyx_k_ShouldRecenter, sizeof(__pyx_k_ShouldRecenter), 0, 0, 1, 1},
  {&__pyx_n_u_Stable, __pyx_k_Stable, sizeof(__pyx_k_Stable), 0, 1, 0, 1},
  {&__pyx_kp_u_Swap_chain_TEXTURE_SWAP_CHAIN_al, __pyx_k_Swap_chain_TEXTURE_SWAP_CHAIN_al, sizeof(__pyx_k_Swap_chain_TEXTURE_SWAP_CHAIN_al), 0, 1, 0, 0},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN0, __pyx_k_TEXTURE_SWAP_CHAIN0, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN0), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN0, __pyx_k_TEXTURE_SWAP_CHAIN0, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN0), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN1, __pyx_k_TEXTURE_SWAP_CHAIN1, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN1), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN1, __pyx_k_TEXTURE_SWAP_CHAIN1, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN1), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN10, __pyx_k_TEXTURE_SWAP_CHAIN10, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN10), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN10, __pyx_k_TEXTURE_SWAP_CHAIN10, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN10), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN11, __pyx_k_TEXTURE_SWAP_CHAIN11, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN11), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN11, __pyx_k_TEXTURE_SWAP_CHAIN11, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN11), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN12, __pyx_k_TEXTURE_SWAP_CHAIN12, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN12), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN12, __pyx_k_TEXTURE_SWAP_CHAIN12, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN12), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN13, __pyx_k_TEXTURE_SWAP_CHAIN13, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN13), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN13, __pyx_k_TEXTURE_SWAP_CHAIN13, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN13), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN14, __pyx_k_TEXTURE_SWAP_CHAIN14, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN14), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN14, __pyx_k_TEXTURE_SWAP_CHAIN14, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN14), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN15, __pyx_k_TEXTURE_SWAP_CHAIN15, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN15), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN15, __pyx_k_TEXTURE_SWAP_CHAIN15, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN15), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN2, __pyx_k_TEXTURE_SWAP_CHAIN2, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN2), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN2, __pyx_k_TEXTURE_SWAP_CHAIN2, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN2), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN3, __pyx_k_TEXTURE_SWAP_CHAIN3, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN3), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN3, __pyx_k_TEXTURE_SWAP_CHAIN3, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN3), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN4, __pyx_k_TEXTURE_SWAP_CHAIN4, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN4), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN4, __pyx_k_TEXTURE_SWAP_CHAIN4, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN4), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN5, __pyx_k_TEXTURE_SWAP_CHAIN5, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN5), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN5, __pyx_k_TEXTURE_SWAP_CHAIN5, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN5), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN6, __pyx_k_TEXTURE_SWAP_CHAIN6, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN6), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN6, __pyx_k_TEXTURE_SWAP_CHAIN6, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN6), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN7, __pyx_k_TEXTURE_SWAP_CHAIN7, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN7), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN7, __pyx_k_TEXTURE_SWAP_CHAIN7, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN7), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN8, __pyx_k_TEXTURE_SWAP_CHAIN8, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN8), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN8, __pyx_k_TEXTURE_SWAP_CHAIN8, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN8), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN9, __pyx_k_TEXTURE_SWAP_CHAIN9, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN9), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN9, __pyx_k_TEXTURE_SWAP_CHAIN9, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN9), 0, 1, 0, 1},
  {&__pyx_n_s_TEXTURE_SWAP_CHAIN_COUNT, __pyx_k_TEXTURE_SWAP_CHAIN_COUNT, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN_COUNT), 0, 0, 1, 1},
  {&__pyx_n_u_TEXTURE_SWAP_CHAIN_COUNT, __pyx_k_TEXTURE_SWAP_CHAIN_COUNT, sizeof(__pyx_k_TEXTURE_SWAP_CHAIN_COUNT), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_A, __pyx_k_TOUCH_A, sizeof(__pyx_k_TOUCH_A), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_A, __pyx_k_TOUCH_A, sizeof(__pyx_k_TOUCH_A), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_B, __pyx_k_TOUCH_B, sizeof(__pyx_k_TOUCH_B), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_B, __pyx_k_TOUCH_B, sizeof(__pyx_k_TOUCH_B), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_LINDEXPOINTING, __pyx_k_TOUCH_LINDEXPOINTING, sizeof(__pyx_k_TOUCH_LINDEXPOINTING), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_LINDEXPOINTING, __pyx_k_TOUCH_LINDEXPOINTING, sizeof(__pyx_k_TOUCH_LINDEXPOINTING), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_LINDEXTRIGGER, __pyx_k_TOUCH_LINDEXTRIGGER, sizeof(__pyx_k_TOUCH_LINDEXTRIGGER), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_LINDEXTRIGGER, __pyx_k_TOUCH_LINDEXTRIGGER, sizeof(__pyx_k_TOUCH_LINDEXTRIGGER), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_LTHUMB, __pyx_k_TOUCH_LTHUMB, sizeof(__pyx_k_TOUCH_LTHUMB), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_LTHUMB, __pyx_k_TOUCH_LTHUMB, sizeof(__pyx_k_TOUCH_LTHUMB), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_LTHUMBREST, __pyx_k_TOUCH_LTHUMBREST, sizeof(__pyx_k_TOUCH_LTHUMBREST), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_LTHUMBREST, __pyx_k_TOUCH_LTHUMBREST, sizeof(__pyx_k_TOUCH_LTHUMBREST), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_LTHUMBUP, __pyx_k_TOUCH_LTHUMBUP, sizeof(__pyx_k_TOUCH_LTHUMBUP), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_LTHUMBUP, __pyx_k_TOUCH_LTHUMBUP, sizeof(__pyx_k_TOUCH_LTHUMBUP), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_RINDEXPOINTING, __pyx_k_TOUCH_RINDEXPOINTING, sizeof(__pyx_k_TOUCH_RINDEXPOINTING), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_RINDEXPOINTING, __pyx_k_TOUCH_RINDEXPOINTING, sizeof(__pyx_k_TOUCH_RINDEXPOINTING), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_RTHUMB, __pyx_k_TOUCH_RTHUMB, sizeof(__pyx_k_TOUCH_RTHUMB), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_RTHUMB, __pyx_k_TOUCH_RTHUMB, sizeof(__pyx_k_TOUCH_RTHUMB), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_RTHUMBREST, __pyx_k_TOUCH_RTHUMBREST, sizeof(__pyx_k_TOUCH_RTHUMBREST), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_RTHUMBREST, __pyx_k_TOUCH_RTHUMBREST, sizeof(__pyx_k_TOUCH_RTHUMBREST), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_RTHUMBUP, __pyx_k_TOUCH_RTHUMBUP, sizeof(__pyx_k_TOUCH_RTHUMBUP), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_RTHUMBUP, __pyx_k_TOUCH_RTHUMBUP, sizeof(__pyx_k_TOUCH_RTHUMBUP), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_X, __pyx_k_TOUCH_X, sizeof(__pyx_k_TOUCH_X), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_X, __pyx_k_TOUCH_X, sizeof(__pyx_k_TOUCH_X), 0, 1, 0, 1},
  {&__pyx_n_s_TOUCH_Y, __pyx_k_TOUCH_Y, sizeof(__pyx_k_TOUCH_Y), 0, 0, 1, 1},
  {&__pyx_n_u_TOUCH_Y, __pyx_k_TOUCH_Y, sizeof(__pyx_k_TOUCH_Y), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKED_DEVICE_TYPE_HMD, __pyx_k_TRACKED_DEVICE_TYPE_HMD, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_HMD), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKED_DEVICE_TYPE_HMD, __pyx_k_TRACKED_DEVICE_TYPE_HMD, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_HMD), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKED_DEVICE_TYPE_LTOUCH, __pyx_k_TRACKED_DEVICE_TYPE_LTOUCH, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_LTOUCH), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKED_DEVICE_TYPE_LTOUCH, __pyx_k_TRACKED_DEVICE_TYPE_LTOUCH, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_LTOUCH), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT0, __pyx_k_TRACKED_DEVICE_TYPE_OBJECT0, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_OBJECT0), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT0, __pyx_k_TRACKED_DEVICE_TYPE_OBJECT0, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_OBJECT0), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT1, __pyx_k_TRACKED_DEVICE_TYPE_OBJECT1, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_OBJECT1), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT1, __pyx_k_TRACKED_DEVICE_TYPE_OBJECT1, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_OBJECT1), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT2, __pyx_k_TRACKED_DEVICE_TYPE_OBJECT2, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_OBJECT2), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT2, __pyx_k_TRACKED_DEVICE_TYPE_OBJECT2, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_OBJECT2), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT3, __pyx_k_TRACKED_DEVICE_TYPE_OBJECT3, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_OBJECT3), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT3, __pyx_k_TRACKED_DEVICE_TYPE_OBJECT3, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_OBJECT3), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKED_DEVICE_TYPE_RTOUCH, __pyx_k_TRACKED_DEVICE_TYPE_RTOUCH, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_RTOUCH), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKED_DEVICE_TYPE_RTOUCH, __pyx_k_TRACKED_DEVICE_TYPE_RTOUCH, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_RTOUCH), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKED_DEVICE_TYPE_TOUCH, __pyx_k_TRACKED_DEVICE_TYPE_TOUCH, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_TOUCH), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKED_DEVICE_TYPE_TOUCH, __pyx_k_TRACKED_DEVICE_TYPE_TOUCH, sizeof(__pyx_k_TRACKED_DEVICE_TYPE_TOUCH), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKING_ORIGIN_EYE_LEVEL, __pyx_k_TRACKING_ORIGIN_EYE_LEVEL, sizeof(__pyx_k_TRACKING_ORIGIN_EYE_LEVEL), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKING_ORIGIN_EYE_LEVEL, __pyx_k_TRACKING_ORIGIN_EYE_LEVEL, sizeof(__pyx_k_TRACKING_ORIGIN_EYE_LEVEL), 0, 1, 0, 1},
  {&__pyx_n_s_TRACKING_ORIGIN_FLOOR_LEVEL, __pyx_k_TRACKING_ORIGIN_FLOOR_LEVEL, sizeof(__pyx_k_TRACKING_ORIGIN_FLOOR_LEVEL), 0, 0, 1, 1},
  {&__pyx_n_u_TRACKING_ORIGIN_FLOOR_LEVEL, __pyx_k_TRACKING_ORIGIN_FLOOR_LEVEL, sizeof(__pyx_k_TRACKING_ORIGIN_FLOOR_LEVEL), 0, 1, 0, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_u_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 1, 0, 0},
  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
  {&__pyx_kp_u__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 1, 0, 0},
  {&__pyx_n_s_absTime, __pyx_k_absTime, sizeof(__pyx_k_absTime), 0, 0, 1, 1},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
  {&__pyx_n_s_amplitude, __pyx_k_amplitude, sizeof(__pyx_k_amplitude), 0, 0, 1, 1},
  {&__pyx_n_s_angle, __pyx_k_angle, sizeof(__pyx_k_angle), 0, 0, 1, 1},
  {&__pyx_n_s_angularAcceleration, __pyx_k_angularAcceleration, sizeof(__pyx_k_angularAcceleration), 0, 0, 1, 1},
  {&__pyx_n_s_angularVelocity, __pyx_k_angularVelocity, sizeof(__pyx_k_angularVelocity), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
  {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
  {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_s_bbox, __pyx_k_bbox, sizeof(__pyx_k_bbox), 0, 0, 1, 1},
  {&__pyx_n_s_beginFrame, __pyx_k_beginFrame, sizeof(__pyx_k_beginFrame), 0, 0, 1, 1},
  {&__pyx_n_u_beginFrame, __pyx_k_beginFrame, sizeof(__pyx_k_beginFrame), 0, 1, 0, 1},
  {&__pyx_n_s_blue, __pyx_k_blue, sizeof(__pyx_k_blue), 0, 0, 1, 1},
  {&__pyx_n_s_boundaryType, __pyx_k_boundaryType, sizeof(__pyx_k_boundaryType), 0, 0, 1, 1},
  {&__pyx_n_s_bounds, __pyx_k_bounds, sizeof(__pyx_k_bounds), 0, 0, 1, 1},
  {&__pyx_n_s_btype, __pyx_k_btype, sizeof(__pyx_k_btype), 0, 0, 1, 1},
  {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
  {&__pyx_n_s_bufferSize, __pyx_k_bufferSize, sizeof(__pyx_k_bufferSize), 0, 0, 1, 1},
  {&__pyx_n_s_button, __pyx_k_button, sizeof(__pyx_k_button), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
  {&__pyx_n_s_calcEyeBufferSize, __pyx_k_calcEyeBufferSize, sizeof(__pyx_k_calcEyeBufferSize), 0, 0, 1, 1},
  {&__pyx_n_u_calcEyeBufferSize, __pyx_k_calcEyeBufferSize, sizeof(__pyx_k_calcEyeBufferSize), 0, 1, 0, 1},
  {&__pyx_n_s_calcEyePoses, __pyx_k_calcEyePoses, sizeof(__pyx_k_calcEyePoses), 0, 0, 1, 1},
  {&__pyx_n_u_calcEyePoses, __pyx_k_calcEyePoses, sizeof(__pyx_k_calcEyePoses), 0, 1, 0, 1},
  {&__pyx_n_s_check_result, __pyx_k_check_result, sizeof(__pyx_k_check_result), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  {&__pyx_n_s_clearShouldRecenterFlag, __pyx_k_clearShouldRecenterFlag, sizeof(__pyx_k_clearShouldRecenterFlag), 0, 0, 1, 1},
  {&__pyx_n_u_clearShouldRecenterFlag, __pyx_k_clearShouldRecenterFlag, sizeof(__pyx_k_clearShouldRecenterFlag), 0, 1, 0, 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_clip, __pyx_k_clip, sizeof(__pyx_k_clip), 0, 0, 1, 1},
  {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1},
  {&__pyx_n_s_commitTextureSwapChain, __pyx_k_commitTextureSwapChain, sizeof(__pyx_k_commitTextureSwapChain), 0, 0, 1, 1},
  {&__pyx_n_u_commitTextureSwapChain, __pyx_k_commitTextureSwapChain, sizeof(__pyx_k_commitTextureSwapChain), 0, 1, 0, 1},
  {&__pyx_n_s_connectionTimeout, __pyx_k_connectionTimeout, sizeof(__pyx_k_connectionTimeout), 0, 0, 1, 1},
  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
  {&__pyx_n_u_continuous, __pyx_k_continuous, sizeof(__pyx_k_continuous), 0, 1, 0, 1},
  {&__pyx_n_s_controller, __pyx_k_controller, sizeof(__pyx_k_controller), 0, 0, 1, 1},
  {&__pyx_n_s_copyright, __pyx_k_copyright, sizeof(__pyx_k_copyright), 0, 0, 1, 1},
  {&__pyx_n_s_corners, __pyx_k_corners, sizeof(__pyx_k_corners), 0, 0, 1, 1},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_n_s_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1},
  {&__pyx_n_u_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 1, 0, 1},
  {&__pyx_n_s_createMirrorTexture, __pyx_k_createMirrorTexture, sizeof(__pyx_k_createMirrorTexture), 0, 0, 1, 1},
  {&__pyx_n_u_createMirrorTexture, __pyx_k_createMirrorTexture, sizeof(__pyx_k_createMirrorTexture), 0, 1, 0, 1},
  {&__pyx_n_s_createTextureSwapChainGL, __pyx_k_createTextureSwapChainGL, sizeof(__pyx_k_createTextureSwapChainGL), 0, 0, 1, 1},
  {&__pyx_n_u_createTextureSwapChainGL, __pyx_k_createTextureSwapChainGL, sizeof(__pyx_k_createTextureSwapChainGL), 0, 1, 0, 1},
  {&__pyx_n_s_credits, __pyx_k_credits, sizeof(__pyx_k_credits), 0, 0, 1, 1},
  {&__pyx_n_s_cullPose, __pyx_k_cullPose, sizeof(__pyx_k_cullPose), 0, 0, 1, 1},
  {&__pyx_n_u_cullPose, __pyx_k_cullPose, sizeof(__pyx_k_cullPose), 0, 1, 0, 1},
  {&__pyx_n_s_curButtons, __pyx_k_curButtons, sizeof(__pyx_k_curButtons), 0, 0, 1, 1},
  {&__pyx_n_s_curTouches, __pyx_k_curTouches, sizeof(__pyx_k_curTouches), 0, 0, 1, 1},
  {&__pyx_n_s_currentInputState, __pyx_k_currentInputState, sizeof(__pyx_k_currentInputState), 0, 0, 1, 1},
  {&__pyx_n_s_current_idx, __pyx_k_current_idx, sizeof(__pyx_k_current_idx), 0, 0, 1, 1},
  {&__pyx_kp_u_cutonem_yorku_ca, __pyx_k_cutonem_yorku_ca, sizeof(__pyx_k_cutonem_yorku_ca), 0, 1, 0, 0},
  {&__pyx_n_s_deadzone, __pyx_k_deadzone, sizeof(__pyx_k_deadzone), 0, 0, 1, 1},
  {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1},
  {&__pyx_n_s_defaultVal, __pyx_k_defaultVal, sizeof(__pyx_k_defaultVal), 0, 0, 1, 1},
  {&__pyx_n_s_degrees, __pyx_k_degrees, sizeof(__pyx_k_degrees), 0, 0, 1, 1},
  {&__pyx_n_s_depthRequested, __pyx_k_depthRequested, sizeof(__pyx_k_depthRequested), 0, 0, 1, 1},
  {&__pyx_n_s_destroy, __pyx_k_destroy, sizeof(__pyx_k_destroy), 0, 0, 1, 1},
  {&__pyx_n_u_destroy, __pyx_k_destroy, sizeof(__pyx_k_destroy), 0, 1, 0, 1},
  {&__pyx_n_s_destroyMirrorTexture, __pyx_k_destroyMirrorTexture, sizeof(__pyx_k_destroyMirrorTexture), 0, 0, 1, 1},
  {&__pyx_n_u_destroyMirrorTexture, __pyx_k_destroyMirrorTexture, sizeof(__pyx_k_destroyMirrorTexture), 0, 1, 0, 1},
  {&__pyx_n_s_destroyTextureSwapChain, __pyx_k_destroyTextureSwapChain, sizeof(__pyx_k_destroyTextureSwapChain), 0, 0, 1, 1},
  {&__pyx_n_u_destroyTextureSwapChain, __pyx_k_destroyTextureSwapChain, sizeof(__pyx_k_destroyTextureSwapChain), 0, 1, 0, 1},
  {&__pyx_n_s_deviceBitmask, __pyx_k_deviceBitmask, sizeof(__pyx_k_deviceBitmask), 0, 0, 1, 1},
  {&__pyx_n_s_devicePoses, __pyx_k_devicePoses, sizeof(__pyx_k_devicePoses), 0, 0, 1, 1},
  {&__pyx_n_s_deviceTypes, __pyx_k_deviceTypes, sizeof(__pyx_k_deviceTypes), 0, 0, 1, 1},
  {&__pyx_n_s_devices, __pyx_k_devices, sizeof(__pyx_k_devices), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dir, __pyx_k_dir, sizeof(__pyx_k_dir), 0, 0, 1, 1},
  {&__pyx_n_s_displayLost, __pyx_k_displayLost, sizeof(__pyx_k_displayLost), 0, 0, 1, 1},
  {&__pyx_n_s_distVp, __pyx_k_distVp, sizeof(__pyx_k_distVp), 0, 0, 1, 1},
  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
  {&__pyx_n_s_email, __pyx_k_email, sizeof(__pyx_k_email), 0, 0, 1, 1},
  {&__pyx_n_s_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_s_endFrame, __pyx_k_endFrame, sizeof(__pyx_k_endFrame), 0, 0, 1, 1},
  {&__pyx_n_u_endFrame, __pyx_k_endFrame, sizeof(__pyx_k_endFrame), 0, 1, 0, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_s_errorString, __pyx_k_errorString, sizeof(__pyx_k_errorString), 0, 0, 1, 1},
  {&__pyx_n_s_extents, __pyx_k_extents, sizeof(__pyx_k_extents), 0, 0, 1, 1},
  {&__pyx_n_s_eye, __pyx_k_eye, sizeof(__pyx_k_eye), 0, 0, 1, 1},
  {&__pyx_n_s_eyePose, __pyx_k_eyePose, sizeof(__pyx_k_eyePose), 0, 0, 1, 1},
  {&__pyx_n_s_failure, __pyx_k_failure, sizeof(__pyx_k_failure), 0, 0, 1, 1},
  {&__pyx_n_u_failure, __pyx_k_failure, sizeof(__pyx_k_failure), 0, 1, 0, 1},
  {&__pyx_n_u_falling, __pyx_k_falling, sizeof(__pyx_k_falling), 0, 1, 0, 1},
  {&__pyx_n_s_farClip, __pyx_k_farClip, sizeof(__pyx_k_farClip), 0, 0, 1, 1},
  {&__pyx_n_s_fast, __pyx_k_fast, sizeof(__pyx_k_fast), 0, 0, 1, 1},
  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1},
  {&__pyx_n_s_focusAware, __pyx_k_focusAware, sizeof(__pyx_k_focusAware), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
  {&__pyx_n_s_forward, __pyx_k_forward, sizeof(__pyx_k_forward), 0, 0, 1, 1},
  {&__pyx_n_s_fov, __pyx_k_fov, sizeof(__pyx_k_fov), 0, 0, 1, 1},
  {&__pyx_n_s_fovPort, __pyx_k_fovPort, sizeof(__pyx_k_fovPort), 0, 0, 1, 1},
  {&__pyx_n_s_fov_in, __pyx_k_fov_in, sizeof(__pyx_k_fov_in), 0, 0, 1, 1},
  {&__pyx_n_s_frameIndex, __pyx_k_frameIndex, sizeof(__pyx_k_frameIndex), 0, 0, 1, 1},
  {&__pyx_n_s_freq, __pyx_k_freq, sizeof(__pyx_k_freq), 0, 0, 1, 1},
  {&__pyx_n_s_frequency, __pyx_k_frequency, sizeof(__pyx_k_frequency), 0, 0, 1, 1},
  {&__pyx_n_s_getAt, __pyx_k_getAt, sizeof(__pyx_k_getAt), 0, 0, 1, 1},
  {&__pyx_n_s_getBool, __pyx_k_getBool, sizeof(__pyx_k_getBool), 0, 0, 1, 1},
  {&__pyx_n_u_getBool, __pyx_k_getBool, sizeof(__pyx_k_getBool), 0, 1, 0, 1},
  {&__pyx_n_s_getBoundaryDimensions, __pyx_k_getBoundaryDimensions, sizeof(__pyx_k_getBoundaryDimensions), 0, 0, 1, 1},
  {&__pyx_n_u_getBoundaryDimensions, __pyx_k_getBoundaryDimensions, sizeof(__pyx_k_getBoundaryDimensions), 0, 1, 0, 1},
  {&__pyx_n_s_getBoundaryVisible, __pyx_k_getBoundaryVisible, sizeof(__pyx_k_getBoundaryVisible), 0, 0, 1, 1},
  {&__pyx_n_u_getBoundaryVisible, __pyx_k_getBoundaryVisible, sizeof(__pyx_k_getBoundaryVisible), 0, 1, 0, 1},
  {&__pyx_n_s_getButton, __pyx_k_getButton, sizeof(__pyx_k_getButton), 0, 0, 1, 1},
  {&__pyx_n_u_getButton, __pyx_k_getButton, sizeof(__pyx_k_getButton), 0, 1, 0, 1},
  {&__pyx_n_s_getConnectedControllerTypes, __pyx_k_getConnectedControllerTypes, sizeof(__pyx_k_getConnectedControllerTypes), 0, 0, 1, 1},
  {&__pyx_n_u_getConnectedControllerTypes, __pyx_k_getConnectedControllerTypes, sizeof(__pyx_k_getConnectedControllerTypes), 0, 1, 0, 1},
  {&__pyx_n_s_getControllerPlaybackState, __pyx_k_getControllerPlaybackState, sizeof(__pyx_k_getControllerPlaybackState), 0, 0, 1, 1},
  {&__pyx_n_u_getControllerPlaybackState, __pyx_k_getControllerPlaybackState, sizeof(__pyx_k_getControllerPlaybackState), 0, 1, 0, 1},
  {&__pyx_n_s_getDevicePoses, __pyx_k_getDevicePoses, sizeof(__pyx_k_getDevicePoses), 0, 0, 1, 1},
  {&__pyx_n_u_getDevicePoses, __pyx_k_getDevicePoses, sizeof(__pyx_k_getDevicePoses), 0, 1, 0, 1},
  {&__pyx_n_s_getDistortedViewport, __pyx_k_getDistortedViewport, sizeof(__pyx_k_getDistortedViewport), 0, 0, 1, 1},
  {&__pyx_n_u_getDistortedViewport, __pyx_k_getDistortedViewport, sizeof(__pyx_k_getDistortedViewport), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeAspectRatio, __pyx_k_getEyeAspectRatio, sizeof(__pyx_k_getEyeAspectRatio), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeAspectRatio, __pyx_k_getEyeAspectRatio, sizeof(__pyx_k_getEyeAspectRatio), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeFocalLength, __pyx_k_getEyeFocalLength, sizeof(__pyx_k_getEyeFocalLength), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeFocalLength, __pyx_k_getEyeFocalLength, sizeof(__pyx_k_getEyeFocalLength), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeHorizontalFovRadians, __pyx_k_getEyeHorizontalFovRadians, sizeof(__pyx_k_getEyeHorizontalFovRadians), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeHorizontalFovRadians, __pyx_k_getEyeHorizontalFovRadians, sizeof(__pyx_k_getEyeHorizontalFovRadians), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeProjectionMatrix, __pyx_k_getEyeProjectionMatrix, sizeof(__pyx_k_getEyeProjectionMatrix), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeProjectionMatrix, __pyx_k_getEyeProjectionMatrix, sizeof(__pyx_k_getEyeProjectionMatrix), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeRenderFov, __pyx_k_getEyeRenderFov, sizeof(__pyx_k_getEyeRenderFov), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeRenderFov, __pyx_k_getEyeRenderFov, sizeof(__pyx_k_getEyeRenderFov), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeRenderPose, __pyx_k_getEyeRenderPose, sizeof(__pyx_k_getEyeRenderPose), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeRenderPose, __pyx_k_getEyeRenderPose, sizeof(__pyx_k_getEyeRenderPose), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeRenderViewport, __pyx_k_getEyeRenderViewport, sizeof(__pyx_k_getEyeRenderViewport), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeRenderViewport, __pyx_k_getEyeRenderViewport, sizeof(__pyx_k_getEyeRenderViewport), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeVerticalFovRadians, __pyx_k_getEyeVerticalFovRadians, sizeof(__pyx_k_getEyeVerticalFovRadians), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeVerticalFovRadians, __pyx_k_getEyeVerticalFovRadians, sizeof(__pyx_k_getEyeVerticalFovRadians), 0, 1, 0, 1},
  {&__pyx_n_s_getEyeViewMatrix, __pyx_k_getEyeViewMatrix, sizeof(__pyx_k_getEyeViewMatrix), 0, 0, 1, 1},
  {&__pyx_n_u_getEyeViewMatrix, __pyx_k_getEyeViewMatrix, sizeof(__pyx_k_getEyeViewMatrix), 0, 1, 0, 1},
  {&__pyx_n_s_getFloat, __pyx_k_getFloat, sizeof(__pyx_k_getFloat), 0, 0, 1, 1},
  {&__pyx_n_u_getFloat, __pyx_k_getFloat, sizeof(__pyx_k_getFloat), 0, 1, 0, 1},
  {&__pyx_n_s_getFloatArray, __pyx_k_getFloatArray, sizeof(__pyx_k_getFloatArray), 0, 0, 1, 1},
  {&__pyx_n_u_getFloatArray, __pyx_k_getFloatArray, sizeof(__pyx_k_getFloatArray), 0, 1, 0, 1},
  {&__pyx_n_s_getGraphicsLUID, __pyx_k_getGraphicsLUID, sizeof(__pyx_k_getGraphicsLUID), 0, 0, 1, 1},
  {&__pyx_n_u_getGraphicsLUID, __pyx_k_getGraphicsLUID, sizeof(__pyx_k_getGraphicsLUID), 0, 1, 0, 1},
  {&__pyx_n_s_getHandTriggerValues, __pyx_k_getHandTriggerValues, sizeof(__pyx_k_getHandTriggerValues), 0, 0, 1, 1},
  {&__pyx_n_u_getHandTriggerValues, __pyx_k_getHandTriggerValues, sizeof(__pyx_k_getHandTriggerValues), 0, 1, 0, 1},
  {&__pyx_n_s_getHapticsInfo, __pyx_k_getHapticsInfo, sizeof(__pyx_k_getHapticsInfo), 0, 0, 1, 1},
  {&__pyx_n_u_getHapticsInfo, __pyx_k_getHapticsInfo, sizeof(__pyx_k_getHapticsInfo), 0, 1, 0, 1},
  {&__pyx_n_s_getHmdInfo, __pyx_k_getHmdInfo, sizeof(__pyx_k_getHmdInfo), 0, 0, 1, 1},
  {&__pyx_n_u_getHmdInfo, __pyx_k_getHmdInfo, sizeof(__pyx_k_getHmdInfo), 0, 1, 0, 1},
  {&__pyx_n_s_getHmdToEyePose, __pyx_k_getHmdToEyePose, sizeof(__pyx_k_getHmdToEyePose), 0, 0, 1, 1},
  {&__pyx_n_u_getHmdToEyePose, __pyx_k_getHmdToEyePose, sizeof(__pyx_k_getHmdToEyePose), 0, 1, 0, 1},
  {&__pyx_n_s_getIndexTriggerValues, __pyx_k_getIndexTriggerValues, sizeof(__pyx_k_getIndexTriggerValues), 0, 0, 1, 1},
  {&__pyx_n_u_getIndexTriggerValues, __pyx_k_getIndexTriggerValues, sizeof(__pyx_k_getIndexTriggerValues), 0, 1, 0, 1},
  {&__pyx_n_s_getInt, __pyx_k_getInt, sizeof(__pyx_k_getInt), 0, 0, 1, 1},
  {&__pyx_n_u_getInt, __pyx_k_getInt, sizeof(__pyx_k_getInt), 0, 1, 0, 1},
  {&__pyx_n_s_getLastErrorInfo, __pyx_k_getLastErrorInfo, sizeof(__pyx_k_getLastErrorInfo), 0, 0, 1, 1},
  {&__pyx_n_u_getLastErrorInfo, __pyx_k_getLastErrorInfo, sizeof(__pyx_k_getLastErrorInfo), 0, 1, 0, 1},
  {&__pyx_n_s_getLayerEyeFovFlags, __pyx_k_getLayerEyeFovFlags, sizeof(__pyx_k_getLayerEyeFovFlags), 0, 0, 1, 1},
  {&__pyx_n_u_getLayerEyeFovFlags, __pyx_k_getLayerEyeFovFlags, sizeof(__pyx_k_getLayerEyeFovFlags), 0, 1, 0, 1},
  {&__pyx_n_s_getMirrorTexture, __pyx_k_getMirrorTexture, sizeof(__pyx_k_getMirrorTexture), 0, 0, 1, 1},
  {&__pyx_n_u_getMirrorTexture, __pyx_k_getMirrorTexture, sizeof(__pyx_k_getMirrorTexture), 0, 1, 0, 1},
  {&__pyx_n_s_getPerfStats, __pyx_k_getPerfStats, sizeof(__pyx_k_getPerfStats), 0, 0, 1, 1},
  {&__pyx_n_u_getPerfStats, __pyx_k_getPerfStats, sizeof(__pyx_k_getPerfStats), 0, 1, 0, 1},
  {&__pyx_n_s_getPixelsPerDegree, __pyx_k_getPixelsPerDegree, sizeof(__pyx_k_getPixelsPerDegree), 0, 0, 1, 1},
  {&__pyx_n_u_getPixelsPerDegree, __pyx_k_getPixelsPerDegree, sizeof(__pyx_k_getPixelsPerDegree), 0, 1, 0, 1},
  {&__pyx_n_s_getPixelsPerTanAngleAtCenter, __pyx_k_getPixelsPerTanAngleAtCenter, sizeof(__pyx_k_getPixelsPerTanAngleAtCenter), 0, 0, 1, 1},
  {&__pyx_n_u_getPixelsPerTanAngleAtCenter, __pyx_k_getPixelsPerTanAngleAtCenter, sizeof(__pyx_k_getPixelsPerTanAngleAtCenter), 0, 1, 0, 1},
  {&__pyx_n_s_getPredictedDisplayTime, __pyx_k_getPredictedDisplayTime, sizeof(__pyx_k_getPredictedDisplayTime), 0, 0, 1, 1},
  {&__pyx_n_u_getPredictedDisplayTime, __pyx_k_getPredictedDisplayTime, sizeof(__pyx_k_getPredictedDisplayTime), 0, 1, 0, 1},
  {&__pyx_n_s_getSensorSampleTime, __pyx_k_getSensorSampleTime, sizeof(__pyx_k_getSensorSampleTime), 0, 0, 1, 1},
  {&__pyx_n_u_getSensorSampleTime, __pyx_k_getSensorSampleTime, sizeof(__pyx_k_getSensorSampleTime), 0, 1, 0, 1},
  {&__pyx_n_s_getSessionStatus, __pyx_k_getSessionStatus, sizeof(__pyx_k_getSessionStatus), 0, 0, 1, 1},
  {&__pyx_n_u_getSessionStatus, __pyx_k_getSessionStatus, sizeof(__pyx_k_getSessionStatus), 0, 1, 0, 1},
  {&__pyx_n_s_getString, __pyx_k_getString, sizeof(__pyx_k_getString), 0, 0, 1, 1},
  {&__pyx_n_u_getString, __pyx_k_getString, sizeof(__pyx_k_getString), 0, 1, 0, 1},
  {&__pyx_n_s_getTanAngleToRenderTargetNDC, __pyx_k_getTanAngleToRenderTargetNDC, sizeof(__pyx_k_getTanAngleToRenderTargetNDC), 0, 0, 1, 1},
  {&__pyx_n_u_getTanAngleToRenderTargetNDC, __pyx_k_getTanAngleToRenderTargetNDC, sizeof(__pyx_k_getTanAngleToRenderTargetNDC), 0, 1, 0, 1},
  {&__pyx_n_s_getTextureSwapChainBufferGL, __pyx_k_getTextureSwapChainBufferGL, sizeof(__pyx_k_getTextureSwapChainBufferGL), 0, 0, 1, 1},
  {&__pyx_n_u_getTextureSwapChainBufferGL, __pyx_k_getTextureSwapChainBufferGL, sizeof(__pyx_k_getTextureSwapChainBufferGL), 0, 1, 0, 1},
  {&__pyx_n_s_getTextureSwapChainCurrentIndex, __pyx_k_getTextureSwapChainCurrentIndex, sizeof(__pyx_k_getTextureSwapChainCurrentIndex), 0, 0, 1, 1},
  {&__pyx_n_u_getTextureSwapChainCurrentIndex, __pyx_k_getTextureSwapChainCurrentIndex, sizeof(__pyx_k_getTextureSwapChainCurrentIndex), 0, 1, 0, 1},
  {&__pyx_n_s_getTextureSwapChainLengthGL, __pyx_k_getTextureSwapChainLengthGL, sizeof(__pyx_k_getTextureSwapChainLengthGL), 0, 0, 1, 1},
  {&__pyx_n_u_getTextureSwapChainLengthGL, __pyx_k_getTextureSwapChainLengthGL, sizeof(__pyx_k_getTextureSwapChainLengthGL), 0, 1, 0, 1},
  {&__pyx_n_s_getThumbstickValues, __pyx_k_getThumbstickValues, sizeof(__pyx_k_getThumbstickValues), 0, 0, 1, 1},
  {&__pyx_n_u_getThumbstickValues, __pyx_k_getThumbstickValues, sizeof(__pyx_k_getThumbstickValues), 0, 1, 0, 1},
  {&__pyx_n_s_getTouch, __pyx_k_getTouch, sizeof(__pyx_k_getTouch), 0, 0, 1, 1},
  {&__pyx_n_u_getTouch, __pyx_k_getTouch, sizeof(__pyx_k_getTouch), 0, 1, 0, 1},
  {&__pyx_n_s_getTrackerCount, __pyx_k_getTrackerCount, sizeof(__pyx_k_getTrackerCount), 0, 0, 1, 1},
  {&__pyx_n_u_getTrackerCount, __pyx_k_getTrackerCount, sizeof(__pyx_k_getTrackerCount), 0, 1, 0, 1},
  {&__pyx_n_s_getTrackerInfo, __pyx_k_getTrackerInfo, sizeof(__pyx_k_getTrackerInfo), 0, 0, 1, 1},
  {&__pyx_n_u_getTrackerInfo, __pyx_k_getTrackerInfo, sizeof(__pyx_k_getTrackerInfo), 0, 1, 0, 1},
  {&__pyx_n_s_getTrackingOriginType, __pyx_k_getTrackingOriginType, sizeof(__pyx_k_getTrackingOriginType), 0, 0, 1, 1},
  {&__pyx_n_u_getTrackingOriginType, __pyx_k_getTrackingOriginType, sizeof(__pyx_k_getTrackingOriginType), 0, 1, 0, 1},
  {&__pyx_n_s_getTrackingState, __pyx_k_getTrackingState, sizeof(__pyx_k_getTrackingState), 0, 0, 1, 1},
  {&__pyx_n_u_getTrackingState, __pyx_k_getTrackingState, sizeof(__pyx_k_getTrackingState), 0, 1, 0, 1},
  {&__pyx_n_s_getUp, __pyx_k_getUp, sizeof(__pyx_k_getUp), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
  {&__pyx_n_s_green, __pyx_k_green, sizeof(__pyx_k_green), 0, 0, 1, 1},
  {&__pyx_n_s_hasInputFocus, __pyx_k_hasInputFocus, sizeof(__pyx_k_hasInputFocus), 0, 0, 1, 1},
  {&__pyx_n_s_headPose, __pyx_k_headPose, sizeof(__pyx_k_headPose), 0, 0, 1, 1},
  {&__pyx_n_s_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1},
  {&__pyx_n_s_hideBoundary, __pyx_k_hideBoundary, sizeof(__pyx_k_hideBoundary), 0, 0, 1, 1},
  {&__pyx_n_u_hideBoundary, __pyx_k_hideBoundary, sizeof(__pyx_k_hideBoundary), 0, 1, 0, 1},
  {&__pyx_n_u_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 1, 0, 1},
  {&__pyx_n_s_hmdMounted, __pyx_k_hmdMounted, sizeof(__pyx_k_hmdMounted), 0, 0, 1, 1},
  {&__pyx_n_s_hmdToEyePoses, __pyx_k_hmdToEyePoses, sizeof(__pyx_k_hmdToEyePoses), 0, 0, 1, 1},
  {&__pyx_n_s_horzPixelPerDeg, __pyx_k_horzPixelPerDeg, sizeof(__pyx_k_horzPixelPerDeg), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
  {&__pyx_n_u_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 1, 0, 1},
  {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
  {&__pyx_n_s_inverse, __pyx_k_inverse, sizeof(__pyx_k_inverse), 0, 0, 1, 1},
  {&__pyx_n_s_inverted, __pyx_k_inverted, sizeof(__pyx_k_inverted), 0, 0, 1, 1},
  {&__pyx_n_s_isHeadLocked, __pyx_k_isHeadLocked, sizeof(__pyx_k_isHeadLocked), 0, 0, 1, 1},
  {&__pyx_n_u_isHeadLocked, __pyx_k_isHeadLocked, sizeof(__pyx_k_isHeadLocked), 0, 1, 0, 1},
  {&__pyx_n_s_isHmdConnected, __pyx_k_isHmdConnected, sizeof(__pyx_k_isHmdConnected), 0, 0, 1, 1},
  {&__pyx_n_u_isHmdConnected, __pyx_k_isHmdConnected, sizeof(__pyx_k_isHmdConnected), 0, 1, 0, 1},
  {&__pyx_n_s_isOculusServiceRunning, __pyx_k_isOculusServiceRunning, sizeof(__pyx_k_isOculusServiceRunning), 0, 0, 1, 1},
  {&__pyx_n_u_isOculusServiceRunning, __pyx_k_isOculusServiceRunning, sizeof(__pyx_k_isOculusServiceRunning), 0, 1, 0, 1},
  {&__pyx_n_s_isVisible, __pyx_k_isVisible, sizeof(__pyx_k_isVisible), 0, 0, 1, 1},
  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
  {&__pyx_n_s_lastErrorInfo, __pyx_k_lastErrorInfo, sizeof(__pyx_k_lastErrorInfo), 0, 0, 1, 1},
  {&__pyx_n_s_latencyMarker, __pyx_k_latencyMarker, sizeof(__pyx_k_latencyMarker), 0, 0, 1, 1},
  {&__pyx_n_s_layers, __pyx_k_layers, sizeof(__pyx_k_layers), 0, 0, 1, 1},
  {&__pyx_n_s_levels, __pyx_k_levels, sizeof(__pyx_k_levels), 0, 0, 1, 1},
  {&__pyx_n_s_license, __pyx_k_license, sizeof(__pyx_k_license), 0, 0, 1, 1},
  {&__pyx_n_s_linearAcceleration, __pyx_k_linearAcceleration, sizeof(__pyx_k_linearAcceleration), 0, 0, 1, 1},
  {&__pyx_n_s_linearVelocity, __pyx_k_linearVelocity, sizeof(__pyx_k_linearVelocity), 0, 0, 1, 1},
  {&__pyx_n_s_logCallback, __pyx_k_logCallback, sizeof(__pyx_k_logCallback), 0, 0, 1, 1},
  {&__pyx_n_u_low, __pyx_k_low, sizeof(__pyx_k_low), 0, 1, 0, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_maintainer, __pyx_k_maintainer, sizeof(__pyx_k_maintainer), 0, 0, 1, 1},
  {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
  {&__pyx_n_s_maxRange, __pyx_k_maxRange, sizeof(__pyx_k_maxRange), 0, 0, 1, 1},
  {&__pyx_n_s_memo, __pyx_k_memo, sizeof(__pyx_k_memo), 0, 0, 1, 1},
  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
  {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1},
  {&__pyx_n_s_mirrorDesc, __pyx_k_mirrorDesc, sizeof(__pyx_k_mirrorDesc), 0, 0, 1, 1},
  {&__pyx_n_s_mirrorOptions, __pyx_k_mirrorOptions, sizeof(__pyx_k_mirrorOptions), 0, 0, 1, 1},
  {&__pyx_n_s_mirror_id, __pyx_k_mirror_id, sizeof(__pyx_k_mirror_id), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_s_mv, __pyx_k_mv, sizeof(__pyx_k_mv), 0, 0, 1, 1},
  {&__pyx_n_s_mvp, __pyx_k_mvp, sizeof(__pyx_k_mvp), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
  {&__pyx_n_s_nearClip, __pyx_k_nearClip, sizeof(__pyx_k_nearClip), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_newOrigin, __pyx_k_newOrigin, sizeof(__pyx_k_newOrigin), 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_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0},
  {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_u_off, __pyx_k_off, sizeof(__pyx_k_off), 0, 1, 0, 1},
  {&__pyx_n_s_ori, __pyx_k_ori, sizeof(__pyx_k_ori), 0, 0, 1, 1},
  {&__pyx_n_s_originOri, __pyx_k_originOri, sizeof(__pyx_k_originOri), 0, 0, 1, 1},
  {&__pyx_n_s_originPos, __pyx_k_originPos, sizeof(__pyx_k_originPos), 0, 0, 1, 1},
  {&__pyx_n_s_originPose, __pyx_k_originPose, sizeof(__pyx_k_originPose), 0, 0, 1, 1},
  {&__pyx_n_s_originType, __pyx_k_originType, sizeof(__pyx_k_originType), 0, 0, 1, 1},
  {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {&__pyx_n_s_outLength, __pyx_k_outLength, sizeof(__pyx_k_outLength), 0, 0, 1, 1},
  {&__pyx_n_s_outPoses, __pyx_k_outPoses, sizeof(__pyx_k_outPoses), 0, 0, 1, 1},
  {&__pyx_n_s_overlayPresent, __pyx_k_overlayPresent, sizeof(__pyx_k_overlayPresent), 0, 0, 1, 1},
  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_pixelsPerTanAngle, __pyx_k_pixelsPerTanAngle, sizeof(__pyx_k_pixelsPerTanAngle), 0, 0, 1, 1},
  {&__pyx_n_s_playback_state, __pyx_k_playback_state, sizeof(__pyx_k_playback_state), 0, 0, 1, 1},
  {&__pyx_n_s_points, __pyx_k_points, sizeof(__pyx_k_points), 0, 0, 1, 1},
  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {&__pyx_n_s_posOri, __pyx_k_posOri, sizeof(__pyx_k_posOri), 0, 0, 1, 1},
  {&__pyx_n_s_pose, __pyx_k_pose, sizeof(__pyx_k_pose), 0, 0, 1, 1},
  {&__pyx_n_u_pressed, __pyx_k_pressed, sizeof(__pyx_k_pressed), 0, 1, 0, 1},
  {&__pyx_n_s_previousInputState, __pyx_k_previousInputState, sizeof(__pyx_k_previousInputState), 0, 0, 1, 1},
  {&__pyx_n_s_propertyName, __pyx_k_propertyName, sizeof(__pyx_k_propertyName), 0, 0, 1, 1},
  {&__pyx_n_s_prvButtons, __pyx_k_prvButtons, sizeof(__pyx_k_prvButtons), 0, 0, 1, 1},
  {&__pyx_n_s_prvTouches, __pyx_k_prvTouches, sizeof(__pyx_k_prvTouches), 0, 0, 1, 1},
  {&__pyx_n_s_psychxr_libovr__libovr, __pyx_k_psychxr_libovr__libovr, sizeof(__pyx_k_psychxr_libovr__libovr), 0, 0, 1, 1},
  {&__pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_k_psychxr_libovr__libovr_pyx, sizeof(__pyx_k_psychxr_libovr__libovr_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_px, __pyx_k_px, sizeof(__pyx_k_px), 0, 0, 1, 1},
  {&__pyx_n_s_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 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_pz, __pyx_k_pz, sizeof(__pyx_k_pz), 0, 0, 1, 1},
  {&__pyx_n_s_radius, __pyx_k_radius, sizeof(__pyx_k_radius), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_rayDir, __pyx_k_rayDir, sizeof(__pyx_k_rayDir), 0, 0, 1, 1},
  {&__pyx_n_s_recenterTrackingOrigin, __pyx_k_recenterTrackingOrigin, sizeof(__pyx_k_recenterTrackingOrigin), 0, 0, 1, 1},
  {&__pyx_n_u_recenterTrackingOrigin, __pyx_k_recenterTrackingOrigin, sizeof(__pyx_k_recenterTrackingOrigin), 0, 1, 0, 1},
  {&__pyx_n_s_red, __pyx_k_red, sizeof(__pyx_k_red), 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_refPose, __pyx_k_refPose, sizeof(__pyx_k_refPose), 0, 0, 1, 1},
  {&__pyx_n_u_released, __pyx_k_released, sizeof(__pyx_k_released), 0, 1, 0, 1},
  {&__pyx_n_s_resetBoundaryColor, __pyx_k_resetBoundaryColor, sizeof(__pyx_k_resetBoundaryColor), 0, 0, 1, 1},
  {&__pyx_n_u_resetBoundaryColor, __pyx_k_resetBoundaryColor, sizeof(__pyx_k_resetBoundaryColor), 0, 1, 0, 1},
  {&__pyx_n_s_resetPerfStats, __pyx_k_resetPerfStats, sizeof(__pyx_k_resetPerfStats), 0, 0, 1, 1},
  {&__pyx_n_u_resetPerfStats, __pyx_k_resetPerfStats, sizeof(__pyx_k_resetPerfStats), 0, 1, 0, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_u_rising, __pyx_k_rising, sizeof(__pyx_k_rising), 0, 1, 0, 1},
  {&__pyx_n_s_rm, __pyx_k_rm, sizeof(__pyx_k_rm), 0, 0, 1, 1},
  {&__pyx_n_s_rw, __pyx_k_rw, sizeof(__pyx_k_rw), 0, 0, 1, 1},
  {&__pyx_n_s_rx, __pyx_k_rx, sizeof(__pyx_k_rx), 0, 0, 1, 1},
  {&__pyx_n_s_ry, __pyx_k_ry, sizeof(__pyx_k_ry), 0, 0, 1, 1},
  {&__pyx_n_s_rz, __pyx_k_rz, sizeof(__pyx_k_rz), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_n_s_setBool, __pyx_k_setBool, sizeof(__pyx_k_setBool), 0, 0, 1, 1},
  {&__pyx_n_u_setBool, __pyx_k_setBool, sizeof(__pyx_k_setBool), 0, 1, 0, 1},
  {&__pyx_n_s_setBoundaryColor, __pyx_k_setBoundaryColor, sizeof(__pyx_k_setBoundaryColor), 0, 0, 1, 1},
  {&__pyx_n_u_setBoundaryColor, __pyx_k_setBoundaryColor, sizeof(__pyx_k_setBoundaryColor), 0, 1, 0, 1},
  {&__pyx_n_s_setControllerVibration, __pyx_k_setControllerVibration, sizeof(__pyx_k_setControllerVibration), 0, 0, 1, 1},
  {&__pyx_n_u_setControllerVibration, __pyx_k_setControllerVibration, sizeof(__pyx_k_setControllerVibration), 0, 1, 0, 1},
  {&__pyx_n_s_setEyeColorTextureSwapChain, __pyx_k_setEyeColorTextureSwapChain, sizeof(__pyx_k_setEyeColorTextureSwapChain), 0, 0, 1, 1},
  {&__pyx_n_u_setEyeColorTextureSwapChain, __pyx_k_setEyeColorTextureSwapChain, sizeof(__pyx_k_setEyeColorTextureSwapChain), 0, 1, 0, 1},
  {&__pyx_n_s_setEyeRenderFov, __pyx_k_setEyeRenderFov, sizeof(__pyx_k_setEyeRenderFov), 0, 0, 1, 1},
  {&__pyx_n_u_setEyeRenderFov, __pyx_k_setEyeRenderFov, sizeof(__pyx_k_setEyeRenderFov), 0, 1, 0, 1},
  {&__pyx_n_s_setEyeRenderPose, __pyx_k_setEyeRenderPose, sizeof(__pyx_k_setEyeRenderPose), 0, 0, 1, 1},
  {&__pyx_n_u_setEyeRenderPose, __pyx_k_setEyeRenderPose, sizeof(__pyx_k_setEyeRenderPose), 0, 1, 0, 1},
  {&__pyx_n_s_setEyeRenderViewport, __pyx_k_setEyeRenderViewport, sizeof(__pyx_k_setEyeRenderViewport), 0, 0, 1, 1},
  {&__pyx_n_u_setEyeRenderViewport, __pyx_k_setEyeRenderViewport, sizeof(__pyx_k_setEyeRenderViewport), 0, 1, 0, 1},
  {&__pyx_n_s_setFloat, __pyx_k_setFloat, sizeof(__pyx_k_setFloat), 0, 0, 1, 1},
  {&__pyx_n_u_setFloat, __pyx_k_setFloat, sizeof(__pyx_k_setFloat), 0, 1, 0, 1},
  {&__pyx_n_s_setFloatArray, __pyx_k_setFloatArray, sizeof(__pyx_k_setFloatArray), 0, 0, 1, 1},
  {&__pyx_n_u_setFloatArray, __pyx_k_setFloatArray, sizeof(__pyx_k_setFloatArray), 0, 1, 0, 1},
  {&__pyx_n_s_setHeadLocked, __pyx_k_setHeadLocked, sizeof(__pyx_k_setHeadLocked), 0, 0, 1, 1},
  {&__pyx_n_u_setHeadLocked, __pyx_k_setHeadLocked, sizeof(__pyx_k_setHeadLocked), 0, 1, 0, 1},
  {&__pyx_n_s_setHighQuality, __pyx_k_setHighQuality, sizeof(__pyx_k_setHighQuality), 0, 0, 1, 1},
  {&__pyx_n_u_setHighQuality, __pyx_k_setHighQuality, sizeof(__pyx_k_setHighQuality), 0, 1, 0, 1},
  {&__pyx_n_s_setHmdToEyePose, __pyx_k_setHmdToEyePose, sizeof(__pyx_k_setHmdToEyePose), 0, 0, 1, 1},
  {&__pyx_n_u_setHmdToEyePose, __pyx_k_setHmdToEyePose, sizeof(__pyx_k_setHmdToEyePose), 0, 1, 0, 1},
  {&__pyx_n_s_setInt, __pyx_k_setInt, sizeof(__pyx_k_setInt), 0, 0, 1, 1},
  {&__pyx_n_u_setInt, __pyx_k_setInt, sizeof(__pyx_k_setInt), 0, 1, 0, 1},
  {&__pyx_n_s_setLayerEyeFovFlags, __pyx_k_setLayerEyeFovFlags, sizeof(__pyx_k_setLayerEyeFovFlags), 0, 0, 1, 1},
  {&__pyx_n_u_setLayerEyeFovFlags, __pyx_k_setLayerEyeFovFlags, sizeof(__pyx_k_setLayerEyeFovFlags), 0, 1, 0, 1},
  {&__pyx_n_s_setSensorSampleTime, __pyx_k_setSensorSampleTime, sizeof(__pyx_k_setSensorSampleTime), 0, 0, 1, 1},
  {&__pyx_n_u_setSensorSampleTime, __pyx_k_setSensorSampleTime, sizeof(__pyx_k_setSensorSampleTime), 0, 1, 0, 1},
  {&__pyx_n_s_setString, __pyx_k_setString, sizeof(__pyx_k_setString), 0, 0, 1, 1},
  {&__pyx_n_u_setString, __pyx_k_setString, sizeof(__pyx_k_setString), 0, 1, 0, 1},
  {&__pyx_n_s_setTrackingOriginType, __pyx_k_setTrackingOriginType, sizeof(__pyx_k_setTrackingOriginType), 0, 0, 1, 1},
  {&__pyx_n_u_setTrackingOriginType, __pyx_k_setTrackingOriginType, sizeof(__pyx_k_setTrackingOriginType), 0, 1, 0, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_s_shouldQuit, __pyx_k_shouldQuit, sizeof(__pyx_k_shouldQuit), 0, 0, 1, 1},
  {&__pyx_n_s_shouldRecenter, __pyx_k_shouldRecenter, sizeof(__pyx_k_shouldRecenter), 0, 0, 1, 1},
  {&__pyx_n_s_showBoundary, __pyx_k_showBoundary, sizeof(__pyx_k_showBoundary), 0, 0, 1, 1},
  {&__pyx_n_u_showBoundary, __pyx_k_showBoundary, sizeof(__pyx_k_showBoundary), 0, 1, 0, 1},
  {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
  {&__pyx_n_u_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 1, 0, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_specifyTrackingOrigin, __pyx_k_specifyTrackingOrigin, sizeof(__pyx_k_specifyTrackingOrigin), 0, 0, 1, 1},
  {&__pyx_n_u_specifyTrackingOrigin, __pyx_k_specifyTrackingOrigin, sizeof(__pyx_k_specifyTrackingOrigin), 0, 1, 0, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_stateResult, __pyx_k_stateResult, sizeof(__pyx_k_stateResult), 0, 0, 1, 1},
  {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_submitControllerVibration, __pyx_k_submitControllerVibration, sizeof(__pyx_k_submitControllerVibration), 0, 0, 1, 1},
  {&__pyx_n_u_submitControllerVibration, __pyx_k_submitControllerVibration, sizeof(__pyx_k_submitControllerVibration), 0, 1, 0, 1},
  {&__pyx_n_s_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 0, 1, 1},
  {&__pyx_n_u_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 1, 0, 1},
  {&__pyx_n_s_swapChain, __pyx_k_swapChain, sizeof(__pyx_k_swapChain), 0, 0, 1, 1},
  {&__pyx_n_s_swapConfig, __pyx_k_swapConfig, sizeof(__pyx_k_swapConfig), 0, 0, 1, 1},
  {&__pyx_n_s_t_sec, __pyx_k_t_sec, sizeof(__pyx_k_t_sec), 0, 0, 1, 1},
  {&__pyx_n_s_tanAngle, __pyx_k_tanAngle, sizeof(__pyx_k_tanAngle), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_targetPose, __pyx_k_targetPose, sizeof(__pyx_k_targetPose), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_testBoundary, __pyx_k_testBoundary, sizeof(__pyx_k_testBoundary), 0, 0, 1, 1},
  {&__pyx_n_u_testBoundary, __pyx_k_testBoundary, sizeof(__pyx_k_testBoundary), 0, 1, 0, 1},
  {&__pyx_n_s_testResult, __pyx_k_testResult, sizeof(__pyx_k_testResult), 0, 0, 1, 1},
  {&__pyx_n_s_testState, __pyx_k_testState, sizeof(__pyx_k_testState), 0, 0, 1, 1},
  {&__pyx_n_s_test_point, __pyx_k_test_point, sizeof(__pyx_k_test_point), 0, 0, 1, 1},
  {&__pyx_n_s_tex_id, __pyx_k_tex_id, sizeof(__pyx_k_tex_id), 0, 0, 1, 1},
  {&__pyx_n_s_texelsPerPixel, __pyx_k_texelsPerPixel, sizeof(__pyx_k_texelsPerPixel), 0, 0, 1, 1},
  {&__pyx_n_s_textureFormat, __pyx_k_textureFormat, sizeof(__pyx_k_textureFormat), 0, 0, 1, 1},
  {&__pyx_n_s_thePose, __pyx_k_thePose, sizeof(__pyx_k_thePose), 0, 0, 1, 1},
  {&__pyx_n_s_thisPose, __pyx_k_thisPose, sizeof(__pyx_k_thisPose), 0, 0, 1, 1},
  {&__pyx_n_s_thumbstick_x0, __pyx_k_thumbstick_x0, sizeof(__pyx_k_thumbstick_x0), 0, 0, 1, 1},
  {&__pyx_n_s_thumbstick_x1, __pyx_k_thumbstick_x1, sizeof(__pyx_k_thumbstick_x1), 0, 0, 1, 1},
  {&__pyx_n_s_thumbstick_y0, __pyx_k_thumbstick_y0, sizeof(__pyx_k_thumbstick_y0), 0, 0, 1, 1},
  {&__pyx_n_s_thumbstick_y1, __pyx_k_thumbstick_y1, sizeof(__pyx_k_thumbstick_y1), 0, 0, 1, 1},
  {&__pyx_n_s_timeInSeconds, __pyx_k_timeInSeconds, sizeof(__pyx_k_timeInSeconds), 0, 0, 1, 1},
  {&__pyx_n_u_timeInSeconds, __pyx_k_timeInSeconds, sizeof(__pyx_k_timeInSeconds), 0, 1, 0, 1},
  {&__pyx_n_s_timeoutMs, __pyx_k_timeoutMs, sizeof(__pyx_k_timeoutMs), 0, 0, 1, 1},
  {&__pyx_n_s_toReturn, __pyx_k_toReturn, sizeof(__pyx_k_toReturn), 0, 0, 1, 1},
  {&__pyx_n_s_to_return, __pyx_k_to_return, sizeof(__pyx_k_to_return), 0, 0, 1, 1},
  {&__pyx_n_s_tolerance, __pyx_k_tolerance, sizeof(__pyx_k_tolerance), 0, 0, 1, 1},
  {&__pyx_n_s_touch, __pyx_k_touch, sizeof(__pyx_k_touch), 0, 0, 1, 1},
  {&__pyx_n_s_trackerCount, __pyx_k_trackerCount, sizeof(__pyx_k_trackerCount), 0, 0, 1, 1},
  {&__pyx_n_s_trackerIndex, __pyx_k_trackerIndex, sizeof(__pyx_k_trackerIndex), 0, 0, 1, 1},
  {&__pyx_n_s_triggerLeft, __pyx_k_triggerLeft, sizeof(__pyx_k_triggerLeft), 0, 0, 1, 1},
  {&__pyx_n_s_triggerRight, __pyx_k_triggerRight, sizeof(__pyx_k_triggerRight), 0, 0, 1, 1},
  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
  {&__pyx_n_s_unqualifiedSuccess, __pyx_k_unqualifiedSuccess, sizeof(__pyx_k_unqualifiedSuccess), 0, 0, 1, 1},
  {&__pyx_n_u_unqualifiedSuccess, __pyx_k_unqualifiedSuccess, sizeof(__pyx_k_unqualifiedSuccess), 0, 1, 0, 1},
  {&__pyx_n_s_up, __pyx_k_up, sizeof(__pyx_k_up), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_updateInputState, __pyx_k_updateInputState, sizeof(__pyx_k_updateInputState), 0, 0, 1, 1},
  {&__pyx_n_u_updateInputState, __pyx_k_updateInputState, sizeof(__pyx_k_updateInputState), 0, 1, 0, 1},
  {&__pyx_n_s_use_marker, __pyx_k_use_marker, sizeof(__pyx_k_use_marker), 0, 0, 1, 1},
  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_in, __pyx_k_value_in, sizeof(__pyx_k_value_in), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_valuesCapacity, __pyx_k_valuesCapacity, sizeof(__pyx_k_valuesCapacity), 0, 0, 1, 1},
  {&__pyx_n_s_vecIn, __pyx_k_vecIn, sizeof(__pyx_k_vecIn), 0, 0, 1, 1},
  {&__pyx_n_s_vec_out, __pyx_k_vec_out, sizeof(__pyx_k_vec_out), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_vertPixelPerDeg, __pyx_k_vertPixelPerDeg, sizeof(__pyx_k_vertPixelPerDeg), 0, 0, 1, 1},
  {&__pyx_n_s_waitToBeginFrame, __pyx_k_waitToBeginFrame, sizeof(__pyx_k_waitToBeginFrame), 0, 0, 1, 1},
  {&__pyx_n_u_waitToBeginFrame, __pyx_k_waitToBeginFrame, sizeof(__pyx_k_waitToBeginFrame), 0, 1, 0, 1},
  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_RuntimeWarning = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeWarning); if (!__pyx_builtin_RuntimeWarning) __PYX_ERR(0, 486, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 452, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 898, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 982, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1629, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 2345, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 151, __pyx_L1_error)
  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 400, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 828, __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);

  /* "psychxr/libovr/_libovr.pyx":873
 *     cdef LibOVRBounds _bbox
 * 
 *     def __init__(self, pos=(0., 0., 0.), ori=(0., 0., 0., 1.)):             # <<<<<<<<<<<<<<
 *         self._new_struct(pos, ori)
 * 
 */
  __pyx_tuple__2 = PyTuple_Pack(3, __pyx_float_0_, __pyx_float_0_, __pyx_float_0_); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);
  __pyx_tuple__3 = PyTuple_Pack(4, __pyx_float_0_, __pyx_float_0_, __pyx_float_0_, __pyx_float_1_); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "psychxr/libovr/_libovr.pyx":1079
 *     @pos.setter
 *     def pos(self, object value):
 *         self._pos[:] = value             # <<<<<<<<<<<<<<
 * 
 *     def getPos(self, np.ndarray[np.float32_t, ndim=1] out=None):
 */
  __pyx_slice__4 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__4);
  __Pyx_GIVEREF(__pyx_slice__4);

  /* "psychxr/libovr/_libovr.pyx":1120
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((3,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_tuple__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "psychxr/libovr/_libovr.pyx":1179
 *         cdef np.ndarray[np.float32_t, ndim=1] toReturn
 *         if out is None:
 *             toReturn = np.zeros((4,), dtype=np.float32)             # <<<<<<<<<<<<<<
 *         else:
 *             toReturn = out
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_tuple__7); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "psychxr/libovr/_libovr.pyx":1525
 *         return rswing, rtwist
 * 
 *     def getAngleTo(self, object target, object dir=(0., 0., -1.), bint degrees=True):             # <<<<<<<<<<<<<<
 *         """Get the relative angle to a point in world space from the `dir`
 *         vector in the local coordinate system of this pose.
 */
  __pyx_tuple__9 = PyTuple_Pack(3, __pyx_float_0_, __pyx_float_0_, __pyx_float_neg_1_); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "psychxr/libovr/_libovr.pyx":1622
 * 
 *         cdef np.ndarray[np.float32_t, ndim=2] toReturn = \
 *             np.zeros((4, 4), dtype=np.float32)             # <<<<<<<<<<<<<<
 * 
 *         # fast copy matrix to numpy array
 */
  __pyx_tuple__10 = PyTuple_Pack(2, __pyx_int_4, __pyx_int_4); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_tuple__10); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "psychxr/libovr/_libovr.pyx":2345
 *         """
 *         if 0.0 > s > 1.0:
 *             raise ValueError("Interpolation factor must be between 0.0 and 1.0.")             # <<<<<<<<<<<<<<
 * 
 *         cdef libovr_math.Posef toPose = <libovr_math.Posef>end.c_data[0]
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_Interpolation_factor_must_be_bet); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "(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__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "(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__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "psychxr/libovr/_libovr.pyx":2529
 *             self._thePose.posOri = pose
 *         else:
 *             raise TypeError('Invalid value for `pose`, must be `LibOVRPose`'             # <<<<<<<<<<<<<<
 *                             ', `list` or `tuple`.')
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Invalid_value_for_pose_must_be_L); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 2529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "psychxr/libovr/_libovr.pyx":2700
 * 
 *         if ptr is NULL:
 *             raise MemoryError(             # <<<<<<<<<<<<<<
 *                 "Failed to allocate 'ovrPosef' in 'timeIntegrate'.")
 * 
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Failed_to_allocate_ovrPosef_in_t); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 2700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "(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__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "(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__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "(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__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "(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__23 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "(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__24 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "(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__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "(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__28 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "(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__31 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "(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__32 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "(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__33 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "(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__34 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "(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__35 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "psychxr/libovr/_libovr.pyx":4170
 * 
 *         if array_in.ndim > 1:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Array has invalid number of dimensions, must be 1.")
 * 
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_Array_has_invalid_number_of_dime); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 4170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "psychxr/libovr/_libovr.pyx":4175
 *         cdef int num_samples = <int>array_in.shape[0]
 *         if num_samples >= capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Array too large, must have length < HAPTICS_BUFFER_SAMPLES_MAX")
 * 
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Array_too_large_must_have_length); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "psychxr/libovr/_libovr.pyx":4554
 *         value_in = value
 *     else:
 *         raise TypeError("Default value must be type 'str' or 'bytes'.")             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrBool to_return = capi.ovr_SetString(
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_Default_value_must_be_type_str_o); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 4554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "psychxr/libovr/_libovr.pyx":5428
 *     # check if there is a swap chain in the slot
 *     if _eyeLayer.ColorTexture[swapChain] == NULL:
 *         raise RuntimeError(             # <<<<<<<<<<<<<<
 *             "Cannot get swap chain length, NULL eye buffer texture.")
 * 
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_Cannot_get_swap_chain_length_NUL); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 5428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "psychxr/libovr/_libovr.pyx":5466
 *     # check if there is a swap chain in the slot
 *     if _eyeLayer.ColorTexture[swapChain] == NULL:
 *         raise RuntimeError(             # <<<<<<<<<<<<<<
 *             "Cannot get buffer ID, NULL eye buffer texture.")
 * 
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_Cannot_get_buffer_ID_NULL_eye_bu); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 5466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "psychxr/libovr/_libovr.pyx":5864
 *             count * sizeof(capi.ovrTrackedDeviceType))
 *     if not devices:
 *         raise MemoryError("Failed to allocate array 'devices'.")             # <<<<<<<<<<<<<<
 * 
 *     cdef int i = 0
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_Failed_to_allocate_array_devices); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 5864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "psychxr/libovr/_libovr.pyx":5874
 *             count * sizeof(capi.ovrPoseStatef))
 *     if not devicePoses:
 *         raise MemoryError("Failed to allocate array 'devicePoses'.")             # <<<<<<<<<<<<<<
 * 
 *     # get the device poses
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Failed_to_allocate_array_deviceP); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 5874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "psychxr/libovr/_libovr.pyx":6596
 *             _ptrSession, capi.ovrTrackingOrigin_EyeLevel)
 *     else:
 *         raise ValueError("Invalid tracking origin type specified "             # <<<<<<<<<<<<<<
 *                          "must be 'TRACKING_ORIGIN_FLOOR_LEVEL' or "
 *                          "'TRACKING_ORIGIN_EYE_LEVEL'.")
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_Invalid_tracking_origin_type_spe); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 6596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "psychxr/libovr/_libovr.pyx":6959
 *     if not (boundaryType == capi.ovrBoundary_PlayArea or
 *             boundaryType == capi.ovrBoundary_Outer):
 *         raise ValueError("Invalid boundary type specified.")             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrVector3f vec_out
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_Invalid_boundary_type_specified); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 6959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "psychxr/libovr/_libovr.pyx":7137
 *         idx = 8
 *     else:
 *         raise ValueError("Invalid controller type specified.")             # <<<<<<<<<<<<<<
 * 
 *     # pointer to the current and previous input state
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_Invalid_controller_type_specifie); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 7137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "psychxr/libovr/_libovr.pyx":7289
 *                       (prvButtons & button) == button
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")             # <<<<<<<<<<<<<<
 * 
 *     return stateResult, t_sec
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_Invalid_trigger_mode_specified); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 7289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "psychxr/libovr/_libovr.pyx":7762
 *         freq = 1.0
 *     else:
 *         raise RuntimeError("Invalid frequency specified.")             # <<<<<<<<<<<<<<
 * 
 *     cdef capi.ovrResult result = capi.ovr_SetControllerVibration(
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_Invalid_frequency_specified); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 7762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(2, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(2, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(2, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(2, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(2, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038
 *         _import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(2, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "../../../../Python/Python36/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(2, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "View.MemoryView":133
 * 
 *         if not self.ndim:
 *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "View.MemoryView":136
 * 
 *         if itemsize <= 0:
 *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "View.MemoryView":148
 * 
 *         if not self._shape:
 *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "View.MemoryView":176
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
 * 
 *             if self.dtype_is_object:
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "View.MemoryView":192
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "(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__68 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "View.MemoryView":414
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "View.MemoryView":491
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "View.MemoryView":516
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "View.MemoryView":566
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "View.MemoryView":573
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 */
  __pyx_tuple__73 = PyTuple_New(1); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(1, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_INCREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_tuple__73, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "View.MemoryView":699
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "(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__78 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "psychxr/libovr/_libovr.pyx":449
 * #
 * cdef capi.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):             # <<<<<<<<<<<<<<
 *     if capi.OVR_FAILURE(result):
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_check_result, 449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 449, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4239
 * #
 * 
 * def success(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates success.
 * 
 */
  __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_result); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 4239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_success, 4239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 4239, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4251
 * 
 * 
 * def unqualifiedSuccess(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates unqualified success.
 * 
 */
  __pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_result); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 4251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_unqualifiedSuccess, 4251, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 4251, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4263
 * 
 * 
 * def failure(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates failure (error).
 * 
 */
  __pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_result); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_failure, 4263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 4263, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4275
 * 
 * 
 * def getBool(bytes propertyName, bint defaultVal=False):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR boolean property.
 * 
 */
  __pyx_tuple__87 = PyTuple_Pack(4, __pyx_n_s_propertyName, __pyx_n_s_defaultVal, __pyx_n_s_val, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getBool, 4275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 4275, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4304
 * 
 * 
 * def setBool(bytes propertyName, bint value=True):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR boolean property.
 * 
 */
  __pyx_tuple__89 = PyTuple_Pack(4, __pyx_n_s_propertyName, __pyx_n_s_value, __pyx_n_s_val, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setBool, 4304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 4304, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4332
 * 
 * 
 * def getInt(bytes propertyName, int defaultVal=0):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR integer property.
 * 
 */
  __pyx_tuple__91 = PyTuple_Pack(3, __pyx_n_s_propertyName, __pyx_n_s_defaultVal, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getInt, 4332, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 4332, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4359
 * 
 * 
 * def setInt(bytes propertyName, int value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR integer property.
 * 
 */
  __pyx_tuple__93 = PyTuple_Pack(3, __pyx_n_s_propertyName, __pyx_n_s_value, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setInt, 4359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 4359, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4397
 * 
 * 
 * def getFloat(bytes propertyName, float defaultVal=0.0):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR floating point number property.
 * 
 */
  __pyx_tuple__95 = PyTuple_Pack(3, __pyx_n_s_propertyName, __pyx_n_s_defaultVal, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 4397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getFloat, 4397, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 4397, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4425
 * 
 * 
 * def setFloat(bytes propertyName, float value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */
  __pyx_tuple__97 = PyTuple_Pack(3, __pyx_n_s_propertyName, __pyx_n_s_value, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setFloat, 4425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 4425, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4452
 * 
 * 
 * def setFloatArray(bytes propertyName, np.ndarray[np.float32_t, ndim=1] values):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */
  __pyx_tuple__99 = PyTuple_Pack(4, __pyx_n_s_propertyName, __pyx_n_s_values, __pyx_n_s_valuesCapacity, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 4452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setFloatArray, 4452, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 4452, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4489
 * 
 * 
 * def getFloatArray(bytes propertyName, np.ndarray[np.float32_t, ndim=1] values not None):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR float array property.
 * 
 */
  __pyx_tuple__101 = PyTuple_Pack(4, __pyx_n_s_propertyName, __pyx_n_s_values, __pyx_n_s_valuesCapacity, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 4489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getFloatArray, 4489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 4489, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4529
 * 
 * 
 * def setString(bytes propertyName, object value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */
  __pyx_tuple__103 = PyTuple_Pack(4, __pyx_n_s_propertyName, __pyx_n_s_value, __pyx_n_s_value_in, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 4529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setString, 4529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 4529, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4564
 * 
 * 
 * def getString(bytes propertyName, object defaultVal=''):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR string property.
 * 
 */
  __pyx_tuple__105 = PyTuple_Pack(4, __pyx_n_s_propertyName, __pyx_n_s_defaultVal, __pyx_n_s_value_in, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 4564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getString, 4564, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 4564, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4606
 * 
 * 
 * def isOculusServiceRunning(int timeoutMs=100):             # <<<<<<<<<<<<<<
 *     """Check if the Oculus Runtime is loaded and running.
 * 
 */
  __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_timeoutMs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_isOculusServiceRunning, 4606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 4606, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4626
 * 
 * 
 * def isHmdConnected(int timeoutMs=100):             # <<<<<<<<<<<<<<
 *     """Check if an HMD is connected.
 * 
 */
  __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_timeoutMs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 4626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_isHmdConnected, 4626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 4626, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4646
 * 
 * 
 * def getHmdInfo():             # <<<<<<<<<<<<<<
 *     """Get HMD information.
 * 
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_n_s_toReturn); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 4646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getHmdInfo, 4646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 4646, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4662
 * 
 * 
 * def initialize(bint focusAware=False, int connectionTimeout=0, object logCallback=None):             # <<<<<<<<<<<<<<
 *     """Initialize the session.
 * 
 */
  __pyx_tuple__113 = PyTuple_Pack(5, __pyx_n_s_focusAware, __pyx_n_s_connectionTimeout, __pyx_n_s_logCallback, __pyx_n_s_flags, __pyx_n_s_result); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 4662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_initialize, 4662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 4662, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4735
 * 
 * 
 * def create():             # <<<<<<<<<<<<<<
 *     """Create a new session. Control is handed over to the application from
 *     Oculus Home.
 */
  __pyx_tuple__115 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_i); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 4735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_create, 4735, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 4735, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4778
 * 
 * 
 * def destroyTextureSwapChain(int swapChain):             # <<<<<<<<<<<<<<
 *     """Destroy a texture swap chain.
 * 
 */
  __pyx_tuple__117 = PyTuple_Pack(2, __pyx_n_s_swapChain, __pyx_n_s_swapChain); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 4778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_destroyTextureSwapChain, 4778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 4778, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4795
 * 
 * 
 * def destroyMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Destroy the mirror texture.
 *     """
 */
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_destroyMirrorTexture, 4795, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 4795, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4804
 * 
 * 
 * def destroy():             # <<<<<<<<<<<<<<
 *     """Destroy a session.
 * 
 */
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_destroy, 4804, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 4804, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4821
 * 
 * 
 * def shutdown():             # <<<<<<<<<<<<<<
 *     """End the current session.
 * 
 */
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_shutdown, 4821, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 4821, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4832
 * 
 * 
 * def getGraphicsLUID():             # <<<<<<<<<<<<<<
 *     """The graphics device LUID.
 * 
 */
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getGraphicsLUID, 4832, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 4832, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4845
 * 
 * 
 * def setHighQuality(bint enable):             # <<<<<<<<<<<<<<
 *     """Enable high quality mode.
 * 
 */
  __pyx_tuple__123 = PyTuple_Pack(2, __pyx_n_s_enable, __pyx_n_s_enable); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 4845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setHighQuality, 4845, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 4845, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4865
 * 
 * 
 * def setHeadLocked(bint enable):             # <<<<<<<<<<<<<<
 *     """Set the render layer state for head locking.
 * 
 */
  __pyx_tuple__125 = PyTuple_Pack(2, __pyx_n_s_enable, __pyx_n_s_enable); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 4865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setHeadLocked, 4865, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 4865, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4894
 * 
 * 
 * def isHeadLocked():             # <<<<<<<<<<<<<<
 *     """Check if head locking is enabled.
 * 
 */
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_isHeadLocked, 4894, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 4894, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4908
 * 
 * 
 * def getPixelsPerTanAngleAtCenter(int eye):             # <<<<<<<<<<<<<<
 *     """Get pixels per tan angle (=1) at the center of the display.
 * 
 */
  __pyx_tuple__128 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_eye, __pyx_n_s_toReturn); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 4908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getPixelsPerTanAngleAtCenter, 4908, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 4908, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4933
 * 
 * 
 * def getTanAngleToRenderTargetNDC(int eye, object tanAngle):             # <<<<<<<<<<<<<<
 *     """Convert FOV tan angle to normalized device coordinates (NDC).
 * 
 */
  __pyx_tuple__130 = PyTuple_Pack(4, __pyx_n_s_eye, __pyx_n_s_tanAngle, __pyx_n_s_vecIn, __pyx_n_s_toReturn); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 4933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTanAngleToRenderTargetNDC, 4933, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 4933, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4962
 * 
 * 
 * def getPixelsPerDegree(int eye):             # <<<<<<<<<<<<<<
 *     """Get pixels per degree at the center of the display.
 * 
 */
  __pyx_tuple__132 = PyTuple_Pack(5, __pyx_n_s_eye, __pyx_n_s_eye, __pyx_n_s_pixelsPerTanAngle, __pyx_n_s_horzPixelPerDeg, __pyx_n_s_vertPixelPerDeg); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 4962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getPixelsPerDegree, 4962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 4962, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":4991
 * 
 * 
 * def getDistortedViewport(int eye):             # <<<<<<<<<<<<<<
 *     """Get the distorted viewport.
 * 
 */
  __pyx_tuple__134 = PyTuple_Pack(4, __pyx_n_s_eye, __pyx_n_s_eye, __pyx_n_s_distVp, __pyx_n_s_toReturn); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 4991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getDistortedViewport, 4991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 4991, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5014
 * 
 * 
 * def getEyeRenderFov(int eye):             # <<<<<<<<<<<<<<
 *     """Get the field-of-view to use for rendering.
 * 
 */
  __pyx_tuple__136 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_eye, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 5014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeRenderFov, 5014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 5014, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5051
 * 
 * 
 * def setEyeRenderFov(int eye, object fov):             # <<<<<<<<<<<<<<
 *     """Set the field-of-view of a given eye. This is used to compute the
 *     projection matrix.
 */
  __pyx_tuple__138 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_fov, __pyx_n_s_fov_in); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 5051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setEyeRenderFov, 5051, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 5051, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5102
 * 
 * 
 * def getEyeAspectRatio(int eye):             # <<<<<<<<<<<<<<
 *     """Get the aspect ratio of an eye.
 * 
 */
  __pyx_tuple__140 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_eye, __pyx_n_s_fovPort); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 5102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeAspectRatio, 5102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 5102, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5123
 * 
 * 
 * def getEyeHorizontalFovRadians(int eye):             # <<<<<<<<<<<<<<
 *     """Get the angle of the horizontal field-of-view (FOV) for a given eye.
 * 
 */
  __pyx_tuple__142 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_eye, __pyx_n_s_fovPort); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 5123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeHorizontalFovRadians, 5123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 5123, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5143
 * 
 * 
 * def getEyeVerticalFovRadians(int eye):             # <<<<<<<<<<<<<<
 *     """Get the angle of the vertical field-of-view (FOV) for a given eye.
 * 
 */
  __pyx_tuple__144 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_eye, __pyx_n_s_fovPort); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 5143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeVerticalFovRadians, 5143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 5143, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5163
 * 
 * 
 * def getEyeFocalLength(int eye):             # <<<<<<<<<<<<<<
 *     """Get the focal length of the eye's frustum.
 * 
 */
  __pyx_tuple__146 = PyTuple_Pack(2, __pyx_n_s_eye, __pyx_n_s_eye); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 5163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeFocalLength, 5163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 5163, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5184
 * 
 * 
 * def calcEyeBufferSize(int eye, float texelsPerPixel=1.0):             # <<<<<<<<<<<<<<
 *     """Get the recommended buffer (texture) sizes for eye buffers.
 * 
 */
  __pyx_tuple__148 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_texelsPerPixel, __pyx_n_s_bufferSize); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 5184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_calcEyeBufferSize, 5184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 5184, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5247
 * 
 * 
 * def getLayerEyeFovFlags():             # <<<<<<<<<<<<<<
 *     """Get header flags for the render layer.
 * 
 */
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getLayerEyeFovFlags, 5247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 5247, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5272
 * 
 * 
 * def setLayerEyeFovFlags(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """Set header flags for the render layer.
 * 
 */
  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_n_s_flags, __pyx_n_s_flags); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 5272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setLayerEyeFovFlags, 5272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 5272, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5312
 * 
 * 
 * def createTextureSwapChainGL(int swapChain, int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int levels=1):             # <<<<<<<<<<<<<<
 *     """Create a texture swap chain for eye image buffers.
 * 
 */
  __pyx_tuple__153 = PyTuple_Pack(7, __pyx_n_s_swapChain, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_textureFormat, __pyx_n_s_levels, __pyx_n_s_swapConfig, __pyx_n_s_result); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_createTextureSwapChainGL, 5312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 5312, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5391
 * 
 * 
 * def getTextureSwapChainLengthGL(int swapChain):             # <<<<<<<<<<<<<<
 *     """Get the length of a specified swap chain.
 * 
 */
  __pyx_tuple__155 = PyTuple_Pack(4, __pyx_n_s_swapChain, __pyx_n_s_swapChain, __pyx_n_s_outLength, __pyx_n_s_result); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 5391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTextureSwapChainLengthGL, 5391, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 5391, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5438
 * 
 * 
 * def getTextureSwapChainCurrentIndex(int swapChain):             # <<<<<<<<<<<<<<
 *     """Get the current buffer index within the swap chain.
 * 
 */
  __pyx_tuple__157 = PyTuple_Pack(4, __pyx_n_s_swapChain, __pyx_n_s_swapChain, __pyx_n_s_current_idx, __pyx_n_s_result); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 5438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTextureSwapChainCurrentIndex, 5438, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 5438, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5476
 * 
 * 
 * def getTextureSwapChainBufferGL(int swapChain, int index):             # <<<<<<<<<<<<<<
 *     """Get the texture buffer as an OpenGL name at a specific index in the
 *     swap chain for a given swapChain.
 */
  __pyx_tuple__159 = PyTuple_Pack(4, __pyx_n_s_swapChain, __pyx_n_s_index, __pyx_n_s_tex_id, __pyx_n_s_result); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 5476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTextureSwapChainBufferGL, 5476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 5476, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5524
 * 
 * 
 * def setEyeColorTextureSwapChain(int eye, int swapChain):             # <<<<<<<<<<<<<<
 *     """Set the color texture swap chain for a given eye.
 * 
 */
  __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_eye, __pyx_n_s_swapChain); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 5524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setEyeColorTextureSwapChain, 5524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 5524, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5570
 * 
 * 
 * def createMirrorTexture(int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int mirrorOptions=MIRROR_OPTION_DEFAULT):             # <<<<<<<<<<<<<<
 *     """Create a mirror texture.
 * 
 */
  __pyx_tuple__163 = PyTuple_Pack(6, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_textureFormat, __pyx_n_s_mirrorOptions, __pyx_n_s_mirrorDesc, __pyx_n_s_result); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_createMirrorTexture, 5570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 5570, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5639
 * 
 * 
 * def getMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Mirror texture ID.
 * 
 */
  __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_mirror_id, __pyx_n_s_result); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 5639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getMirrorTexture, 5639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 5639, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5682
 * 
 * 
 * def getSensorSampleTime():             # <<<<<<<<<<<<<<
 *     """Get the sensor sample timestamp.
 * 
 */
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getSensorSampleTime, 5682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 5682, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5705
 * 
 * 
 * def setSensorSampleTime(double absTime):             # <<<<<<<<<<<<<<
 *     """Set the sensor sample timestamp.
 * 
 */
  __pyx_tuple__168 = PyTuple_Pack(2, __pyx_n_s_absTime, __pyx_n_s_absTime); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 5705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setSensorSampleTime, 5705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 5705, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5743
 * 
 * 
 * def getTrackingState(double absTime, bint latencyMarker=True):             # <<<<<<<<<<<<<<
 *     """Get the current tracking state of the head and hands.
 * 
 */
  __pyx_tuple__170 = PyTuple_Pack(4, __pyx_n_s_absTime, __pyx_n_s_latencyMarker, __pyx_n_s_use_marker, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 5743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTrackingState, 5743, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 5743, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5787
 * 
 * 
 * def getDevicePoses(object deviceTypes, double absTime, bint latencyMarker=True):             # <<<<<<<<<<<<<<
 *     """Get tracked device poses.
 * 
 */
  __pyx_tuple__172 = PyTuple_Pack(10, __pyx_n_s_deviceTypes, __pyx_n_s_absTime, __pyx_n_s_latencyMarker, __pyx_n_s_count, __pyx_n_s_devices, __pyx_n_s_i, __pyx_n_s_devicePoses, __pyx_n_s_result, __pyx_n_s_outPoses, __pyx_n_s_thisPose); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 5787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getDevicePoses, 5787, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 5787, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":5903
 * 
 * 
 * def calcEyePoses(LibOVRPose headPose, object originPose=None):             # <<<<<<<<<<<<<<
 *     """Calculate eye poses using a given head pose.
 * 
 */
  __pyx_tuple__174 = PyTuple_Pack(11, __pyx_n_s_headPose, __pyx_n_s_originPose, __pyx_n_s_hmdToEyePoses, __pyx_n_s_pos, __pyx_n_s_originPos, __pyx_n_s_ori, __pyx_n_s_originOri, __pyx_n_s_up, __pyx_n_s_forward, __pyx_n_s_rm, __pyx_n_s_eye); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 5903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_calcEyePoses, 5903, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 5903, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6000
 * 
 * 
 * def getHmdToEyePose(int eye):             # <<<<<<<<<<<<<<
 *     """HMD to eye pose.
 * 
 */
  __pyx_tuple__176 = PyTuple_Pack(2, __pyx_n_s_eye, __pyx_n_s_eye); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 6000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getHmdToEyePose, 6000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 6000, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6043
 * 
 * 
 * def setHmdToEyePose(int eye, LibOVRPose eyePose):             # <<<<<<<<<<<<<<
 *     """Set the HMD eye poses.
 * 
 */
  __pyx_tuple__178 = PyTuple_Pack(2, __pyx_n_s_eye, __pyx_n_s_eyePose); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 6043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setHmdToEyePose, 6043, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 6043, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6073
 * 
 * 
 * def getEyeRenderPose(int eye):             # <<<<<<<<<<<<<<
 *     """Get eye render poses.
 * 
 */
  __pyx_tuple__180 = PyTuple_Pack(2, __pyx_n_s_eye, __pyx_n_s_eye); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 6073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeRenderPose, 6073, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 6073, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6123
 * 
 * 
 * def setEyeRenderPose(int eye, LibOVRPose eyePose):             # <<<<<<<<<<<<<<
 *     """Set eye render pose.
 * 
 */
  __pyx_tuple__182 = PyTuple_Pack(7, __pyx_n_s_eye, __pyx_n_s_eyePose, __pyx_n_s_pos, __pyx_n_s_ori, __pyx_n_s_up, __pyx_n_s_forward, __pyx_n_s_rm); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 6123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setEyeRenderPose, 6123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 6123, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6168
 * 
 * 
 * def getEyeProjectionMatrix(int eye, float nearClip=0.01, float farClip=1000.0, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *     """Compute the projection matrix.
 * 
 */
  __pyx_tuple__184 = PyTuple_Pack(9, __pyx_n_s_eye, __pyx_n_s_nearClip, __pyx_n_s_farClip, __pyx_n_s_out, __pyx_n_s_to_return, __pyx_n_s_mv, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 6168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeProjectionMatrix, 6168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 6168, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6265
 * 
 * 
 * def getEyeRenderViewport(int eye, np.ndarray[np.int_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *     """Get the eye render viewport.
 * 
 */
  __pyx_tuple__186 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_out, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 6265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeRenderViewport, 6265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 6265, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6301
 * 
 * 
 * def setEyeRenderViewport(int eye, object values):             # <<<<<<<<<<<<<<
 *     """Set the eye render viewport.
 * 
 */
  __pyx_tuple__188 = PyTuple_Pack(2, __pyx_n_s_eye, __pyx_n_s_values); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 6301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setEyeRenderViewport, 6301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 6301, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6343
 * 
 * 
 * def getEyeViewMatrix(int eye, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *     """Compute a view matrix for a specified eye.
 * 
 */
  __pyx_tuple__190 = PyTuple_Pack(6, __pyx_n_s_eye, __pyx_n_s_out, __pyx_n_s_to_return, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_N); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 6343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getEyeViewMatrix, 6343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 6343, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6381
 * 
 * 
 * def getPredictedDisplayTime(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Get the predicted time a frame will be displayed.
 * 
 */
  __pyx_tuple__192 = PyTuple_Pack(2, __pyx_n_s_frameIndex, __pyx_n_s_t_sec); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 6381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getPredictedDisplayTime, 6381, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 6381, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6403
 * 
 * 
 * def timeInSeconds():             # <<<<<<<<<<<<<<
 *     """Absolute time in seconds.
 * 
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_n_s_t_sec); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 6403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_timeInSeconds, 6403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 6403, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6417
 * 
 * 
 * def waitToBeginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Wait until a buffer is available so frame rendering can begin. Must be
 *     called before :func:`beginFrame`.
 */
  __pyx_tuple__196 = PyTuple_Pack(2, __pyx_n_s_frameIndex, __pyx_n_s_result); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 6417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_waitToBeginFrame, 6417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 6417, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6442
 * 
 * 
 * def beginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Begin rendering the frame. Must be called prior to drawing and
 *     :func:`endFrame`.
 */
  __pyx_tuple__198 = PyTuple_Pack(2, __pyx_n_s_frameIndex, __pyx_n_s_result); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 6442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_beginFrame, 6442, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 6442, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6464
 * 
 * 
 * def commitTextureSwapChain(int eye):             # <<<<<<<<<<<<<<
 *     """Commit changes to a given eye's texture swap chain. When called, the
 *     runtime is notified that the texture is ready for use, and the swap
 */
  __pyx_tuple__200 = PyTuple_Pack(3, __pyx_n_s_eye, __pyx_n_s_eye, __pyx_n_s_result); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 6464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_commitTextureSwapChain, 6464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 6464, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6497
 * 
 * 
 * def endFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Call when rendering a frame has completed. Buffers which have been
 *     committed are passed to the compositor for distortion.
 */
  __pyx_tuple__202 = PyTuple_Pack(4, __pyx_n_s_frameIndex, __pyx_n_s_layers, __pyx_n_s_result, __pyx_n_s_absTime); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 6497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_endFrame, 6497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 6497, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6542
 * 
 * 
 * def getTrackingOriginType():             # <<<<<<<<<<<<<<
 *     """Get the current tracking origin type.
 * 
 */
  __pyx_tuple__204 = PyTuple_Pack(1, __pyx_n_s_originType); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);
  __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTrackingOriginType, 6542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 6542, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6565
 * 
 * 
 * def setTrackingOriginType(int value):             # <<<<<<<<<<<<<<
 *     """Set the tracking origin type.
 * 
 */
  __pyx_tuple__206 = PyTuple_Pack(3, __pyx_n_s_value, __pyx_n_s_value, __pyx_n_s_result); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 6565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setTrackingOriginType, 6565, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 6565, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6603
 * 
 * 
 * def recenterTrackingOrigin():             # <<<<<<<<<<<<<<
 *     """Recenter the tracking origin.
 * 
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 6603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_recenterTrackingOrigin, 6603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 6603, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6627
 * 
 * 
 * def specifyTrackingOrigin(LibOVRPose newOrigin):             # <<<<<<<<<<<<<<
 *     """Specify a new tracking origin.
 * 
 */
  __pyx_tuple__210 = PyTuple_Pack(2, __pyx_n_s_newOrigin, __pyx_n_s_result); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 6627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_specifyTrackingOrigin, 6627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 6627, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6644
 * 
 * 
 * def clearShouldRecenterFlag():             # <<<<<<<<<<<<<<
 *     """Clear the :py:attr:`LibOVRSessionStatus.shouldRecenter` flag.
 * 
 */
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_clearShouldRecenterFlag, 6644, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 6644, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6652
 * 
 * 
 * def getTrackerCount():             # <<<<<<<<<<<<<<
 *     """Get the number of attached trackers.
 * 
 */
  __pyx_tuple__213 = PyTuple_Pack(1, __pyx_n_s_trackerCount); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 6652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTrackerCount, 6652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 6652, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6674
 * 
 * 
 * def getTrackerInfo(int trackerIndex):             # <<<<<<<<<<<<<<
 *     """Get information about a given tracker.
 * 
 */
  __pyx_tuple__215 = PyTuple_Pack(3, __pyx_n_s_trackerIndex, __pyx_n_s_trackerIndex, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 6674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTrackerInfo, 6674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 6674, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6705
 * 
 * 
 * def getSessionStatus():             # <<<<<<<<<<<<<<
 *     """Get the current session status.
 * 
 */
  __pyx_tuple__217 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 6705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getSessionStatus, 6705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 6705, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6744
 * 
 * 
 * def getPerfStats():             # <<<<<<<<<<<<<<
 *     """Get detailed compositor frame statistics.
 * 
 */
  __pyx_tuple__219 = PyTuple_Pack(2, __pyx_n_s_to_return, __pyx_n_s_result); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 6744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getPerfStats, 6744, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 6744, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6771
 * 
 * 
 * def resetPerfStats():             # <<<<<<<<<<<<<<
 *     """Reset frame performance statistics.
 * 
 */
  __pyx_tuple__221 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 6771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_resetPerfStats, 6771, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 6771, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6790
 * 
 * 
 * def getLastErrorInfo():             # <<<<<<<<<<<<<<
 *     """Get the last error code and information string reported by the API.
 * 
 */
  __pyx_tuple__223 = PyTuple_Pack(3, __pyx_n_s_lastErrorInfo, __pyx_n_s_result, __pyx_n_s_errorString); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 6790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getLastErrorInfo, 6790, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 6790, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6825
 * 
 * 
 * def setBoundaryColor(float red, float green, float blue):             # <<<<<<<<<<<<<<
 *     """Set the boundary color.
 * 
 */
  __pyx_tuple__225 = PyTuple_Pack(5, __pyx_n_s_red, __pyx_n_s_green, __pyx_n_s_blue, __pyx_n_s_color, __pyx_n_s_result); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 6825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setBoundaryColor, 6825, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 6825, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6863
 * 
 * 
 * def resetBoundaryColor():             # <<<<<<<<<<<<<<
 *     """Reset the boundary color to system default.
 * 
 */
  __pyx_tuple__227 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 6863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_resetBoundaryColor, 6863, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 6863, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6879
 * 
 * 
 * def getBoundaryVisible():             # <<<<<<<<<<<<<<
 *     """Check if the Guardian boundary is visible.
 * 
 */
  __pyx_tuple__229 = PyTuple_Pack(2, __pyx_n_s_isVisible, __pyx_n_s_result); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 6879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getBoundaryVisible, 6879, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 6879, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6905
 * 
 * 
 * def showBoundary():             # <<<<<<<<<<<<<<
 *     """Show the boundary.
 * 
 */
  __pyx_tuple__231 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 6905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_showBoundary, 6905, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 6905, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6924
 * 
 * 
 * def hideBoundary():             # <<<<<<<<<<<<<<
 *     """Hide the boundry.
 * 
 */
  __pyx_tuple__233 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 6924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_hideBoundary, 6924, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 6924, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6940
 * 
 * 
 * def getBoundaryDimensions(int boundaryType):             # <<<<<<<<<<<<<<
 *     """Get the dimensions of the boundary.
 * 
 */
  __pyx_tuple__235 = PyTuple_Pack(6, __pyx_n_s_boundaryType, __pyx_n_s_boundaryType, __pyx_n_s_btype, __pyx_n_s_vec_out, __pyx_n_s_result, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 6940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getBoundaryDimensions, 6940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 6940, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":6971
 * 
 * 
 * def testBoundary(int deviceBitmask, int boundaryType):             # <<<<<<<<<<<<<<
 *     """Test collision of tracked devices on boundary.
 * 
 */
  __pyx_tuple__237 = PyTuple_Pack(4, __pyx_n_s_deviceBitmask, __pyx_n_s_boundaryType, __pyx_n_s_testResult, __pyx_n_s_result); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 6971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_testBoundary, 6971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 6971, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7010
 * 
 * 
 * def getConnectedControllerTypes():             # <<<<<<<<<<<<<<
 *     """Get connected controller types.
 * 
 */
  __pyx_tuple__239 = PyTuple_Pack(2, __pyx_n_s_result, __pyx_n_s_toReturn); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 7010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getConnectedControllerTypes, 7010, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 7010, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7073
 * 
 * 
 * def updateInputState(int controller):             # <<<<<<<<<<<<<<
 *     """Refresh the input state of a controller.
 * 
 */
  __pyx_tuple__241 = PyTuple_Pack(6, __pyx_n_s_controller, __pyx_n_s_controller, __pyx_n_s_idx, __pyx_n_s_previousInputState, __pyx_n_s_currentInputState, __pyx_n_s_result); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 7073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_updateInputState, 7073, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 7073, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7155
 * 
 * 
 * def getButton(int controller, int button, str testState='continuous'):             # <<<<<<<<<<<<<<
 *     """Get a button state.
 * 
 */
  __pyx_tuple__243 = PyTuple_Pack(8, __pyx_n_s_controller, __pyx_n_s_button, __pyx_n_s_testState, __pyx_n_s_idx, __pyx_n_s_t_sec, __pyx_n_s_curButtons, __pyx_n_s_prvButtons, __pyx_n_s_stateResult); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 7155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getButton, 7155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 7155, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7294
 * 
 * 
 * def getTouch(int controller, int touch, str testState='continuous'):             # <<<<<<<<<<<<<<
 *     """Get a touch state.
 * 
 */
  __pyx_tuple__245 = PyTuple_Pack(8, __pyx_n_s_controller, __pyx_n_s_touch, __pyx_n_s_testState, __pyx_n_s_idx, __pyx_n_s_t_sec, __pyx_n_s_curTouches, __pyx_n_s_prvTouches, __pyx_n_s_stateResult); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 7294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getTouch, 7294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 7294, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7432
 * 
 * 
 * def getThumbstickValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog thumbstick values.
 * 
 */
  __pyx_tuple__247 = PyTuple_Pack(8, __pyx_n_s_controller, __pyx_n_s_deadzone, __pyx_n_s_idx, __pyx_n_s_currentInputState, __pyx_n_s_thumbstick_x0, __pyx_n_s_thumbstick_y0, __pyx_n_s_thumbstick_x1, __pyx_n_s_thumbstick_y1); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 7432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getThumbstickValues, 7432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 7432, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7521
 * 
 * 
 * def getIndexTriggerValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog index trigger values.
 * 
 */
  __pyx_tuple__249 = PyTuple_Pack(6, __pyx_n_s_controller, __pyx_n_s_deadzone, __pyx_n_s_idx, __pyx_n_s_currentInputState, __pyx_n_s_triggerLeft, __pyx_n_s_triggerRight); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 7521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getIndexTriggerValues, 7521, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 7521, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7616
 * 
 * 
 * def getHandTriggerValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog hand trigger values.
 * 
 */
  __pyx_tuple__251 = PyTuple_Pack(6, __pyx_n_s_controller, __pyx_n_s_deadzone, __pyx_n_s_idx, __pyx_n_s_currentInputState, __pyx_n_s_triggerLeft, __pyx_n_s_triggerRight); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 7616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getHandTriggerValues, 7616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 7616, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7711
 * 
 * 
 * def setControllerVibration(int controller, str frequency, float amplitude):             # <<<<<<<<<<<<<<
 *     """Vibrate a controller.
 * 
 */
  __pyx_tuple__253 = PyTuple_Pack(5, __pyx_n_s_controller, __pyx_n_s_frequency, __pyx_n_s_amplitude, __pyx_n_s_freq, __pyx_n_s_result); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 7711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_setControllerVibration, 7711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 7711, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7773
 * 
 * 
 * def getHapticsInfo(int controller):             # <<<<<<<<<<<<<<
 *     """Get information about the haptics engine for a particular controller.
 * 
 */
  __pyx_tuple__255 = PyTuple_Pack(3, __pyx_n_s_controller, __pyx_n_s_controller, __pyx_n_s_to_return); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 7773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getHapticsInfo, 7773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 7773, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7806
 * 
 * 
 * def submitControllerVibration(int controller, LibOVRHapticsBuffer buffer):             # <<<<<<<<<<<<<<
 *     """Submit a haptics buffer to Touch controllers.
 * 
 */
  __pyx_tuple__257 = PyTuple_Pack(3, __pyx_n_s_controller, __pyx_n_s_buffer, __pyx_n_s_result); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 7806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_submitControllerVibration, 7806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 7806, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7842
 * 
 * 
 * def getControllerPlaybackState(int controller):             # <<<<<<<<<<<<<<
 *     """Get the playback state of a touch controller.
 * 
 */
  __pyx_tuple__259 = PyTuple_Pack(4, __pyx_n_s_controller, __pyx_n_s_controller, __pyx_n_s_playback_state, __pyx_n_s_result); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 7842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);
  __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_getControllerPlaybackState, 7842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(0, 7842, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":7878
 * 
 * 
 * def cullPose(int eye, LibOVRPose pose):             # <<<<<<<<<<<<<<
 *     """Test if a pose's bounding box or position falls outside of an eye's view
 *     frustum.
 */
  __pyx_tuple__261 = PyTuple_Pack(7, __pyx_n_s_eye, __pyx_n_s_pose, __pyx_n_s_bbox, __pyx_n_s_test_point, __pyx_n_s_corners, __pyx_n_s_i, __pyx_n_s_mvp); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 7878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_libovr__libovr_pyx, __pyx_n_s_cullPose, 7878, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(0, 7878, __pyx_L1_error)

  /* "View.MemoryView":286
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
 */
  __pyx_tuple__263 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(1, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);

  /* "View.MemoryView":287
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
 */
  __pyx_tuple__264 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(1, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);

  /* "View.MemoryView":288
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__265 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(1, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);

  /* "View.MemoryView":291
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
 */
  __pyx_tuple__266 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(1, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);

  /* "View.MemoryView":292
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__267 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(1, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__268 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  /* InitThreads.init */
  #ifdef WITH_THREAD
PyEval_InitThreads();
#endif

if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_0_ = PyFloat_FromDouble(0.); if (unlikely(!__pyx_float_0_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_ = PyFloat_FromDouble(1.); if (unlikely(!__pyx_float_1_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_1_ = PyFloat_FromDouble(-1.); if (unlikely(!__pyx_float_neg_1_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

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

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  generic = Py_None; Py_INCREF(Py_None);
  strided = Py_None; Py_INCREF(Py_None);
  indirect = Py_None; Py_INCREF(Py_None);
  contiguous = Py_None; Py_INCREF(Py_None);
  indirect_contiguous = 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
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose = &__pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPose;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPose.fromPtr = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *(*)(ovrPosef *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr *__pyx_optional_args))__pyx_f_7psychxr_6libovr_7_libovr_10LibOVRPose_fromPtr;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPose._new_struct = (void (*)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPose *, PyObject *, PyObject *))__pyx_f_7psychxr_6libovr_7_libovr_10LibOVRPose__new_struct;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 817, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_6__mul__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 817, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_8__imul__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 817, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_10__invert__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose, "__eq__"); if (unlikely(!wrapper)) __PYX_ERR(0, 817, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_12__eq__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose, "__ne__"); if (unlikely(!wrapper)) __PYX_ERR(0, 817, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_10LibOVRPose_14__ne__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose.tp_dict, __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPose) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRPose, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPose = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPose;
  __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState = &__pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPoseState;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPoseState.fromPtr = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *(*)(ovrPoseStatef *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr *__pyx_optional_args))__pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPoseState_fromPtr;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPoseState._new_struct = (void (*)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPoseState *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, double))__pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPoseState__new_struct;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState) < 0) __PYX_ERR(0, 2394, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2394, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_15LibOVRPoseState___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState.tp_dict, __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPoseState) < 0) __PYX_ERR(0, 2394, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRPoseState, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState) < 0) __PYX_ERR(0, 2394, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState) < 0) __PYX_ERR(0, 2394, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPoseState = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPoseState;
  __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRTrackingState = &__pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRTrackingState;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRTrackingState.fromPtr = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *(*)(ovrTrackingState *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr *__pyx_optional_args))__pyx_f_7psychxr_6libovr_7_libovr_19LibOVRTrackingState_fromPtr;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRTrackingState._new_struct = (void (*)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRTrackingState *))__pyx_f_7psychxr_6libovr_7_libovr_19LibOVRTrackingState__new_struct;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState) < 0) __PYX_ERR(0, 2711, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2711, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRTrackingState___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState.tp_dict, __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRTrackingState) < 0) __PYX_ERR(0, 2711, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRTrackingState, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState) < 0) __PYX_ERR(0, 2711, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState) < 0) __PYX_ERR(0, 2711, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRTrackingState = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackingState;
  __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRBounds = &__pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRBounds;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRBounds.fromPtr = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *(*)(OVR::Bounds3f *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr *__pyx_optional_args))__pyx_f_7psychxr_6libovr_7_libovr_12LibOVRBounds_fromPtr;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRBounds._new_struct = (void (*)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRBounds *, PyObject *))__pyx_f_7psychxr_6libovr_7_libovr_12LibOVRBounds__new_struct;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds) < 0) __PYX_ERR(0, 2911, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2911, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_12LibOVRBounds___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds.tp_dict, __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRBounds) < 0) __PYX_ERR(0, 2911, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRBounds, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds) < 0) __PYX_ERR(0, 2911, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds) < 0) __PYX_ERR(0, 2911, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRBounds = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBounds;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo) < 0) __PYX_ERR(0, 3128, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3128, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_17LibOVRTrackerInfo___init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRTrackerInfo, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo) < 0) __PYX_ERR(0, 3128, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo) < 0) __PYX_ERR(0, 3128, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRTrackerInfo;
  __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRHmdInfo = &__pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRHmdInfo;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRHmdInfo.fromPtr = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *(*)(ovrHmdDesc *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr *__pyx_optional_args))__pyx_f_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_fromPtr;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRHmdInfo.newStruct = (void (*)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRHmdInfo *))__pyx_f_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo_newStruct;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo) < 0) __PYX_ERR(0, 3223, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3223, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_13LibOVRHmdInfo___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo.tp_dict, __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRHmdInfo) < 0) __PYX_ERR(0, 3223, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRHmdInfo, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo) < 0) __PYX_ERR(0, 3223, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo) < 0) __PYX_ERR(0, 3223, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHmdInfo = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHmdInfo;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus) < 0) __PYX_ERR(0, 3508, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3508, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus___init__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, "__eq__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3508, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_4__eq__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus, "__ne__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3508, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRSessionStatus_6__ne__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRSessionStatus, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus) < 0) __PYX_ERR(0, 3508, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus) < 0) __PYX_ERR(0, 3508, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRSessionStatus = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRSessionStatus;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult) < 0) __PYX_ERR(0, 3643, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3643, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_24LibOVRBoundaryTestResult___init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRBoundaryTestResult, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult) < 0) __PYX_ERR(0, 3643, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult) < 0) __PYX_ERR(0, 3643, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRBoundaryTestResult;
  __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame = &__pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame.fromPtr = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *(*)(ovrPerfStatsPerCompositorFrame *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr *__pyx_optional_args))__pyx_f_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame_fromPtr;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame._new_struct = (void (*)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame *))__pyx_f_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame__new_struct;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame) < 0) __PYX_ERR(0, 3700, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3700, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_33LibOVRPerfStatsPerCompositorFrame___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame.tp_dict, __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame) < 0) __PYX_ERR(0, 3700, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRPerfStatsPerCompositorFram, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame) < 0) __PYX_ERR(0, 3700, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame) < 0) __PYX_ERR(0, 3700, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStatsPerCompositorFrame;
  __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStats = &__pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPerfStats;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPerfStats.fromPtr = (struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *(*)(ovrPerfStats *, struct __pyx_opt_args_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr *__pyx_optional_args))__pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPerfStats_fromPtr;
  __pyx_vtable_7psychxr_6libovr_7_libovr_LibOVRPerfStats._new_struct = (void (*)(struct __pyx_obj_7psychxr_6libovr_7_libovr_LibOVRPerfStats *))__pyx_f_7psychxr_6libovr_7_libovr_15LibOVRPerfStats__new_struct;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats) < 0) __PYX_ERR(0, 3910, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3910, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_15LibOVRPerfStats___init__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats.tp_dict, __pyx_vtabptr_7psychxr_6libovr_7_libovr_LibOVRPerfStats) < 0) __PYX_ERR(0, 3910, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRPerfStats, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats) < 0) __PYX_ERR(0, 3910, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats) < 0) __PYX_ERR(0, 3910, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRPerfStats = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRPerfStats;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo) < 0) __PYX_ERR(0, 4064, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4064, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_17LibOVRHapticsInfo___init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRHapticsInfo, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo) < 0) __PYX_ERR(0, 4064, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo) < 0) __PYX_ERR(0, 4064, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsInfo;
  if (PyType_Ready(&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer) < 0) __PYX_ERR(0, 4121, __pyx_L1_error)
  __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer.tp_dictoffset && __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4121, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__.doc = __pyx_doc_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7psychxr_6libovr_7_libovr_19LibOVRHapticsBuffer___init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LibOVRHapticsBuffer, (PyObject *)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer) < 0) __PYX_ERR(0, 4121, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer) < 0) __PYX_ERR(0, 4121, __pyx_L1_error)
  __pyx_ptype_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer = &__pyx_type_7psychxr_6libovr_7_libovr_LibOVRHapticsBuffer;
  __pyx_vtabptr_array = &__pyx_vtable_array;
  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
  __pyx_type___pyx_array.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
  __pyx_array_type = &__pyx_type___pyx_array;
  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
  __pyx_type___pyx_MemviewEnum.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
  __pyx_type___pyx_memoryview.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
  __pyx_type___pyx_memoryviewslice.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

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

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


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC init_libovr(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC init_libovr(void)
#else
__Pyx_PyMODINIT_FUNC PyInit__libovr(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__libovr(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__libovr(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  static npy_intp __pyx_t_8[1];
  static npy_intp __pyx_t_9[1];
  static npy_intp __pyx_t_10[1];
  static npy_intp __pyx_t_11[1];
  static PyThread_type_lock __pyx_t_12[8];
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module '_libovr' 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__libovr(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #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("_libovr", __pyx_methods, __pyx_k_This_extension_module_exposes_th, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_psychxr__libovr___libovr) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "psychxr.libovr._libovr")) {
      if (unlikely(PyDict_SetItemString(modules, "psychxr.libovr._libovr", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "psychxr/libovr/_libovr.pyx":45
 * # Module information
 * #
 * __author__ = "Matthew D. Cutone"             # <<<<<<<<<<<<<<
 * __credits__ = ["Laurie M. Wilcox"]
 * __copyright__ = "Copyright 2019 Matthew D. Cutone"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_u_Matthew_D_Cutone) < 0) __PYX_ERR(0, 45, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":46
 * #
 * __author__ = "Matthew D. Cutone"
 * __credits__ = ["Laurie M. Wilcox"]             # <<<<<<<<<<<<<<
 * __copyright__ = "Copyright 2019 Matthew D. Cutone"
 * __license__ = "MIT"
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_u_Laurie_M_Wilcox);
  __Pyx_GIVEREF(__pyx_kp_u_Laurie_M_Wilcox);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Laurie_M_Wilcox);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_credits, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":47
 * __author__ = "Matthew D. Cutone"
 * __credits__ = ["Laurie M. Wilcox"]
 * __copyright__ = "Copyright 2019 Matthew D. Cutone"             # <<<<<<<<<<<<<<
 * __license__ = "MIT"
 * __version__ = "0.2.2"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyright, __pyx_kp_u_Copyright_2019_Matthew_D_Cutone) < 0) __PYX_ERR(0, 47, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":48
 * __credits__ = ["Laurie M. Wilcox"]
 * __copyright__ = "Copyright 2019 Matthew D. Cutone"
 * __license__ = "MIT"             # <<<<<<<<<<<<<<
 * __version__ = "0.2.2"
 * __status__ = "Stable"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_license, __pyx_n_u_MIT) < 0) __PYX_ERR(0, 48, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":49
 * __copyright__ = "Copyright 2019 Matthew D. Cutone"
 * __license__ = "MIT"
 * __version__ = "0.2.2"             # <<<<<<<<<<<<<<
 * __status__ = "Stable"
 * __maintainer__ = "Matthew D. Cutone"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_0_2_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":50
 * __license__ = "MIT"
 * __version__ = "0.2.2"
 * __status__ = "Stable"             # <<<<<<<<<<<<<<
 * __maintainer__ = "Matthew D. Cutone"
 * __email__ = "cutonem@yorku.ca"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_status, __pyx_n_u_Stable) < 0) __PYX_ERR(0, 50, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":51
 * __version__ = "0.2.2"
 * __status__ = "Stable"
 * __maintainer__ = "Matthew D. Cutone"             # <<<<<<<<<<<<<<
 * __email__ = "cutonem@yorku.ca"
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_maintainer, __pyx_kp_u_Matthew_D_Cutone) < 0) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":52
 * __status__ = "Stable"
 * __maintainer__ = "Matthew D. Cutone"
 * __email__ = "cutonem@yorku.ca"             # <<<<<<<<<<<<<<
 * 
 * # ------------------------------------------------------------------------------
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_email, __pyx_kp_u_cutonem_yorku_ca) < 0) __PYX_ERR(0, 52, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":57
 * # Exported objects
 * #
 * __all__ = [             # <<<<<<<<<<<<<<
 *     'SUCCESS',
 *     'SUCCESS_NOT_VISIBLE',
 */
  __pyx_t_1 = PyList_New(330); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_u_SUCCESS);
  __Pyx_GIVEREF(__pyx_n_u_SUCCESS);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_SUCCESS);
  __Pyx_INCREF(__pyx_n_u_SUCCESS_NOT_VISIBLE);
  __Pyx_GIVEREF(__pyx_n_u_SUCCESS_NOT_VISIBLE);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_SUCCESS_NOT_VISIBLE);
  __Pyx_INCREF(__pyx_n_u_SUCCESS_DEVICE_UNAVAILABLE);
  __Pyx_GIVEREF(__pyx_n_u_SUCCESS_DEVICE_UNAVAILABLE);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_SUCCESS_DEVICE_UNAVAILABLE);
  __Pyx_INCREF(__pyx_n_u_SUCCESS_BOUNDARY_INVALID);
  __Pyx_GIVEREF(__pyx_n_u_SUCCESS_BOUNDARY_INVALID);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_SUCCESS_BOUNDARY_INVALID);
  __Pyx_INCREF(__pyx_n_u_ERROR_MEMORY_ALLOCATION_FAILURE);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_MEMORY_ALLOCATION_FAILURE);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_u_ERROR_MEMORY_ALLOCATION_FAILURE);
  __Pyx_INCREF(__pyx_n_u_ERROR_INVALID_SESSION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_INVALID_SESSION);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_u_ERROR_INVALID_SESSION);
  __Pyx_INCREF(__pyx_n_u_ERROR_TIMEOUT);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_TIMEOUT);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_u_ERROR_TIMEOUT);
  __Pyx_INCREF(__pyx_n_u_ERROR_NOT_INITIALIZED);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_NOT_INITIALIZED);
  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_u_ERROR_NOT_INITIALIZED);
  __Pyx_INCREF(__pyx_n_u_ERROR_INVALID_PARAMETER);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_INVALID_PARAMETER);
  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_u_ERROR_INVALID_PARAMETER);
  __Pyx_INCREF(__pyx_n_u_ERROR_SERVICE_ERROR);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_SERVICE_ERROR);
  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_u_ERROR_SERVICE_ERROR);
  __Pyx_INCREF(__pyx_n_u_ERROR_NO_HMD);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_NO_HMD);
  PyList_SET_ITEM(__pyx_t_1, 10, __pyx_n_u_ERROR_NO_HMD);
  __Pyx_INCREF(__pyx_n_u_ERROR_UNSUPPORTED);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_UNSUPPORTED);
  PyList_SET_ITEM(__pyx_t_1, 11, __pyx_n_u_ERROR_UNSUPPORTED);
  __Pyx_INCREF(__pyx_n_u_ERROR_DEVICE_UNAVAILABLE);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DEVICE_UNAVAILABLE);
  PyList_SET_ITEM(__pyx_t_1, 12, __pyx_n_u_ERROR_DEVICE_UNAVAILABLE);
  __Pyx_INCREF(__pyx_n_u_ERROR_INVALID_HEADSET_ORIENTATIO);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_INVALID_HEADSET_ORIENTATIO);
  PyList_SET_ITEM(__pyx_t_1, 13, __pyx_n_u_ERROR_INVALID_HEADSET_ORIENTATIO);
  __Pyx_INCREF(__pyx_n_u_ERROR_CLIENT_SKIPPED_DESTROY);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_CLIENT_SKIPPED_DESTROY);
  PyList_SET_ITEM(__pyx_t_1, 14, __pyx_n_u_ERROR_CLIENT_SKIPPED_DESTROY);
  __Pyx_INCREF(__pyx_n_u_ERROR_CLIENT_SKIPPED_SHUTDOWN);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_CLIENT_SKIPPED_SHUTDOWN);
  PyList_SET_ITEM(__pyx_t_1, 15, __pyx_n_u_ERROR_CLIENT_SKIPPED_SHUTDOWN);
  __Pyx_INCREF(__pyx_n_u_ERROR_SERVICE_DEADLOCK_DETECTED);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_SERVICE_DEADLOCK_DETECTED);
  PyList_SET_ITEM(__pyx_t_1, 16, __pyx_n_u_ERROR_SERVICE_DEADLOCK_DETECTED);
  __Pyx_INCREF(__pyx_n_u_ERROR_INSUFFICENT_ARRAY_SIZE);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_INSUFFICENT_ARRAY_SIZE);
  PyList_SET_ITEM(__pyx_t_1, 17, __pyx_n_u_ERROR_INSUFFICENT_ARRAY_SIZE);
  __Pyx_INCREF(__pyx_n_u_ERROR_NO_EXTERNAL_CAMERA_INFO);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_NO_EXTERNAL_CAMERA_INFO);
  PyList_SET_ITEM(__pyx_t_1, 18, __pyx_n_u_ERROR_NO_EXTERNAL_CAMERA_INFO);
  __Pyx_INCREF(__pyx_n_u_ERROR_LOST_TRACKING);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_LOST_TRACKING);
  PyList_SET_ITEM(__pyx_t_1, 19, __pyx_n_u_ERROR_LOST_TRACKING);
  __Pyx_INCREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_INITIALIZE);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_INITIALIZE);
  PyList_SET_ITEM(__pyx_t_1, 20, __pyx_n_u_ERROR_EXTERNAL_CAMERA_INITIALIZE);
  __Pyx_INCREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_CAPTURE_FA);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_CAPTURE_FA);
  PyList_SET_ITEM(__pyx_t_1, 21, __pyx_n_u_ERROR_EXTERNAL_CAMERA_CAPTURE_FA);
  __Pyx_INCREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS);
  PyList_SET_ITEM(__pyx_t_1, 22, __pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS);
  __Pyx_INCREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2);
  PyList_SET_ITEM(__pyx_t_1, 23, __pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2);
  __Pyx_INCREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_NOT_CALIBR);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_NOT_CALIBR);
  PyList_SET_ITEM(__pyx_t_1, 24, __pyx_n_u_ERROR_EXTERNAL_CAMERA_NOT_CALIBR);
  __Pyx_INCREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_WRONG);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_WRONG);
  PyList_SET_ITEM(__pyx_t_1, 25, __pyx_n_u_ERROR_EXTERNAL_CAMERA_NAME_WRONG);
  __Pyx_INCREF(__pyx_n_u_ERROR_AUDIO_DEVICE_NOT_FOUND);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_AUDIO_DEVICE_NOT_FOUND);
  PyList_SET_ITEM(__pyx_t_1, 26, __pyx_n_u_ERROR_AUDIO_DEVICE_NOT_FOUND);
  __Pyx_INCREF(__pyx_n_u_ERROR_AUDIO_COM_ERROR);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_AUDIO_COM_ERROR);
  PyList_SET_ITEM(__pyx_t_1, 27, __pyx_n_u_ERROR_AUDIO_COM_ERROR);
  __Pyx_INCREF(__pyx_n_u_ERROR_INITIALIZE);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_INITIALIZE);
  PyList_SET_ITEM(__pyx_t_1, 28, __pyx_n_u_ERROR_INITIALIZE);
  __Pyx_INCREF(__pyx_n_u_ERROR_LIB_LOAD);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_LIB_LOAD);
  PyList_SET_ITEM(__pyx_t_1, 29, __pyx_n_u_ERROR_LIB_LOAD);
  __Pyx_INCREF(__pyx_n_u_ERROR_SERVICE_CONNECTION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_SERVICE_CONNECTION);
  PyList_SET_ITEM(__pyx_t_1, 30, __pyx_n_u_ERROR_SERVICE_CONNECTION);
  __Pyx_INCREF(__pyx_n_u_ERROR_SERVICE_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_SERVICE_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 31, __pyx_n_u_ERROR_SERVICE_VERSION);
  __Pyx_INCREF(__pyx_n_u_ERROR_INCOMPATIBLE_OS);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_INCOMPATIBLE_OS);
  PyList_SET_ITEM(__pyx_t_1, 32, __pyx_n_u_ERROR_INCOMPATIBLE_OS);
  __Pyx_INCREF(__pyx_n_u_ERROR_DISPLAY_INIT);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DISPLAY_INIT);
  PyList_SET_ITEM(__pyx_t_1, 33, __pyx_n_u_ERROR_DISPLAY_INIT);
  __Pyx_INCREF(__pyx_n_u_ERROR_SERVER_START);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_SERVER_START);
  PyList_SET_ITEM(__pyx_t_1, 34, __pyx_n_u_ERROR_SERVER_START);
  __Pyx_INCREF(__pyx_n_u_ERROR_REINITIALIZATION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_REINITIALIZATION);
  PyList_SET_ITEM(__pyx_t_1, 35, __pyx_n_u_ERROR_REINITIALIZATION);
  __Pyx_INCREF(__pyx_n_u_ERROR_MISMATCHED_ADAPTERS);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_MISMATCHED_ADAPTERS);
  PyList_SET_ITEM(__pyx_t_1, 36, __pyx_n_u_ERROR_MISMATCHED_ADAPTERS);
  __Pyx_INCREF(__pyx_n_u_ERROR_LEAKING_RESOURCES);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_LEAKING_RESOURCES);
  PyList_SET_ITEM(__pyx_t_1, 37, __pyx_n_u_ERROR_LEAKING_RESOURCES);
  __Pyx_INCREF(__pyx_n_u_ERROR_CLIENT_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_CLIENT_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 38, __pyx_n_u_ERROR_CLIENT_VERSION);
  __Pyx_INCREF(__pyx_n_u_ERROR_OUT_OF_DATE_OS);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_OUT_OF_DATE_OS);
  PyList_SET_ITEM(__pyx_t_1, 39, __pyx_n_u_ERROR_OUT_OF_DATE_OS);
  __Pyx_INCREF(__pyx_n_u_ERROR_OUT_OF_DATE_GFX_DRIVER);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_OUT_OF_DATE_GFX_DRIVER);
  PyList_SET_ITEM(__pyx_t_1, 40, __pyx_n_u_ERROR_OUT_OF_DATE_GFX_DRIVER);
  __Pyx_INCREF(__pyx_n_u_ERROR_INCOMPATIBLE_OS);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_INCOMPATIBLE_OS);
  PyList_SET_ITEM(__pyx_t_1, 41, __pyx_n_u_ERROR_INCOMPATIBLE_OS);
  __Pyx_INCREF(__pyx_n_u_ERROR_NO_VALID_VR_DISPLAY_SYSTEM);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_NO_VALID_VR_DISPLAY_SYSTEM);
  PyList_SET_ITEM(__pyx_t_1, 42, __pyx_n_u_ERROR_NO_VALID_VR_DISPLAY_SYSTEM);
  __Pyx_INCREF(__pyx_n_u_ERROR_OBSOLETE);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_OBSOLETE);
  PyList_SET_ITEM(__pyx_t_1, 43, __pyx_n_u_ERROR_OBSOLETE);
  __Pyx_INCREF(__pyx_n_u_ERROR_DISABLED_OR_DEFAULT_ADAPTE);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DISABLED_OR_DEFAULT_ADAPTE);
  PyList_SET_ITEM(__pyx_t_1, 44, __pyx_n_u_ERROR_DISABLED_OR_DEFAULT_ADAPTE);
  __Pyx_INCREF(__pyx_n_u_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR);
  PyList_SET_ITEM(__pyx_t_1, 45, __pyx_n_u_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR);
  __Pyx_INCREF(__pyx_n_u_ERROR_DISPLAY_MANAGER_INIT);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DISPLAY_MANAGER_INIT);
  PyList_SET_ITEM(__pyx_t_1, 46, __pyx_n_u_ERROR_DISPLAY_MANAGER_INIT);
  __Pyx_INCREF(__pyx_n_u_ERROR_TRACKER_DRIVER_INIT);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_TRACKER_DRIVER_INIT);
  PyList_SET_ITEM(__pyx_t_1, 47, __pyx_n_u_ERROR_TRACKER_DRIVER_INIT);
  __Pyx_INCREF(__pyx_n_u_ERROR_LIB_SIGN_CHECK);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_LIB_SIGN_CHECK);
  PyList_SET_ITEM(__pyx_t_1, 48, __pyx_n_u_ERROR_LIB_SIGN_CHECK);
  __Pyx_INCREF(__pyx_n_u_ERROR_LIB_PATH);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_LIB_PATH);
  PyList_SET_ITEM(__pyx_t_1, 49, __pyx_n_u_ERROR_LIB_PATH);
  __Pyx_INCREF(__pyx_n_u_ERROR_LIB_SYMBOLS);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_LIB_SYMBOLS);
  PyList_SET_ITEM(__pyx_t_1, 50, __pyx_n_u_ERROR_LIB_SYMBOLS);
  __Pyx_INCREF(__pyx_n_u_ERROR_REMOTE_SESSION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_REMOTE_SESSION);
  PyList_SET_ITEM(__pyx_t_1, 51, __pyx_n_u_ERROR_REMOTE_SESSION);
  __Pyx_INCREF(__pyx_n_u_ERROR_INITIALIZE_VULKAN);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_INITIALIZE_VULKAN);
  PyList_SET_ITEM(__pyx_t_1, 52, __pyx_n_u_ERROR_INITIALIZE_VULKAN);
  __Pyx_INCREF(__pyx_n_u_ERROR_BLACKLISTED_GFX_DRIVER);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_BLACKLISTED_GFX_DRIVER);
  PyList_SET_ITEM(__pyx_t_1, 53, __pyx_n_u_ERROR_BLACKLISTED_GFX_DRIVER);
  __Pyx_INCREF(__pyx_n_u_ERROR_DISPLAY_LOST);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DISPLAY_LOST);
  PyList_SET_ITEM(__pyx_t_1, 54, __pyx_n_u_ERROR_DISPLAY_LOST);
  __Pyx_INCREF(__pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_FULL);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_FULL);
  PyList_SET_ITEM(__pyx_t_1, 55, __pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_FULL);
  __Pyx_INCREF(__pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_INVALID);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_INVALID);
  PyList_SET_ITEM(__pyx_t_1, 56, __pyx_n_u_ERROR_TEXTURE_SWAP_CHAIN_INVALID);
  __Pyx_INCREF(__pyx_n_u_ERROR_GRAPHICS_DEVICE_RESET);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_GRAPHICS_DEVICE_RESET);
  PyList_SET_ITEM(__pyx_t_1, 57, __pyx_n_u_ERROR_GRAPHICS_DEVICE_RESET);
  __Pyx_INCREF(__pyx_n_u_ERROR_DISPLAY_REMOVED);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DISPLAY_REMOVED);
  PyList_SET_ITEM(__pyx_t_1, 58, __pyx_n_u_ERROR_DISPLAY_REMOVED);
  __Pyx_INCREF(__pyx_n_u_ERROR_CONTENT_PROTECTION_NOT_AVA);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_CONTENT_PROTECTION_NOT_AVA);
  PyList_SET_ITEM(__pyx_t_1, 59, __pyx_n_u_ERROR_CONTENT_PROTECTION_NOT_AVA);
  __Pyx_INCREF(__pyx_n_u_ERROR_APPLICATION_VISIBLE);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_APPLICATION_VISIBLE);
  PyList_SET_ITEM(__pyx_t_1, 60, __pyx_n_u_ERROR_APPLICATION_VISIBLE);
  __Pyx_INCREF(__pyx_n_u_ERROR_DISALLOWED);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DISALLOWED);
  PyList_SET_ITEM(__pyx_t_1, 61, __pyx_n_u_ERROR_DISALLOWED);
  __Pyx_INCREF(__pyx_n_u_ERROR_DISPLAY_PLUGGED_INCORRECTY);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DISPLAY_PLUGGED_INCORRECTY);
  PyList_SET_ITEM(__pyx_t_1, 62, __pyx_n_u_ERROR_DISPLAY_PLUGGED_INCORRECTY);
  __Pyx_INCREF(__pyx_n_u_ERROR_DISPLAY_LIMIT_REACHED);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_DISPLAY_LIMIT_REACHED);
  PyList_SET_ITEM(__pyx_t_1, 63, __pyx_n_u_ERROR_DISPLAY_LIMIT_REACHED);
  __Pyx_INCREF(__pyx_n_u_ERROR_RUNTIME_EXCEPTION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_RUNTIME_EXCEPTION);
  PyList_SET_ITEM(__pyx_t_1, 64, __pyx_n_u_ERROR_RUNTIME_EXCEPTION);
  __Pyx_INCREF(__pyx_n_u_ERROR_NO_CALIBRATION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_NO_CALIBRATION);
  PyList_SET_ITEM(__pyx_t_1, 65, __pyx_n_u_ERROR_NO_CALIBRATION);
  __Pyx_INCREF(__pyx_n_u_ERROR_OLD_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_OLD_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 66, __pyx_n_u_ERROR_OLD_VERSION);
  __Pyx_INCREF(__pyx_n_u_ERROR_MISFORMATTED_BLOCK);
  __Pyx_GIVEREF(__pyx_n_u_ERROR_MISFORMATTED_BLOCK);
  PyList_SET_ITEM(__pyx_t_1, 67, __pyx_n_u_ERROR_MISFORMATTED_BLOCK);
  __Pyx_INCREF(__pyx_n_u_EYE_LEFT);
  __Pyx_GIVEREF(__pyx_n_u_EYE_LEFT);
  PyList_SET_ITEM(__pyx_t_1, 68, __pyx_n_u_EYE_LEFT);
  __Pyx_INCREF(__pyx_n_u_EYE_RIGHT);
  __Pyx_GIVEREF(__pyx_n_u_EYE_RIGHT);
  PyList_SET_ITEM(__pyx_t_1, 69, __pyx_n_u_EYE_RIGHT);
  __Pyx_INCREF(__pyx_n_u_EYE_COUNT);
  __Pyx_GIVEREF(__pyx_n_u_EYE_COUNT);
  PyList_SET_ITEM(__pyx_t_1, 70, __pyx_n_u_EYE_COUNT);
  __Pyx_INCREF(__pyx_n_u_HAND_LEFT);
  __Pyx_GIVEREF(__pyx_n_u_HAND_LEFT);
  PyList_SET_ITEM(__pyx_t_1, 71, __pyx_n_u_HAND_LEFT);
  __Pyx_INCREF(__pyx_n_u_HAND_RIGHT);
  __Pyx_GIVEREF(__pyx_n_u_HAND_RIGHT);
  PyList_SET_ITEM(__pyx_t_1, 72, __pyx_n_u_HAND_RIGHT);
  __Pyx_INCREF(__pyx_n_u_HAND_COUNT);
  __Pyx_GIVEREF(__pyx_n_u_HAND_COUNT);
  PyList_SET_ITEM(__pyx_t_1, 73, __pyx_n_u_HAND_COUNT);
  __Pyx_INCREF(__pyx_n_u_KEY_USER);
  __Pyx_GIVEREF(__pyx_n_u_KEY_USER);
  PyList_SET_ITEM(__pyx_t_1, 74, __pyx_n_u_KEY_USER);
  __Pyx_INCREF(__pyx_n_u_KEY_NAME);
  __Pyx_GIVEREF(__pyx_n_u_KEY_NAME);
  PyList_SET_ITEM(__pyx_t_1, 75, __pyx_n_u_KEY_NAME);
  __Pyx_INCREF(__pyx_n_u_KEY_GENDER);
  __Pyx_GIVEREF(__pyx_n_u_KEY_GENDER);
  PyList_SET_ITEM(__pyx_t_1, 76, __pyx_n_u_KEY_GENDER);
  __Pyx_INCREF(__pyx_n_u_DEFAULT_GENDER);
  __Pyx_GIVEREF(__pyx_n_u_DEFAULT_GENDER);
  PyList_SET_ITEM(__pyx_t_1, 77, __pyx_n_u_DEFAULT_GENDER);
  __Pyx_INCREF(__pyx_n_u_KEY_PLAYER_HEIGHT);
  __Pyx_GIVEREF(__pyx_n_u_KEY_PLAYER_HEIGHT);
  PyList_SET_ITEM(__pyx_t_1, 78, __pyx_n_u_KEY_PLAYER_HEIGHT);
  __Pyx_INCREF(__pyx_n_u_DEFAULT_PLAYER_HEIGHT);
  __Pyx_GIVEREF(__pyx_n_u_DEFAULT_PLAYER_HEIGHT);
  PyList_SET_ITEM(__pyx_t_1, 79, __pyx_n_u_DEFAULT_PLAYER_HEIGHT);
  __Pyx_INCREF(__pyx_n_u_KEY_EYE_HEIGHT);
  __Pyx_GIVEREF(__pyx_n_u_KEY_EYE_HEIGHT);
  PyList_SET_ITEM(__pyx_t_1, 80, __pyx_n_u_KEY_EYE_HEIGHT);
  __Pyx_INCREF(__pyx_n_u_DEFAULT_EYE_HEIGHT);
  __Pyx_GIVEREF(__pyx_n_u_DEFAULT_EYE_HEIGHT);
  PyList_SET_ITEM(__pyx_t_1, 81, __pyx_n_u_DEFAULT_EYE_HEIGHT);
  __Pyx_INCREF(__pyx_n_u_KEY_NECK_TO_EYE_DISTANCE);
  __Pyx_GIVEREF(__pyx_n_u_KEY_NECK_TO_EYE_DISTANCE);
  PyList_SET_ITEM(__pyx_t_1, 82, __pyx_n_u_KEY_NECK_TO_EYE_DISTANCE);
  __Pyx_INCREF(__pyx_n_u_DEFAULT_NECK_TO_EYE_HORIZONTAL);
  __Pyx_GIVEREF(__pyx_n_u_DEFAULT_NECK_TO_EYE_HORIZONTAL);
  PyList_SET_ITEM(__pyx_t_1, 83, __pyx_n_u_DEFAULT_NECK_TO_EYE_HORIZONTAL);
  __Pyx_INCREF(__pyx_n_u_DEFAULT_NECK_TO_EYE_VERTICAL);
  __Pyx_GIVEREF(__pyx_n_u_DEFAULT_NECK_TO_EYE_VERTICAL);
  PyList_SET_ITEM(__pyx_t_1, 84, __pyx_n_u_DEFAULT_NECK_TO_EYE_VERTICAL);
  __Pyx_INCREF(__pyx_n_u_KEY_EYE_TO_NOSE_DISTANCE);
  __Pyx_GIVEREF(__pyx_n_u_KEY_EYE_TO_NOSE_DISTANCE);
  PyList_SET_ITEM(__pyx_t_1, 85, __pyx_n_u_KEY_EYE_TO_NOSE_DISTANCE);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE);
  PyList_SET_ITEM(__pyx_t_1, 86, __pyx_n_u_DEBUG_HUD_STEREO_MODE);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB);
  PyList_SET_ITEM(__pyx_t_1, 87, __pyx_n_u_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_SIZE);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_SIZE);
  PyList_SET_ITEM(__pyx_t_1, 88, __pyx_n_u_DEBUG_HUD_STEREO_GUIDE_SIZE);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_POSITION);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_POSITION);
  PyList_SET_ITEM(__pyx_t_1, 89, __pyx_n_u_DEBUG_HUD_STEREO_GUIDE_POSITION);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR);
  PyList_SET_ITEM(__pyx_t_1, 90, __pyx_n_u_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_COLOR);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_GUIDE_COLOR);
  PyList_SET_ITEM(__pyx_t_1, 91, __pyx_n_u_DEBUG_HUD_STEREO_GUIDE_COLOR);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_XBOX);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_XBOX);
  PyList_SET_ITEM(__pyx_t_1, 92, __pyx_n_u_CONTROLLER_TYPE_XBOX);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_REMOTE);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_REMOTE);
  PyList_SET_ITEM(__pyx_t_1, 93, __pyx_n_u_CONTROLLER_TYPE_REMOTE);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_TOUCH);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_TOUCH);
  PyList_SET_ITEM(__pyx_t_1, 94, __pyx_n_u_CONTROLLER_TYPE_TOUCH);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_LTOUCH);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_LTOUCH);
  PyList_SET_ITEM(__pyx_t_1, 95, __pyx_n_u_CONTROLLER_TYPE_LTOUCH);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_RTOUCH);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_RTOUCH);
  PyList_SET_ITEM(__pyx_t_1, 96, __pyx_n_u_CONTROLLER_TYPE_RTOUCH);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_OBJECT0);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_OBJECT0);
  PyList_SET_ITEM(__pyx_t_1, 97, __pyx_n_u_CONTROLLER_TYPE_OBJECT0);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_OBJECT1);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_OBJECT1);
  PyList_SET_ITEM(__pyx_t_1, 98, __pyx_n_u_CONTROLLER_TYPE_OBJECT1);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_OBJECT2);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_OBJECT2);
  PyList_SET_ITEM(__pyx_t_1, 99, __pyx_n_u_CONTROLLER_TYPE_OBJECT2);
  __Pyx_INCREF(__pyx_n_u_CONTROLLER_TYPE_OBJECT3);
  __Pyx_GIVEREF(__pyx_n_u_CONTROLLER_TYPE_OBJECT3);
  PyList_SET_ITEM(__pyx_t_1, 100, __pyx_n_u_CONTROLLER_TYPE_OBJECT3);
  __Pyx_INCREF(__pyx_n_u_BUTTON_A);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_A);
  PyList_SET_ITEM(__pyx_t_1, 101, __pyx_n_u_BUTTON_A);
  __Pyx_INCREF(__pyx_n_u_BUTTON_B);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_B);
  PyList_SET_ITEM(__pyx_t_1, 102, __pyx_n_u_BUTTON_B);
  __Pyx_INCREF(__pyx_n_u_BUTTON_RTHUMB);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_RTHUMB);
  PyList_SET_ITEM(__pyx_t_1, 103, __pyx_n_u_BUTTON_RTHUMB);
  __Pyx_INCREF(__pyx_n_u_BUTTON_RSHOULDER);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_RSHOULDER);
  PyList_SET_ITEM(__pyx_t_1, 104, __pyx_n_u_BUTTON_RSHOULDER);
  __Pyx_INCREF(__pyx_n_u_BUTTON_X);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_X);
  PyList_SET_ITEM(__pyx_t_1, 105, __pyx_n_u_BUTTON_X);
  __Pyx_INCREF(__pyx_n_u_BUTTON_Y);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_Y);
  PyList_SET_ITEM(__pyx_t_1, 106, __pyx_n_u_BUTTON_Y);
  __Pyx_INCREF(__pyx_n_u_BUTTON_LTHUMB);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_LTHUMB);
  PyList_SET_ITEM(__pyx_t_1, 107, __pyx_n_u_BUTTON_LTHUMB);
  __Pyx_INCREF(__pyx_n_u_BUTTON_LSHOULDER);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_LSHOULDER);
  PyList_SET_ITEM(__pyx_t_1, 108, __pyx_n_u_BUTTON_LSHOULDER);
  __Pyx_INCREF(__pyx_n_u_BUTTON_UP);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_UP);
  PyList_SET_ITEM(__pyx_t_1, 109, __pyx_n_u_BUTTON_UP);
  __Pyx_INCREF(__pyx_n_u_BUTTON_DOWN);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_DOWN);
  PyList_SET_ITEM(__pyx_t_1, 110, __pyx_n_u_BUTTON_DOWN);
  __Pyx_INCREF(__pyx_n_u_BUTTON_LEFT);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_LEFT);
  PyList_SET_ITEM(__pyx_t_1, 111, __pyx_n_u_BUTTON_LEFT);
  __Pyx_INCREF(__pyx_n_u_BUTTON_RIGHT);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_RIGHT);
  PyList_SET_ITEM(__pyx_t_1, 112, __pyx_n_u_BUTTON_RIGHT);
  __Pyx_INCREF(__pyx_n_u_BUTTON_ENTER);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_ENTER);
  PyList_SET_ITEM(__pyx_t_1, 113, __pyx_n_u_BUTTON_ENTER);
  __Pyx_INCREF(__pyx_n_u_BUTTON_BACK);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_BACK);
  PyList_SET_ITEM(__pyx_t_1, 114, __pyx_n_u_BUTTON_BACK);
  __Pyx_INCREF(__pyx_n_u_BUTTON_VOLUP);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_VOLUP);
  PyList_SET_ITEM(__pyx_t_1, 115, __pyx_n_u_BUTTON_VOLUP);
  __Pyx_INCREF(__pyx_n_u_BUTTON_VOLDOWN);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_VOLDOWN);
  PyList_SET_ITEM(__pyx_t_1, 116, __pyx_n_u_BUTTON_VOLDOWN);
  __Pyx_INCREF(__pyx_n_u_BUTTON_HOME);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_HOME);
  PyList_SET_ITEM(__pyx_t_1, 117, __pyx_n_u_BUTTON_HOME);
  __Pyx_INCREF(__pyx_n_u_BUTTON_PRIVATE);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_PRIVATE);
  PyList_SET_ITEM(__pyx_t_1, 118, __pyx_n_u_BUTTON_PRIVATE);
  __Pyx_INCREF(__pyx_n_u_BUTTON_RMASK);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_RMASK);
  PyList_SET_ITEM(__pyx_t_1, 119, __pyx_n_u_BUTTON_RMASK);
  __Pyx_INCREF(__pyx_n_u_BUTTON_LMASK);
  __Pyx_GIVEREF(__pyx_n_u_BUTTON_LMASK);
  PyList_SET_ITEM(__pyx_t_1, 120, __pyx_n_u_BUTTON_LMASK);
  __Pyx_INCREF(__pyx_n_u_TOUCH_A);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_A);
  PyList_SET_ITEM(__pyx_t_1, 121, __pyx_n_u_TOUCH_A);
  __Pyx_INCREF(__pyx_n_u_TOUCH_B);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_B);
  PyList_SET_ITEM(__pyx_t_1, 122, __pyx_n_u_TOUCH_B);
  __Pyx_INCREF(__pyx_n_u_TOUCH_RTHUMB);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_RTHUMB);
  PyList_SET_ITEM(__pyx_t_1, 123, __pyx_n_u_TOUCH_RTHUMB);
  __Pyx_INCREF(__pyx_n_u_TOUCH_RTHUMBREST);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_RTHUMBREST);
  PyList_SET_ITEM(__pyx_t_1, 124, __pyx_n_u_TOUCH_RTHUMBREST);
  __Pyx_INCREF(__pyx_n_u_TOUCH_X);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_X);
  PyList_SET_ITEM(__pyx_t_1, 125, __pyx_n_u_TOUCH_X);
  __Pyx_INCREF(__pyx_n_u_TOUCH_Y);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_Y);
  PyList_SET_ITEM(__pyx_t_1, 126, __pyx_n_u_TOUCH_Y);
  __Pyx_INCREF(__pyx_n_u_TOUCH_LTHUMB);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_LTHUMB);
  PyList_SET_ITEM(__pyx_t_1, 127, __pyx_n_u_TOUCH_LTHUMB);
  __Pyx_INCREF(__pyx_n_u_TOUCH_LTHUMBREST);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_LTHUMBREST);
  PyList_SET_ITEM(__pyx_t_1, 128, __pyx_n_u_TOUCH_LTHUMBREST);
  __Pyx_INCREF(__pyx_n_u_TOUCH_LINDEXTRIGGER);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_LINDEXTRIGGER);
  PyList_SET_ITEM(__pyx_t_1, 129, __pyx_n_u_TOUCH_LINDEXTRIGGER);
  __Pyx_INCREF(__pyx_n_u_TOUCH_RINDEXPOINTING);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_RINDEXPOINTING);
  PyList_SET_ITEM(__pyx_t_1, 130, __pyx_n_u_TOUCH_RINDEXPOINTING);
  __Pyx_INCREF(__pyx_n_u_TOUCH_RTHUMBUP);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_RTHUMBUP);
  PyList_SET_ITEM(__pyx_t_1, 131, __pyx_n_u_TOUCH_RTHUMBUP);
  __Pyx_INCREF(__pyx_n_u_TOUCH_LINDEXPOINTING);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_LINDEXPOINTING);
  PyList_SET_ITEM(__pyx_t_1, 132, __pyx_n_u_TOUCH_LINDEXPOINTING);
  __Pyx_INCREF(__pyx_n_u_TOUCH_LTHUMBUP);
  __Pyx_GIVEREF(__pyx_n_u_TOUCH_LTHUMBUP);
  PyList_SET_ITEM(__pyx_t_1, 133, __pyx_n_u_TOUCH_LTHUMBUP);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN0);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN0);
  PyList_SET_ITEM(__pyx_t_1, 134, __pyx_n_u_TEXTURE_SWAP_CHAIN0);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN1);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN1);
  PyList_SET_ITEM(__pyx_t_1, 135, __pyx_n_u_TEXTURE_SWAP_CHAIN1);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN2);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN2);
  PyList_SET_ITEM(__pyx_t_1, 136, __pyx_n_u_TEXTURE_SWAP_CHAIN2);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN3);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN3);
  PyList_SET_ITEM(__pyx_t_1, 137, __pyx_n_u_TEXTURE_SWAP_CHAIN3);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN4);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN4);
  PyList_SET_ITEM(__pyx_t_1, 138, __pyx_n_u_TEXTURE_SWAP_CHAIN4);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN5);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN5);
  PyList_SET_ITEM(__pyx_t_1, 139, __pyx_n_u_TEXTURE_SWAP_CHAIN5);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN6);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN6);
  PyList_SET_ITEM(__pyx_t_1, 140, __pyx_n_u_TEXTURE_SWAP_CHAIN6);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN7);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN7);
  PyList_SET_ITEM(__pyx_t_1, 141, __pyx_n_u_TEXTURE_SWAP_CHAIN7);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN8);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN8);
  PyList_SET_ITEM(__pyx_t_1, 142, __pyx_n_u_TEXTURE_SWAP_CHAIN8);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN9);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN9);
  PyList_SET_ITEM(__pyx_t_1, 143, __pyx_n_u_TEXTURE_SWAP_CHAIN9);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN10);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN10);
  PyList_SET_ITEM(__pyx_t_1, 144, __pyx_n_u_TEXTURE_SWAP_CHAIN10);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN11);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN11);
  PyList_SET_ITEM(__pyx_t_1, 145, __pyx_n_u_TEXTURE_SWAP_CHAIN11);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN12);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN12);
  PyList_SET_ITEM(__pyx_t_1, 146, __pyx_n_u_TEXTURE_SWAP_CHAIN12);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN13);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN13);
  PyList_SET_ITEM(__pyx_t_1, 147, __pyx_n_u_TEXTURE_SWAP_CHAIN13);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN14);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN14);
  PyList_SET_ITEM(__pyx_t_1, 148, __pyx_n_u_TEXTURE_SWAP_CHAIN14);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN15);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN15);
  PyList_SET_ITEM(__pyx_t_1, 149, __pyx_n_u_TEXTURE_SWAP_CHAIN15);
  __Pyx_INCREF(__pyx_n_u_TEXTURE_SWAP_CHAIN_COUNT);
  __Pyx_GIVEREF(__pyx_n_u_TEXTURE_SWAP_CHAIN_COUNT);
  PyList_SET_ITEM(__pyx_t_1, 150, __pyx_n_u_TEXTURE_SWAP_CHAIN_COUNT);
  __Pyx_INCREF(__pyx_n_u_FORMAT_R8G8B8A8_UNORM);
  __Pyx_GIVEREF(__pyx_n_u_FORMAT_R8G8B8A8_UNORM);
  PyList_SET_ITEM(__pyx_t_1, 151, __pyx_n_u_FORMAT_R8G8B8A8_UNORM);
  __Pyx_INCREF(__pyx_n_u_FORMAT_R8G8B8A8_UNORM_SRGB);
  __Pyx_GIVEREF(__pyx_n_u_FORMAT_R8G8B8A8_UNORM_SRGB);
  PyList_SET_ITEM(__pyx_t_1, 152, __pyx_n_u_FORMAT_R8G8B8A8_UNORM_SRGB);
  __Pyx_INCREF(__pyx_n_u_FORMAT_R16G16B16A16_FLOAT);
  __Pyx_GIVEREF(__pyx_n_u_FORMAT_R16G16B16A16_FLOAT);
  PyList_SET_ITEM(__pyx_t_1, 153, __pyx_n_u_FORMAT_R16G16B16A16_FLOAT);
  __Pyx_INCREF(__pyx_n_u_FORMAT_R11G11B10_FLOAT);
  __Pyx_GIVEREF(__pyx_n_u_FORMAT_R11G11B10_FLOAT);
  PyList_SET_ITEM(__pyx_t_1, 154, __pyx_n_u_FORMAT_R11G11B10_FLOAT);
  __Pyx_INCREF(__pyx_n_u_FORMAT_D16_UNORM);
  __Pyx_GIVEREF(__pyx_n_u_FORMAT_D16_UNORM);
  PyList_SET_ITEM(__pyx_t_1, 155, __pyx_n_u_FORMAT_D16_UNORM);
  __Pyx_INCREF(__pyx_n_u_FORMAT_D24_UNORM_S8_UINT);
  __Pyx_GIVEREF(__pyx_n_u_FORMAT_D24_UNORM_S8_UINT);
  PyList_SET_ITEM(__pyx_t_1, 156, __pyx_n_u_FORMAT_D24_UNORM_S8_UINT);
  __Pyx_INCREF(__pyx_n_u_FORMAT_D32_FLOAT);
  __Pyx_GIVEREF(__pyx_n_u_FORMAT_D32_FLOAT);
  PyList_SET_ITEM(__pyx_t_1, 157, __pyx_n_u_FORMAT_D32_FLOAT);
  __Pyx_INCREF(__pyx_n_u_MAX_PROVIDED_FRAME_STATS);
  __Pyx_GIVEREF(__pyx_n_u_MAX_PROVIDED_FRAME_STATS);
  PyList_SET_ITEM(__pyx_t_1, 158, __pyx_n_u_MAX_PROVIDED_FRAME_STATS);
  __Pyx_INCREF(__pyx_n_u_TRACKED_DEVICE_TYPE_HMD);
  __Pyx_GIVEREF(__pyx_n_u_TRACKED_DEVICE_TYPE_HMD);
  PyList_SET_ITEM(__pyx_t_1, 159, __pyx_n_u_TRACKED_DEVICE_TYPE_HMD);
  __Pyx_INCREF(__pyx_n_u_TRACKED_DEVICE_TYPE_LTOUCH);
  __Pyx_GIVEREF(__pyx_n_u_TRACKED_DEVICE_TYPE_LTOUCH);
  PyList_SET_ITEM(__pyx_t_1, 160, __pyx_n_u_TRACKED_DEVICE_TYPE_LTOUCH);
  __Pyx_INCREF(__pyx_n_u_TRACKED_DEVICE_TYPE_RTOUCH);
  __Pyx_GIVEREF(__pyx_n_u_TRACKED_DEVICE_TYPE_RTOUCH);
  PyList_SET_ITEM(__pyx_t_1, 161, __pyx_n_u_TRACKED_DEVICE_TYPE_RTOUCH);
  __Pyx_INCREF(__pyx_n_u_TRACKED_DEVICE_TYPE_TOUCH);
  __Pyx_GIVEREF(__pyx_n_u_TRACKED_DEVICE_TYPE_TOUCH);
  PyList_SET_ITEM(__pyx_t_1, 162, __pyx_n_u_TRACKED_DEVICE_TYPE_TOUCH);
  __Pyx_INCREF(__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT0);
  __Pyx_GIVEREF(__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT0);
  PyList_SET_ITEM(__pyx_t_1, 163, __pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT0);
  __Pyx_INCREF(__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT1);
  __Pyx_GIVEREF(__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT1);
  PyList_SET_ITEM(__pyx_t_1, 164, __pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT1);
  __Pyx_INCREF(__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT2);
  __Pyx_GIVEREF(__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT2);
  PyList_SET_ITEM(__pyx_t_1, 165, __pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT2);
  __Pyx_INCREF(__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT3);
  __Pyx_GIVEREF(__pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT3);
  PyList_SET_ITEM(__pyx_t_1, 166, __pyx_n_u_TRACKED_DEVICE_TYPE_OBJECT3);
  __Pyx_INCREF(__pyx_n_u_TRACKING_ORIGIN_EYE_LEVEL);
  __Pyx_GIVEREF(__pyx_n_u_TRACKING_ORIGIN_EYE_LEVEL);
  PyList_SET_ITEM(__pyx_t_1, 167, __pyx_n_u_TRACKING_ORIGIN_EYE_LEVEL);
  __Pyx_INCREF(__pyx_n_u_TRACKING_ORIGIN_FLOOR_LEVEL);
  __Pyx_GIVEREF(__pyx_n_u_TRACKING_ORIGIN_FLOOR_LEVEL);
  PyList_SET_ITEM(__pyx_t_1, 168, __pyx_n_u_TRACKING_ORIGIN_FLOOR_LEVEL);
  __Pyx_INCREF(__pyx_n_u_PRODUCT_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_PRODUCT_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 169, __pyx_n_u_PRODUCT_VERSION);
  __Pyx_INCREF(__pyx_n_u_MAJOR_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_MAJOR_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 170, __pyx_n_u_MAJOR_VERSION);
  __Pyx_INCREF(__pyx_n_u_MINOR_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_MINOR_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 171, __pyx_n_u_MINOR_VERSION);
  __Pyx_INCREF(__pyx_n_u_PATCH_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_PATCH_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 172, __pyx_n_u_PATCH_VERSION);
  __Pyx_INCREF(__pyx_n_u_BUILD_NUMBER);
  __Pyx_GIVEREF(__pyx_n_u_BUILD_NUMBER);
  PyList_SET_ITEM(__pyx_t_1, 173, __pyx_n_u_BUILD_NUMBER);
  __Pyx_INCREF(__pyx_n_u_DLL_COMPATIBLE_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_DLL_COMPATIBLE_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 174, __pyx_n_u_DLL_COMPATIBLE_VERSION);
  __Pyx_INCREF(__pyx_n_u_MIN_REQUESTABLE_MINOR_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_MIN_REQUESTABLE_MINOR_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 175, __pyx_n_u_MIN_REQUESTABLE_MINOR_VERSION);
  __Pyx_INCREF(__pyx_n_u_FEATURE_VERSION);
  __Pyx_GIVEREF(__pyx_n_u_FEATURE_VERSION);
  PyList_SET_ITEM(__pyx_t_1, 176, __pyx_n_u_FEATURE_VERSION);
  __Pyx_INCREF(__pyx_n_u_STATUS_ORIENTATION_TRACKED);
  __Pyx_GIVEREF(__pyx_n_u_STATUS_ORIENTATION_TRACKED);
  PyList_SET_ITEM(__pyx_t_1, 177, __pyx_n_u_STATUS_ORIENTATION_TRACKED);
  __Pyx_INCREF(__pyx_n_u_STATUS_POSITION_TRACKED);
  __Pyx_GIVEREF(__pyx_n_u_STATUS_POSITION_TRACKED);
  PyList_SET_ITEM(__pyx_t_1, 178, __pyx_n_u_STATUS_POSITION_TRACKED);
  __Pyx_INCREF(__pyx_n_u_STATUS_ORIENTATION_VALID);
  __Pyx_GIVEREF(__pyx_n_u_STATUS_ORIENTATION_VALID);
  PyList_SET_ITEM(__pyx_t_1, 179, __pyx_n_u_STATUS_ORIENTATION_VALID);
  __Pyx_INCREF(__pyx_n_u_STATUS_POSITION_VALID);
  __Pyx_GIVEREF(__pyx_n_u_STATUS_POSITION_VALID);
  PyList_SET_ITEM(__pyx_t_1, 180, __pyx_n_u_STATUS_POSITION_VALID);
  __Pyx_INCREF(__pyx_n_u_PERF_HUD_MODE);
  __Pyx_GIVEREF(__pyx_n_u_PERF_HUD_MODE);
  PyList_SET_ITEM(__pyx_t_1, 181, __pyx_n_u_PERF_HUD_MODE);
  __Pyx_INCREF(__pyx_n_u_PERF_HUD_OFF);
  __Pyx_GIVEREF(__pyx_n_u_PERF_HUD_OFF);
  PyList_SET_ITEM(__pyx_t_1, 182, __pyx_n_u_PERF_HUD_OFF);
  __Pyx_INCREF(__pyx_n_u_PERF_HUD_PERF_SUMMARY);
  __Pyx_GIVEREF(__pyx_n_u_PERF_HUD_PERF_SUMMARY);
  PyList_SET_ITEM(__pyx_t_1, 183, __pyx_n_u_PERF_HUD_PERF_SUMMARY);
  __Pyx_INCREF(__pyx_n_u_PERF_HUD_LATENCY_TIMING);
  __Pyx_GIVEREF(__pyx_n_u_PERF_HUD_LATENCY_TIMING);
  PyList_SET_ITEM(__pyx_t_1, 184, __pyx_n_u_PERF_HUD_LATENCY_TIMING);
  __Pyx_INCREF(__pyx_n_u_PERF_HUD_APP_RENDER_TIMING);
  __Pyx_GIVEREF(__pyx_n_u_PERF_HUD_APP_RENDER_TIMING);
  PyList_SET_ITEM(__pyx_t_1, 185, __pyx_n_u_PERF_HUD_APP_RENDER_TIMING);
  __Pyx_INCREF(__pyx_n_u_PERF_HUD_COMP_RENDER_TIMING);
  __Pyx_GIVEREF(__pyx_n_u_PERF_HUD_COMP_RENDER_TIMING);
  PyList_SET_ITEM(__pyx_t_1, 186, __pyx_n_u_PERF_HUD_COMP_RENDER_TIMING);
  __Pyx_INCREF(__pyx_n_u_PERF_HUD_ASW_STATS);
  __Pyx_GIVEREF(__pyx_n_u_PERF_HUD_ASW_STATS);
  PyList_SET_ITEM(__pyx_t_1, 187, __pyx_n_u_PERF_HUD_ASW_STATS);
  __Pyx_INCREF(__pyx_n_u_PERF_HUD_VERSION_INFO);
  __Pyx_GIVEREF(__pyx_n_u_PERF_HUD_VERSION_INFO);
  PyList_SET_ITEM(__pyx_t_1, 188, __pyx_n_u_PERF_HUD_VERSION_INFO);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE_OFF);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE_OFF);
  PyList_SET_ITEM(__pyx_t_1, 189, __pyx_n_u_DEBUG_HUD_STEREO_MODE_OFF);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD);
  PyList_SET_ITEM(__pyx_t_1, 190, __pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD_WITH);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD_WITH);
  PyList_SET_ITEM(__pyx_t_1, 191, __pyx_n_u_DEBUG_HUD_STEREO_MODE_QUAD_WITH);
  __Pyx_INCREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE_CROSSHAIR);
  __Pyx_GIVEREF(__pyx_n_u_DEBUG_HUD_STEREO_MODE_CROSSHAIR);
  PyList_SET_ITEM(__pyx_t_1, 192, __pyx_n_u_DEBUG_HUD_STEREO_MODE_CROSSHAIR);
  __Pyx_INCREF(__pyx_n_u_BOUNDARY_PLAY_AREA);
  __Pyx_GIVEREF(__pyx_n_u_BOUNDARY_PLAY_AREA);
  PyList_SET_ITEM(__pyx_t_1, 193, __pyx_n_u_BOUNDARY_PLAY_AREA);
  __Pyx_INCREF(__pyx_n_u_BOUNDARY_OUTER);
  __Pyx_GIVEREF(__pyx_n_u_BOUNDARY_OUTER);
  PyList_SET_ITEM(__pyx_t_1, 194, __pyx_n_u_BOUNDARY_OUTER);
  __Pyx_INCREF(__pyx_n_u_LAYER_FLAG_HIGH_QUALITY);
  __Pyx_GIVEREF(__pyx_n_u_LAYER_FLAG_HIGH_QUALITY);
  PyList_SET_ITEM(__pyx_t_1, 195, __pyx_n_u_LAYER_FLAG_HIGH_QUALITY);
  __Pyx_INCREF(__pyx_n_u_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT);
  __Pyx_GIVEREF(__pyx_n_u_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT);
  PyList_SET_ITEM(__pyx_t_1, 196, __pyx_n_u_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT);
  __Pyx_INCREF(__pyx_n_u_LAYER_FLAG_HEAD_LOCKED);
  __Pyx_GIVEREF(__pyx_n_u_LAYER_FLAG_HEAD_LOCKED);
  PyList_SET_ITEM(__pyx_t_1, 197, __pyx_n_u_LAYER_FLAG_HEAD_LOCKED);
  __Pyx_INCREF(__pyx_n_u_HMD_NONE);
  __Pyx_GIVEREF(__pyx_n_u_HMD_NONE);
  PyList_SET_ITEM(__pyx_t_1, 198, __pyx_n_u_HMD_NONE);
  __Pyx_INCREF(__pyx_n_u_HMD_DK1);
  __Pyx_GIVEREF(__pyx_n_u_HMD_DK1);
  PyList_SET_ITEM(__pyx_t_1, 199, __pyx_n_u_HMD_DK1);
  __Pyx_INCREF(__pyx_n_u_HMD_DKHD);
  __Pyx_GIVEREF(__pyx_n_u_HMD_DKHD);
  PyList_SET_ITEM(__pyx_t_1, 200, __pyx_n_u_HMD_DKHD);
  __Pyx_INCREF(__pyx_n_u_HMD_DK2);
  __Pyx_GIVEREF(__pyx_n_u_HMD_DK2);
  PyList_SET_ITEM(__pyx_t_1, 201, __pyx_n_u_HMD_DK2);
  __Pyx_INCREF(__pyx_n_u_HMD_CB);
  __Pyx_GIVEREF(__pyx_n_u_HMD_CB);
  PyList_SET_ITEM(__pyx_t_1, 202, __pyx_n_u_HMD_CB);
  __Pyx_INCREF(__pyx_n_u_HMD_OTHER);
  __Pyx_GIVEREF(__pyx_n_u_HMD_OTHER);
  PyList_SET_ITEM(__pyx_t_1, 203, __pyx_n_u_HMD_OTHER);
  __Pyx_INCREF(__pyx_n_u_HMD_E3_2015);
  __Pyx_GIVEREF(__pyx_n_u_HMD_E3_2015);
  PyList_SET_ITEM(__pyx_t_1, 204, __pyx_n_u_HMD_E3_2015);
  __Pyx_INCREF(__pyx_n_u_HMD_ES06);
  __Pyx_GIVEREF(__pyx_n_u_HMD_ES06);
  PyList_SET_ITEM(__pyx_t_1, 205, __pyx_n_u_HMD_ES06);
  __Pyx_INCREF(__pyx_n_u_HMD_ES09);
  __Pyx_GIVEREF(__pyx_n_u_HMD_ES09);
  PyList_SET_ITEM(__pyx_t_1, 206, __pyx_n_u_HMD_ES09);
  __Pyx_INCREF(__pyx_n_u_HMD_ES11);
  __Pyx_GIVEREF(__pyx_n_u_HMD_ES11);
  PyList_SET_ITEM(__pyx_t_1, 207, __pyx_n_u_HMD_ES11);
  __Pyx_INCREF(__pyx_n_u_HMD_CV1);
  __Pyx_GIVEREF(__pyx_n_u_HMD_CV1);
  PyList_SET_ITEM(__pyx_t_1, 208, __pyx_n_u_HMD_CV1);
  __Pyx_INCREF(__pyx_n_u_HMD_RIFTS);
  __Pyx_GIVEREF(__pyx_n_u_HMD_RIFTS);
  PyList_SET_ITEM(__pyx_t_1, 209, __pyx_n_u_HMD_RIFTS);
  __Pyx_INCREF(__pyx_n_u_HAPTICS_BUFFER_SAMPLES_MAX);
  __Pyx_GIVEREF(__pyx_n_u_HAPTICS_BUFFER_SAMPLES_MAX);
  PyList_SET_ITEM(__pyx_t_1, 210, __pyx_n_u_HAPTICS_BUFFER_SAMPLES_MAX);
  __Pyx_INCREF(__pyx_n_u_MIRROR_OPTION_DEFAULT);
  __Pyx_GIVEREF(__pyx_n_u_MIRROR_OPTION_DEFAULT);
  PyList_SET_ITEM(__pyx_t_1, 211, __pyx_n_u_MIRROR_OPTION_DEFAULT);
  __Pyx_INCREF(__pyx_n_u_MIRROR_OPTION_POST_DISTORTION);
  __Pyx_GIVEREF(__pyx_n_u_MIRROR_OPTION_POST_DISTORTION);
  PyList_SET_ITEM(__pyx_t_1, 212, __pyx_n_u_MIRROR_OPTION_POST_DISTORTION);
  __Pyx_INCREF(__pyx_n_u_MIRROR_OPTION_LEFT_EYE_ONLY);
  __Pyx_GIVEREF(__pyx_n_u_MIRROR_OPTION_LEFT_EYE_ONLY);
  PyList_SET_ITEM(__pyx_t_1, 213, __pyx_n_u_MIRROR_OPTION_LEFT_EYE_ONLY);
  __Pyx_INCREF(__pyx_n_u_MIRROR_OPTION_RIGHT_EYE_ONLY);
  __Pyx_GIVEREF(__pyx_n_u_MIRROR_OPTION_RIGHT_EYE_ONLY);
  PyList_SET_ITEM(__pyx_t_1, 214, __pyx_n_u_MIRROR_OPTION_RIGHT_EYE_ONLY);
  __Pyx_INCREF(__pyx_n_u_MIRROR_OPTION_INCLUDE_GUARDIAN);
  __Pyx_GIVEREF(__pyx_n_u_MIRROR_OPTION_INCLUDE_GUARDIAN);
  PyList_SET_ITEM(__pyx_t_1, 215, __pyx_n_u_MIRROR_OPTION_INCLUDE_GUARDIAN);
  __Pyx_INCREF(__pyx_n_u_MIRROR_OPTION_INCLUDE_NOTIFICATI);
  __Pyx_GIVEREF(__pyx_n_u_MIRROR_OPTION_INCLUDE_NOTIFICATI);
  PyList_SET_ITEM(__pyx_t_1, 216, __pyx_n_u_MIRROR_OPTION_INCLUDE_NOTIFICATI);
  __Pyx_INCREF(__pyx_n_u_MIRROR_OPTION_INCLUDE_SYSTEM_GUI);
  __Pyx_GIVEREF(__pyx_n_u_MIRROR_OPTION_INCLUDE_SYSTEM_GUI);
  PyList_SET_ITEM(__pyx_t_1, 217, __pyx_n_u_MIRROR_OPTION_INCLUDE_SYSTEM_GUI);
  __Pyx_INCREF(__pyx_n_u_MIRROR_OPTION_FORCE_SYMMETRIC_FO);
  __Pyx_GIVEREF(__pyx_n_u_MIRROR_OPTION_FORCE_SYMMETRIC_FO);
  PyList_SET_ITEM(__pyx_t_1, 218, __pyx_n_u_MIRROR_OPTION_FORCE_SYMMETRIC_FO);
  __Pyx_INCREF(__pyx_n_u_LOG_LEVEL_DEBUG);
  __Pyx_GIVEREF(__pyx_n_u_LOG_LEVEL_DEBUG);
  PyList_SET_ITEM(__pyx_t_1, 219, __pyx_n_u_LOG_LEVEL_DEBUG);
  __Pyx_INCREF(__pyx_n_u_LOG_LEVEL_INFO);
  __Pyx_GIVEREF(__pyx_n_u_LOG_LEVEL_INFO);
  PyList_SET_ITEM(__pyx_t_1, 220, __pyx_n_u_LOG_LEVEL_INFO);
  __Pyx_INCREF(__pyx_n_u_LOG_LEVEL_ERROR);
  __Pyx_GIVEREF(__pyx_n_u_LOG_LEVEL_ERROR);
  PyList_SET_ITEM(__pyx_t_1, 221, __pyx_n_u_LOG_LEVEL_ERROR);
  __Pyx_INCREF(__pyx_n_u_HMD_RIFTS);
  __Pyx_GIVEREF(__pyx_n_u_HMD_RIFTS);
  PyList_SET_ITEM(__pyx_t_1, 222, __pyx_n_u_HMD_RIFTS);
  __Pyx_INCREF(__pyx_n_u_LibOVRPose);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRPose);
  PyList_SET_ITEM(__pyx_t_1, 223, __pyx_n_u_LibOVRPose);
  __Pyx_INCREF(__pyx_n_u_LibOVRPoseState);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRPoseState);
  PyList_SET_ITEM(__pyx_t_1, 224, __pyx_n_u_LibOVRPoseState);
  __Pyx_INCREF(__pyx_n_u_LibOVRTrackingState);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRTrackingState);
  PyList_SET_ITEM(__pyx_t_1, 225, __pyx_n_u_LibOVRTrackingState);
  __Pyx_INCREF(__pyx_n_u_LibOVRBounds);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRBounds);
  PyList_SET_ITEM(__pyx_t_1, 226, __pyx_n_u_LibOVRBounds);
  __Pyx_INCREF(__pyx_n_u_LibOVRTrackerInfo);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRTrackerInfo);
  PyList_SET_ITEM(__pyx_t_1, 227, __pyx_n_u_LibOVRTrackerInfo);
  __Pyx_INCREF(__pyx_n_u_LibOVRHmdInfo);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRHmdInfo);
  PyList_SET_ITEM(__pyx_t_1, 228, __pyx_n_u_LibOVRHmdInfo);
  __Pyx_INCREF(__pyx_n_u_LibOVRSessionStatus);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRSessionStatus);
  PyList_SET_ITEM(__pyx_t_1, 229, __pyx_n_u_LibOVRSessionStatus);
  __Pyx_INCREF(__pyx_n_u_LibOVRBoundaryTestResult);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRBoundaryTestResult);
  PyList_SET_ITEM(__pyx_t_1, 230, __pyx_n_u_LibOVRBoundaryTestResult);
  __Pyx_INCREF(__pyx_n_u_LibOVRPerfStatsPerCompositorFram);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRPerfStatsPerCompositorFram);
  PyList_SET_ITEM(__pyx_t_1, 231, __pyx_n_u_LibOVRPerfStatsPerCompositorFram);
  __Pyx_INCREF(__pyx_n_u_LibOVRPerfStats);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRPerfStats);
  PyList_SET_ITEM(__pyx_t_1, 232, __pyx_n_u_LibOVRPerfStats);
  __Pyx_INCREF(__pyx_n_u_LibOVRHapticsInfo);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRHapticsInfo);
  PyList_SET_ITEM(__pyx_t_1, 233, __pyx_n_u_LibOVRHapticsInfo);
  __Pyx_INCREF(__pyx_n_u_LibOVRHapticsBuffer);
  __Pyx_GIVEREF(__pyx_n_u_LibOVRHapticsBuffer);
  PyList_SET_ITEM(__pyx_t_1, 234, __pyx_n_u_LibOVRHapticsBuffer);
  __Pyx_INCREF(__pyx_n_u_success);
  __Pyx_GIVEREF(__pyx_n_u_success);
  PyList_SET_ITEM(__pyx_t_1, 235, __pyx_n_u_success);
  __Pyx_INCREF(__pyx_n_u_unqualifiedSuccess);
  __Pyx_GIVEREF(__pyx_n_u_unqualifiedSuccess);
  PyList_SET_ITEM(__pyx_t_1, 236, __pyx_n_u_unqualifiedSuccess);
  __Pyx_INCREF(__pyx_n_u_failure);
  __Pyx_GIVEREF(__pyx_n_u_failure);
  PyList_SET_ITEM(__pyx_t_1, 237, __pyx_n_u_failure);
  __Pyx_INCREF(__pyx_n_u_setBool);
  __Pyx_GIVEREF(__pyx_n_u_setBool);
  PyList_SET_ITEM(__pyx_t_1, 238, __pyx_n_u_setBool);
  __Pyx_INCREF(__pyx_n_u_getBool);
  __Pyx_GIVEREF(__pyx_n_u_getBool);
  PyList_SET_ITEM(__pyx_t_1, 239, __pyx_n_u_getBool);
  __Pyx_INCREF(__pyx_n_u_setInt);
  __Pyx_GIVEREF(__pyx_n_u_setInt);
  PyList_SET_ITEM(__pyx_t_1, 240, __pyx_n_u_setInt);
  __Pyx_INCREF(__pyx_n_u_getInt);
  __Pyx_GIVEREF(__pyx_n_u_getInt);
  PyList_SET_ITEM(__pyx_t_1, 241, __pyx_n_u_getInt);
  __Pyx_INCREF(__pyx_n_u_setFloat);
  __Pyx_GIVEREF(__pyx_n_u_setFloat);
  PyList_SET_ITEM(__pyx_t_1, 242, __pyx_n_u_setFloat);
  __Pyx_INCREF(__pyx_n_u_getFloat);
  __Pyx_GIVEREF(__pyx_n_u_getFloat);
  PyList_SET_ITEM(__pyx_t_1, 243, __pyx_n_u_getFloat);
  __Pyx_INCREF(__pyx_n_u_getFloatArray);
  __Pyx_GIVEREF(__pyx_n_u_getFloatArray);
  PyList_SET_ITEM(__pyx_t_1, 244, __pyx_n_u_getFloatArray);
  __Pyx_INCREF(__pyx_n_u_setFloatArray);
  __Pyx_GIVEREF(__pyx_n_u_setFloatArray);
  PyList_SET_ITEM(__pyx_t_1, 245, __pyx_n_u_setFloatArray);
  __Pyx_INCREF(__pyx_n_u_setString);
  __Pyx_GIVEREF(__pyx_n_u_setString);
  PyList_SET_ITEM(__pyx_t_1, 246, __pyx_n_u_setString);
  __Pyx_INCREF(__pyx_n_u_getString);
  __Pyx_GIVEREF(__pyx_n_u_getString);
  PyList_SET_ITEM(__pyx_t_1, 247, __pyx_n_u_getString);
  __Pyx_INCREF(__pyx_n_u_isOculusServiceRunning);
  __Pyx_GIVEREF(__pyx_n_u_isOculusServiceRunning);
  PyList_SET_ITEM(__pyx_t_1, 248, __pyx_n_u_isOculusServiceRunning);
  __Pyx_INCREF(__pyx_n_u_isHmdConnected);
  __Pyx_GIVEREF(__pyx_n_u_isHmdConnected);
  PyList_SET_ITEM(__pyx_t_1, 249, __pyx_n_u_isHmdConnected);
  __Pyx_INCREF(__pyx_n_u_getHmdInfo);
  __Pyx_GIVEREF(__pyx_n_u_getHmdInfo);
  PyList_SET_ITEM(__pyx_t_1, 250, __pyx_n_u_getHmdInfo);
  __Pyx_INCREF(__pyx_n_u_initialize);
  __Pyx_GIVEREF(__pyx_n_u_initialize);
  PyList_SET_ITEM(__pyx_t_1, 251, __pyx_n_u_initialize);
  __Pyx_INCREF(__pyx_n_u_create);
  __Pyx_GIVEREF(__pyx_n_u_create);
  PyList_SET_ITEM(__pyx_t_1, 252, __pyx_n_u_create);
  __Pyx_INCREF(__pyx_n_u_destroyTextureSwapChain);
  __Pyx_GIVEREF(__pyx_n_u_destroyTextureSwapChain);
  PyList_SET_ITEM(__pyx_t_1, 253, __pyx_n_u_destroyTextureSwapChain);
  __Pyx_INCREF(__pyx_n_u_destroyMirrorTexture);
  __Pyx_GIVEREF(__pyx_n_u_destroyMirrorTexture);
  PyList_SET_ITEM(__pyx_t_1, 254, __pyx_n_u_destroyMirrorTexture);
  __Pyx_INCREF(__pyx_n_u_destroy);
  __Pyx_GIVEREF(__pyx_n_u_destroy);
  PyList_SET_ITEM(__pyx_t_1, 255, __pyx_n_u_destroy);
  __Pyx_INCREF(__pyx_n_u_shutdown);
  __Pyx_GIVEREF(__pyx_n_u_shutdown);
  PyList_SET_ITEM(__pyx_t_1, 256, __pyx_n_u_shutdown);
  __Pyx_INCREF(__pyx_n_u_getGraphicsLUID);
  __Pyx_GIVEREF(__pyx_n_u_getGraphicsLUID);
  PyList_SET_ITEM(__pyx_t_1, 257, __pyx_n_u_getGraphicsLUID);
  __Pyx_INCREF(__pyx_n_u_setHighQuality);
  __Pyx_GIVEREF(__pyx_n_u_setHighQuality);
  PyList_SET_ITEM(__pyx_t_1, 258, __pyx_n_u_setHighQuality);
  __Pyx_INCREF(__pyx_n_u_setHeadLocked);
  __Pyx_GIVEREF(__pyx_n_u_setHeadLocked);
  PyList_SET_ITEM(__pyx_t_1, 259, __pyx_n_u_setHeadLocked);
  __Pyx_INCREF(__pyx_n_u_isHeadLocked);
  __Pyx_GIVEREF(__pyx_n_u_isHeadLocked);
  PyList_SET_ITEM(__pyx_t_1, 260, __pyx_n_u_isHeadLocked);
  __Pyx_INCREF(__pyx_n_u_getPixelsPerTanAngleAtCenter);
  __Pyx_GIVEREF(__pyx_n_u_getPixelsPerTanAngleAtCenter);
  PyList_SET_ITEM(__pyx_t_1, 261, __pyx_n_u_getPixelsPerTanAngleAtCenter);
  __Pyx_INCREF(__pyx_n_u_getTanAngleToRenderTargetNDC);
  __Pyx_GIVEREF(__pyx_n_u_getTanAngleToRenderTargetNDC);
  PyList_SET_ITEM(__pyx_t_1, 262, __pyx_n_u_getTanAngleToRenderTargetNDC);
  __Pyx_INCREF(__pyx_n_u_getPixelsPerDegree);
  __Pyx_GIVEREF(__pyx_n_u_getPixelsPerDegree);
  PyList_SET_ITEM(__pyx_t_1, 263, __pyx_n_u_getPixelsPerDegree);
  __Pyx_INCREF(__pyx_n_u_getDistortedViewport);
  __Pyx_GIVEREF(__pyx_n_u_getDistortedViewport);
  PyList_SET_ITEM(__pyx_t_1, 264, __pyx_n_u_getDistortedViewport);
  __Pyx_INCREF(__pyx_n_u_getEyeRenderFov);
  __Pyx_GIVEREF(__pyx_n_u_getEyeRenderFov);
  PyList_SET_ITEM(__pyx_t_1, 265, __pyx_n_u_getEyeRenderFov);
  __Pyx_INCREF(__pyx_n_u_setEyeRenderFov);
  __Pyx_GIVEREF(__pyx_n_u_setEyeRenderFov);
  PyList_SET_ITEM(__pyx_t_1, 266, __pyx_n_u_setEyeRenderFov);
  __Pyx_INCREF(__pyx_n_u_getEyeAspectRatio);
  __Pyx_GIVEREF(__pyx_n_u_getEyeAspectRatio);
  PyList_SET_ITEM(__pyx_t_1, 267, __pyx_n_u_getEyeAspectRatio);
  __Pyx_INCREF(__pyx_n_u_getEyeHorizontalFovRadians);
  __Pyx_GIVEREF(__pyx_n_u_getEyeHorizontalFovRadians);
  PyList_SET_ITEM(__pyx_t_1, 268, __pyx_n_u_getEyeHorizontalFovRadians);
  __Pyx_INCREF(__pyx_n_u_getEyeVerticalFovRadians);
  __Pyx_GIVEREF(__pyx_n_u_getEyeVerticalFovRadians);
  PyList_SET_ITEM(__pyx_t_1, 269, __pyx_n_u_getEyeVerticalFovRadians);
  __Pyx_INCREF(__pyx_n_u_getEyeFocalLength);
  __Pyx_GIVEREF(__pyx_n_u_getEyeFocalLength);
  PyList_SET_ITEM(__pyx_t_1, 270, __pyx_n_u_getEyeFocalLength);
  __Pyx_INCREF(__pyx_n_u_calcEyeBufferSize);
  __Pyx_GIVEREF(__pyx_n_u_calcEyeBufferSize);
  PyList_SET_ITEM(__pyx_t_1, 271, __pyx_n_u_calcEyeBufferSize);
  __Pyx_INCREF(__pyx_n_u_getLayerEyeFovFlags);
  __Pyx_GIVEREF(__pyx_n_u_getLayerEyeFovFlags);
  PyList_SET_ITEM(__pyx_t_1, 272, __pyx_n_u_getLayerEyeFovFlags);
  __Pyx_INCREF(__pyx_n_u_setLayerEyeFovFlags);
  __Pyx_GIVEREF(__pyx_n_u_setLayerEyeFovFlags);
  PyList_SET_ITEM(__pyx_t_1, 273, __pyx_n_u_setLayerEyeFovFlags);
  __Pyx_INCREF(__pyx_n_u_createTextureSwapChainGL);
  __Pyx_GIVEREF(__pyx_n_u_createTextureSwapChainGL);
  PyList_SET_ITEM(__pyx_t_1, 274, __pyx_n_u_createTextureSwapChainGL);
  __Pyx_INCREF(__pyx_n_u_getTextureSwapChainLengthGL);
  __Pyx_GIVEREF(__pyx_n_u_getTextureSwapChainLengthGL);
  PyList_SET_ITEM(__pyx_t_1, 275, __pyx_n_u_getTextureSwapChainLengthGL);
  __Pyx_INCREF(__pyx_n_u_getTextureSwapChainCurrentIndex);
  __Pyx_GIVEREF(__pyx_n_u_getTextureSwapChainCurrentIndex);
  PyList_SET_ITEM(__pyx_t_1, 276, __pyx_n_u_getTextureSwapChainCurrentIndex);
  __Pyx_INCREF(__pyx_n_u_getTextureSwapChainBufferGL);
  __Pyx_GIVEREF(__pyx_n_u_getTextureSwapChainBufferGL);
  PyList_SET_ITEM(__pyx_t_1, 277, __pyx_n_u_getTextureSwapChainBufferGL);
  __Pyx_INCREF(__pyx_n_u_setEyeColorTextureSwapChain);
  __Pyx_GIVEREF(__pyx_n_u_setEyeColorTextureSwapChain);
  PyList_SET_ITEM(__pyx_t_1, 278, __pyx_n_u_setEyeColorTextureSwapChain);
  __Pyx_INCREF(__pyx_n_u_createMirrorTexture);
  __Pyx_GIVEREF(__pyx_n_u_createMirrorTexture);
  PyList_SET_ITEM(__pyx_t_1, 279, __pyx_n_u_createMirrorTexture);
  __Pyx_INCREF(__pyx_n_u_getMirrorTexture);
  __Pyx_GIVEREF(__pyx_n_u_getMirrorTexture);
  PyList_SET_ITEM(__pyx_t_1, 280, __pyx_n_u_getMirrorTexture);
  __Pyx_INCREF(__pyx_n_u_getSensorSampleTime);
  __Pyx_GIVEREF(__pyx_n_u_getSensorSampleTime);
  PyList_SET_ITEM(__pyx_t_1, 281, __pyx_n_u_getSensorSampleTime);
  __Pyx_INCREF(__pyx_n_u_setSensorSampleTime);
  __Pyx_GIVEREF(__pyx_n_u_setSensorSampleTime);
  PyList_SET_ITEM(__pyx_t_1, 282, __pyx_n_u_setSensorSampleTime);
  __Pyx_INCREF(__pyx_n_u_getTrackingState);
  __Pyx_GIVEREF(__pyx_n_u_getTrackingState);
  PyList_SET_ITEM(__pyx_t_1, 283, __pyx_n_u_getTrackingState);
  __Pyx_INCREF(__pyx_n_u_getDevicePoses);
  __Pyx_GIVEREF(__pyx_n_u_getDevicePoses);
  PyList_SET_ITEM(__pyx_t_1, 284, __pyx_n_u_getDevicePoses);
  __Pyx_INCREF(__pyx_n_u_calcEyePoses);
  __Pyx_GIVEREF(__pyx_n_u_calcEyePoses);
  PyList_SET_ITEM(__pyx_t_1, 285, __pyx_n_u_calcEyePoses);
  __Pyx_INCREF(__pyx_n_u_getHmdToEyePose);
  __Pyx_GIVEREF(__pyx_n_u_getHmdToEyePose);
  PyList_SET_ITEM(__pyx_t_1, 286, __pyx_n_u_getHmdToEyePose);
  __Pyx_INCREF(__pyx_n_u_setHmdToEyePose);
  __Pyx_GIVEREF(__pyx_n_u_setHmdToEyePose);
  PyList_SET_ITEM(__pyx_t_1, 287, __pyx_n_u_setHmdToEyePose);
  __Pyx_INCREF(__pyx_n_u_getEyeRenderPose);
  __Pyx_GIVEREF(__pyx_n_u_getEyeRenderPose);
  PyList_SET_ITEM(__pyx_t_1, 288, __pyx_n_u_getEyeRenderPose);
  __Pyx_INCREF(__pyx_n_u_setEyeRenderPose);
  __Pyx_GIVEREF(__pyx_n_u_setEyeRenderPose);
  PyList_SET_ITEM(__pyx_t_1, 289, __pyx_n_u_setEyeRenderPose);
  __Pyx_INCREF(__pyx_n_u_getEyeProjectionMatrix);
  __Pyx_GIVEREF(__pyx_n_u_getEyeProjectionMatrix);
  PyList_SET_ITEM(__pyx_t_1, 290, __pyx_n_u_getEyeProjectionMatrix);
  __Pyx_INCREF(__pyx_n_u_getEyeRenderViewport);
  __Pyx_GIVEREF(__pyx_n_u_getEyeRenderViewport);
  PyList_SET_ITEM(__pyx_t_1, 291, __pyx_n_u_getEyeRenderViewport);
  __Pyx_INCREF(__pyx_n_u_setEyeRenderViewport);
  __Pyx_GIVEREF(__pyx_n_u_setEyeRenderViewport);
  PyList_SET_ITEM(__pyx_t_1, 292, __pyx_n_u_setEyeRenderViewport);
  __Pyx_INCREF(__pyx_n_u_getEyeViewMatrix);
  __Pyx_GIVEREF(__pyx_n_u_getEyeViewMatrix);
  PyList_SET_ITEM(__pyx_t_1, 293, __pyx_n_u_getEyeViewMatrix);
  __Pyx_INCREF(__pyx_n_u_getPredictedDisplayTime);
  __Pyx_GIVEREF(__pyx_n_u_getPredictedDisplayTime);
  PyList_SET_ITEM(__pyx_t_1, 294, __pyx_n_u_getPredictedDisplayTime);
  __Pyx_INCREF(__pyx_n_u_timeInSeconds);
  __Pyx_GIVEREF(__pyx_n_u_timeInSeconds);
  PyList_SET_ITEM(__pyx_t_1, 295, __pyx_n_u_timeInSeconds);
  __Pyx_INCREF(__pyx_n_u_waitToBeginFrame);
  __Pyx_GIVEREF(__pyx_n_u_waitToBeginFrame);
  PyList_SET_ITEM(__pyx_t_1, 296, __pyx_n_u_waitToBeginFrame);
  __Pyx_INCREF(__pyx_n_u_beginFrame);
  __Pyx_GIVEREF(__pyx_n_u_beginFrame);
  PyList_SET_ITEM(__pyx_t_1, 297, __pyx_n_u_beginFrame);
  __Pyx_INCREF(__pyx_n_u_commitTextureSwapChain);
  __Pyx_GIVEREF(__pyx_n_u_commitTextureSwapChain);
  PyList_SET_ITEM(__pyx_t_1, 298, __pyx_n_u_commitTextureSwapChain);
  __Pyx_INCREF(__pyx_n_u_endFrame);
  __Pyx_GIVEREF(__pyx_n_u_endFrame);
  PyList_SET_ITEM(__pyx_t_1, 299, __pyx_n_u_endFrame);
  __Pyx_INCREF(__pyx_n_u_getTrackingOriginType);
  __Pyx_GIVEREF(__pyx_n_u_getTrackingOriginType);
  PyList_SET_ITEM(__pyx_t_1, 300, __pyx_n_u_getTrackingOriginType);
  __Pyx_INCREF(__pyx_n_u_setTrackingOriginType);
  __Pyx_GIVEREF(__pyx_n_u_setTrackingOriginType);
  PyList_SET_ITEM(__pyx_t_1, 301, __pyx_n_u_setTrackingOriginType);
  __Pyx_INCREF(__pyx_n_u_recenterTrackingOrigin);
  __Pyx_GIVEREF(__pyx_n_u_recenterTrackingOrigin);
  PyList_SET_ITEM(__pyx_t_1, 302, __pyx_n_u_recenterTrackingOrigin);
  __Pyx_INCREF(__pyx_n_u_specifyTrackingOrigin);
  __Pyx_GIVEREF(__pyx_n_u_specifyTrackingOrigin);
  PyList_SET_ITEM(__pyx_t_1, 303, __pyx_n_u_specifyTrackingOrigin);
  __Pyx_INCREF(__pyx_n_u_clearShouldRecenterFlag);
  __Pyx_GIVEREF(__pyx_n_u_clearShouldRecenterFlag);
  PyList_SET_ITEM(__pyx_t_1, 304, __pyx_n_u_clearShouldRecenterFlag);
  __Pyx_INCREF(__pyx_n_u_getTrackerCount);
  __Pyx_GIVEREF(__pyx_n_u_getTrackerCount);
  PyList_SET_ITEM(__pyx_t_1, 305, __pyx_n_u_getTrackerCount);
  __Pyx_INCREF(__pyx_n_u_getTrackerInfo);
  __Pyx_GIVEREF(__pyx_n_u_getTrackerInfo);
  PyList_SET_ITEM(__pyx_t_1, 306, __pyx_n_u_getTrackerInfo);
  __Pyx_INCREF(__pyx_n_u_getSessionStatus);
  __Pyx_GIVEREF(__pyx_n_u_getSessionStatus);
  PyList_SET_ITEM(__pyx_t_1, 307, __pyx_n_u_getSessionStatus);
  __Pyx_INCREF(__pyx_n_u_getPerfStats);
  __Pyx_GIVEREF(__pyx_n_u_getPerfStats);
  PyList_SET_ITEM(__pyx_t_1, 308, __pyx_n_u_getPerfStats);
  __Pyx_INCREF(__pyx_n_u_resetPerfStats);
  __Pyx_GIVEREF(__pyx_n_u_resetPerfStats);
  PyList_SET_ITEM(__pyx_t_1, 309, __pyx_n_u_resetPerfStats);
  __Pyx_INCREF(__pyx_n_u_getLastErrorInfo);
  __Pyx_GIVEREF(__pyx_n_u_getLastErrorInfo);
  PyList_SET_ITEM(__pyx_t_1, 310, __pyx_n_u_getLastErrorInfo);
  __Pyx_INCREF(__pyx_n_u_setBoundaryColor);
  __Pyx_GIVEREF(__pyx_n_u_setBoundaryColor);
  PyList_SET_ITEM(__pyx_t_1, 311, __pyx_n_u_setBoundaryColor);
  __Pyx_INCREF(__pyx_n_u_resetBoundaryColor);
  __Pyx_GIVEREF(__pyx_n_u_resetBoundaryColor);
  PyList_SET_ITEM(__pyx_t_1, 312, __pyx_n_u_resetBoundaryColor);
  __Pyx_INCREF(__pyx_n_u_getBoundaryVisible);
  __Pyx_GIVEREF(__pyx_n_u_getBoundaryVisible);
  PyList_SET_ITEM(__pyx_t_1, 313, __pyx_n_u_getBoundaryVisible);
  __Pyx_INCREF(__pyx_n_u_showBoundary);
  __Pyx_GIVEREF(__pyx_n_u_showBoundary);
  PyList_SET_ITEM(__pyx_t_1, 314, __pyx_n_u_showBoundary);
  __Pyx_INCREF(__pyx_n_u_hideBoundary);
  __Pyx_GIVEREF(__pyx_n_u_hideBoundary);
  PyList_SET_ITEM(__pyx_t_1, 315, __pyx_n_u_hideBoundary);
  __Pyx_INCREF(__pyx_n_u_getBoundaryDimensions);
  __Pyx_GIVEREF(__pyx_n_u_getBoundaryDimensions);
  PyList_SET_ITEM(__pyx_t_1, 316, __pyx_n_u_getBoundaryDimensions);
  __Pyx_INCREF(__pyx_n_u_testBoundary);
  __Pyx_GIVEREF(__pyx_n_u_testBoundary);
  PyList_SET_ITEM(__pyx_t_1, 317, __pyx_n_u_testBoundary);
  __Pyx_INCREF(__pyx_n_u_getConnectedControllerTypes);
  __Pyx_GIVEREF(__pyx_n_u_getConnectedControllerTypes);
  PyList_SET_ITEM(__pyx_t_1, 318, __pyx_n_u_getConnectedControllerTypes);
  __Pyx_INCREF(__pyx_n_u_updateInputState);
  __Pyx_GIVEREF(__pyx_n_u_updateInputState);
  PyList_SET_ITEM(__pyx_t_1, 319, __pyx_n_u_updateInputState);
  __Pyx_INCREF(__pyx_n_u_getButton);
  __Pyx_GIVEREF(__pyx_n_u_getButton);
  PyList_SET_ITEM(__pyx_t_1, 320, __pyx_n_u_getButton);
  __Pyx_INCREF(__pyx_n_u_getTouch);
  __Pyx_GIVEREF(__pyx_n_u_getTouch);
  PyList_SET_ITEM(__pyx_t_1, 321, __pyx_n_u_getTouch);
  __Pyx_INCREF(__pyx_n_u_getThumbstickValues);
  __Pyx_GIVEREF(__pyx_n_u_getThumbstickValues);
  PyList_SET_ITEM(__pyx_t_1, 322, __pyx_n_u_getThumbstickValues);
  __Pyx_INCREF(__pyx_n_u_getIndexTriggerValues);
  __Pyx_GIVEREF(__pyx_n_u_getIndexTriggerValues);
  PyList_SET_ITEM(__pyx_t_1, 323, __pyx_n_u_getIndexTriggerValues);
  __Pyx_INCREF(__pyx_n_u_getHandTriggerValues);
  __Pyx_GIVEREF(__pyx_n_u_getHandTriggerValues);
  PyList_SET_ITEM(__pyx_t_1, 324, __pyx_n_u_getHandTriggerValues);
  __Pyx_INCREF(__pyx_n_u_setControllerVibration);
  __Pyx_GIVEREF(__pyx_n_u_setControllerVibration);
  PyList_SET_ITEM(__pyx_t_1, 325, __pyx_n_u_setControllerVibration);
  __Pyx_INCREF(__pyx_n_u_getHapticsInfo);
  __Pyx_GIVEREF(__pyx_n_u_getHapticsInfo);
  PyList_SET_ITEM(__pyx_t_1, 326, __pyx_n_u_getHapticsInfo);
  __Pyx_INCREF(__pyx_n_u_submitControllerVibration);
  __Pyx_GIVEREF(__pyx_n_u_submitControllerVibration);
  PyList_SET_ITEM(__pyx_t_1, 327, __pyx_n_u_submitControllerVibration);
  __Pyx_INCREF(__pyx_n_u_getControllerPlaybackState);
  __Pyx_GIVEREF(__pyx_n_u_getControllerPlaybackState);
  PyList_SET_ITEM(__pyx_t_1, 328, __pyx_n_u_getControllerPlaybackState);
  __Pyx_INCREF(__pyx_n_u_cullPose);
  __Pyx_GIVEREF(__pyx_n_u_cullPose);
  PyList_SET_ITEM(__pyx_t_1, 329, __pyx_n_u_cullPose);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":401
 * 
 * cimport numpy as np
 * import numpy as np             # <<<<<<<<<<<<<<
 * np.import_array()
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":402
 * cimport numpy as np
 * import numpy as np
 * np.import_array()             # <<<<<<<<<<<<<<
 * 
 * import warnings
 */
  __pyx_t_2 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 402, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":404
 * np.import_array()
 * 
 * import warnings             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":425
 * 
 * # prepare the render layer
 * _eyeLayer.Header.Type = capi.ovrLayerType_EyeFov             # <<<<<<<<<<<<<<
 * _eyeLayer.Header.Flags = \
 *     capi.ovrLayerFlag_TextureOriginAtBottomLeft | \
 */
  __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Type = ovrLayerType_EyeFov;

  /* "psychxr/libovr/_libovr.pyx":426
 * # prepare the render layer
 * _eyeLayer.Header.Type = capi.ovrLayerType_EyeFov
 * _eyeLayer.Header.Flags = \             # <<<<<<<<<<<<<<
 *     capi.ovrLayerFlag_TextureOriginAtBottomLeft | \
 *     capi.ovrLayerFlag_HighQuality
 */
  __pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.Header.Flags = (ovrLayerFlag_TextureOriginAtBottomLeft | ovrLayerFlag_HighQuality);

  /* "psychxr/libovr/_libovr.pyx":429
 *     capi.ovrLayerFlag_TextureOriginAtBottomLeft | \
 *     capi.ovrLayerFlag_HighQuality
 * _eyeLayer.ColorTexture[0] = _eyeLayer.ColorTexture[1] = NULL             # <<<<<<<<<<<<<<
 * 
 * # status and performance information
 */
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.ColorTexture[0]) = NULL;
  (__pyx_v_7psychxr_6libovr_7_libovr__eyeLayer.ColorTexture[1]) = NULL;

  /* "psychxr/libovr/_libovr.pyx":449
 * #
 * cdef capi.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):             # <<<<<<<<<<<<<<
 *     if capi.OVR_FAILURE(result):
 *         capi.ovr_GetLastErrorInfo(&_last_error_info_)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_1check_result, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_result, __pyx_t_1) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":456
 * 
 * # helper functions and data
 * RAD_TO_DEGF = <float>180.0 / M_PI             # <<<<<<<<<<<<<<
 * DEG_TO_RADF = M_PI / <float>180.0
 * 
 */
  if (unlikely(M_PI == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 456, __pyx_L1_error)
  }
  __pyx_t_1 = PyFloat_FromDouble((((double)((float)180.0)) / ((double)M_PI))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RAD_TO_DEGF, __pyx_t_1) < 0) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":457
 * # helper functions and data
 * RAD_TO_DEGF = <float>180.0 / M_PI
 * DEG_TO_RADF = M_PI / <float>180.0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble((((double)M_PI) / ((double)((float)180.0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEG_TO_RADF, __pyx_t_1) < 0) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/libovr/_libovr.pyx":479
 * # Version checker
 * 
 * if capi.OVR_MAJOR_VERSION != 1 or capi.OVR_MINOR_VERSION != 40:             # <<<<<<<<<<<<<<
 *     # raise a warning if the version of the Oculus SDK may be incompatible
 *     warnings.warn(
 */
  __pyx_t_4 = ((OVR_MAJOR_VERSION != 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((OVR_MINOR_VERSION != 40) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {

    /* "psychxr/libovr/_libovr.pyx":481
 * if capi.OVR_MAJOR_VERSION != 1 or capi.OVR_MINOR_VERSION != 40:
 *     # raise a warning if the version of the Oculus SDK may be incompatible
 *     warnings.warn(             # <<<<<<<<<<<<<<
 *         "PsychXR was built using version {major}.{minor} of the Oculus PC SDK "
 *         "however 1.40 is recommended. This might be perfectly fine if there "
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/libovr/_libovr.pyx":484
 *         "PsychXR was built using version {major}.{minor} of the Oculus PC SDK "
 *         "however 1.40 is recommended. This might be perfectly fine if there "
 *         "aren't any API breaking changes.".format(             # <<<<<<<<<<<<<<
 *             major=capi.OVR_MAJOR_VERSION, minor=capi.OVR_MINOR_VERSION),
 *         RuntimeWarning)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_PsychXR_was_built_using_version, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "psychxr/libovr/_libovr.pyx":485
 *         "however 1.40 is recommended. This might be perfectly fine if there "
 *         "aren't any API breaking changes.".format(
 *             major=capi.OVR_MAJOR_VERSION, minor=capi.OVR_MINOR_VERSION),             # <<<<<<<<<<<<<<
 *         RuntimeWarning)
 * 
 */
    __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyInt_From_int(OVR_MAJOR_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_major, __pyx_t_7) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_From_int(OVR_MINOR_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_minor, __pyx_t_7) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "psychxr/libovr/_libovr.pyx":484
 *         "PsychXR was built using version {major}.{minor} of the Oculus PC SDK "
 *         "however 1.40 is recommended. This might be perfectly fine if there "
 *         "aren't any API breaking changes.".format(             # <<<<<<<<<<<<<<
 *             major=capi.OVR_MAJOR_VERSION, minor=capi.OVR_MINOR_VERSION),
 *         RuntimeWarning)
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "psychxr/libovr/_libovr.pyx":481
 * if capi.OVR_MAJOR_VERSION != 1 or capi.OVR_MINOR_VERSION != 40:
 *     # raise a warning if the version of the Oculus SDK may be incompatible
 *     warnings.warn(             # <<<<<<<<<<<<<<
 *         "PsychXR was built using version {major}.{minor} of the Oculus PC SDK "
 *         "however 1.40 is recommended. This might be perfectly fine if there "
 */
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
    __Pyx_INCREF(__pyx_builtin_RuntimeWarning);
    __Pyx_GIVEREF(__pyx_builtin_RuntimeWarning);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_builtin_RuntimeWarning);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "psychxr/libovr/_libovr.pyx":479
 * # Version checker
 * 
 * if capi.OVR_MAJOR_VERSION != 1 or capi.OVR_MINOR_VERSION != 40:             # <<<<<<<<<<<<<<
 *     # raise a warning if the version of the Oculus SDK may be incompatible
 *     warnings.warn(
 */
  }

  /* "psychxr/libovr/_libovr.pyx":502
 * 
 * # button types
 * BUTTON_A = capi.ovrButton_A             # <<<<<<<<<<<<<<
 * BUTTON_B = capi.ovrButton_B
 * BUTTON_RTHUMB = capi.ovrButton_RThumb
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_A); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_A, __pyx_t_7) < 0) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":503
 * # button types
 * BUTTON_A = capi.ovrButton_A
 * BUTTON_B = capi.ovrButton_B             # <<<<<<<<<<<<<<
 * BUTTON_RTHUMB = capi.ovrButton_RThumb
 * BUTTON_RSHOULDER = capi.ovrButton_RShoulder
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_B); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_B, __pyx_t_7) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":504
 * BUTTON_A = capi.ovrButton_A
 * BUTTON_B = capi.ovrButton_B
 * BUTTON_RTHUMB = capi.ovrButton_RThumb             # <<<<<<<<<<<<<<
 * BUTTON_RSHOULDER = capi.ovrButton_RShoulder
 * BUTTON_X = capi.ovrButton_X
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_RThumb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_RTHUMB, __pyx_t_7) < 0) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":505
 * BUTTON_B = capi.ovrButton_B
 * BUTTON_RTHUMB = capi.ovrButton_RThumb
 * BUTTON_RSHOULDER = capi.ovrButton_RShoulder             # <<<<<<<<<<<<<<
 * BUTTON_X = capi.ovrButton_X
 * BUTTON_Y = capi.ovrButton_Y
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_RShoulder); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_RSHOULDER, __pyx_t_7) < 0) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":506
 * BUTTON_RTHUMB = capi.ovrButton_RThumb
 * BUTTON_RSHOULDER = capi.ovrButton_RShoulder
 * BUTTON_X = capi.ovrButton_X             # <<<<<<<<<<<<<<
 * BUTTON_Y = capi.ovrButton_Y
 * BUTTON_LTHUMB = capi.ovrButton_LThumb
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_X); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_X, __pyx_t_7) < 0) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":507
 * BUTTON_RSHOULDER = capi.ovrButton_RShoulder
 * BUTTON_X = capi.ovrButton_X
 * BUTTON_Y = capi.ovrButton_Y             # <<<<<<<<<<<<<<
 * BUTTON_LTHUMB = capi.ovrButton_LThumb
 * BUTTON_LSHOULDER = capi.ovrButton_LShoulder
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Y); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_Y, __pyx_t_7) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":508
 * BUTTON_X = capi.ovrButton_X
 * BUTTON_Y = capi.ovrButton_Y
 * BUTTON_LTHUMB = capi.ovrButton_LThumb             # <<<<<<<<<<<<<<
 * BUTTON_LSHOULDER = capi.ovrButton_LShoulder
 * BUTTON_UP = capi.ovrButton_Up
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_LThumb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_LTHUMB, __pyx_t_7) < 0) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":509
 * BUTTON_Y = capi.ovrButton_Y
 * BUTTON_LTHUMB = capi.ovrButton_LThumb
 * BUTTON_LSHOULDER = capi.ovrButton_LShoulder             # <<<<<<<<<<<<<<
 * BUTTON_UP = capi.ovrButton_Up
 * BUTTON_DOWN = capi.ovrButton_Down
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_LShoulder); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_LSHOULDER, __pyx_t_7) < 0) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":510
 * BUTTON_LTHUMB = capi.ovrButton_LThumb
 * BUTTON_LSHOULDER = capi.ovrButton_LShoulder
 * BUTTON_UP = capi.ovrButton_Up             # <<<<<<<<<<<<<<
 * BUTTON_DOWN = capi.ovrButton_Down
 * BUTTON_LEFT = capi.ovrButton_Left
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Up); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_UP, __pyx_t_7) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":511
 * BUTTON_LSHOULDER = capi.ovrButton_LShoulder
 * BUTTON_UP = capi.ovrButton_Up
 * BUTTON_DOWN = capi.ovrButton_Down             # <<<<<<<<<<<<<<
 * BUTTON_LEFT = capi.ovrButton_Left
 * BUTTON_RIGHT = capi.ovrButton_Right
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Down); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_DOWN, __pyx_t_7) < 0) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":512
 * BUTTON_UP = capi.ovrButton_Up
 * BUTTON_DOWN = capi.ovrButton_Down
 * BUTTON_LEFT = capi.ovrButton_Left             # <<<<<<<<<<<<<<
 * BUTTON_RIGHT = capi.ovrButton_Right
 * BUTTON_ENTER = capi.ovrButton_Enter
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Left); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_LEFT, __pyx_t_7) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":513
 * BUTTON_DOWN = capi.ovrButton_Down
 * BUTTON_LEFT = capi.ovrButton_Left
 * BUTTON_RIGHT = capi.ovrButton_Right             # <<<<<<<<<<<<<<
 * BUTTON_ENTER = capi.ovrButton_Enter
 * BUTTON_BACK = capi.ovrButton_Back
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Right); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_RIGHT, __pyx_t_7) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":514
 * BUTTON_LEFT = capi.ovrButton_Left
 * BUTTON_RIGHT = capi.ovrButton_Right
 * BUTTON_ENTER = capi.ovrButton_Enter             # <<<<<<<<<<<<<<
 * BUTTON_BACK = capi.ovrButton_Back
 * BUTTON_VOLUP = capi.ovrButton_VolUp
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_ENTER, __pyx_t_7) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":515
 * BUTTON_RIGHT = capi.ovrButton_Right
 * BUTTON_ENTER = capi.ovrButton_Enter
 * BUTTON_BACK = capi.ovrButton_Back             # <<<<<<<<<<<<<<
 * BUTTON_VOLUP = capi.ovrButton_VolUp
 * BUTTON_VOLDOWN = capi.ovrButton_VolDown
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Back); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_BACK, __pyx_t_7) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":516
 * BUTTON_ENTER = capi.ovrButton_Enter
 * BUTTON_BACK = capi.ovrButton_Back
 * BUTTON_VOLUP = capi.ovrButton_VolUp             # <<<<<<<<<<<<<<
 * BUTTON_VOLDOWN = capi.ovrButton_VolDown
 * BUTTON_HOME = capi.ovrButton_Home
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_VolUp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_VOLUP, __pyx_t_7) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":517
 * BUTTON_BACK = capi.ovrButton_Back
 * BUTTON_VOLUP = capi.ovrButton_VolUp
 * BUTTON_VOLDOWN = capi.ovrButton_VolDown             # <<<<<<<<<<<<<<
 * BUTTON_HOME = capi.ovrButton_Home
 * BUTTON_PRIVATE = capi.ovrButton_Private
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_VolDown); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_VOLDOWN, __pyx_t_7) < 0) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":518
 * BUTTON_VOLUP = capi.ovrButton_VolUp
 * BUTTON_VOLDOWN = capi.ovrButton_VolDown
 * BUTTON_HOME = capi.ovrButton_Home             # <<<<<<<<<<<<<<
 * BUTTON_PRIVATE = capi.ovrButton_Private
 * BUTTON_RMASK = capi.ovrButton_RMask
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Home); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_HOME, __pyx_t_7) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":519
 * BUTTON_VOLDOWN = capi.ovrButton_VolDown
 * BUTTON_HOME = capi.ovrButton_Home
 * BUTTON_PRIVATE = capi.ovrButton_Private             # <<<<<<<<<<<<<<
 * BUTTON_RMASK = capi.ovrButton_RMask
 * BUTTON_LMASK = capi.ovrButton_LMask
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_Private); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_PRIVATE, __pyx_t_7) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":520
 * BUTTON_HOME = capi.ovrButton_Home
 * BUTTON_PRIVATE = capi.ovrButton_Private
 * BUTTON_RMASK = capi.ovrButton_RMask             # <<<<<<<<<<<<<<
 * BUTTON_LMASK = capi.ovrButton_LMask
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_RMask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_RMASK, __pyx_t_7) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":521
 * BUTTON_PRIVATE = capi.ovrButton_Private
 * BUTTON_RMASK = capi.ovrButton_RMask
 * BUTTON_LMASK = capi.ovrButton_LMask             # <<<<<<<<<<<<<<
 * 
 * # touch types
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrButton(ovrButton_LMask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUTTON_LMASK, __pyx_t_7) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":524
 * 
 * # touch types
 * TOUCH_A = capi.ovrTouch_A             # <<<<<<<<<<<<<<
 * TOUCH_B = capi.ovrTouch_B
 * TOUCH_RTHUMB = capi.ovrTouch_RThumb
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_A); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_A, __pyx_t_7) < 0) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":525
 * # touch types
 * TOUCH_A = capi.ovrTouch_A
 * TOUCH_B = capi.ovrTouch_B             # <<<<<<<<<<<<<<
 * TOUCH_RTHUMB = capi.ovrTouch_RThumb
 * TOUCH_RTHUMBREST = capi.ovrTouch_RThumbRest
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_B); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_B, __pyx_t_7) < 0) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":526
 * TOUCH_A = capi.ovrTouch_A
 * TOUCH_B = capi.ovrTouch_B
 * TOUCH_RTHUMB = capi.ovrTouch_RThumb             # <<<<<<<<<<<<<<
 * TOUCH_RTHUMBREST = capi.ovrTouch_RThumbRest
 * TOUCH_X = capi.ovrTouch_X
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RThumb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_RTHUMB, __pyx_t_7) < 0) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":527
 * TOUCH_B = capi.ovrTouch_B
 * TOUCH_RTHUMB = capi.ovrTouch_RThumb
 * TOUCH_RTHUMBREST = capi.ovrTouch_RThumbRest             # <<<<<<<<<<<<<<
 * TOUCH_X = capi.ovrTouch_X
 * TOUCH_Y = capi.ovrTouch_Y
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RThumbRest); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_RTHUMBREST, __pyx_t_7) < 0) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":528
 * TOUCH_RTHUMB = capi.ovrTouch_RThumb
 * TOUCH_RTHUMBREST = capi.ovrTouch_RThumbRest
 * TOUCH_X = capi.ovrTouch_X             # <<<<<<<<<<<<<<
 * TOUCH_Y = capi.ovrTouch_Y
 * TOUCH_LTHUMB = capi.ovrTouch_LThumb
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_X); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_X, __pyx_t_7) < 0) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":529
 * TOUCH_RTHUMBREST = capi.ovrTouch_RThumbRest
 * TOUCH_X = capi.ovrTouch_X
 * TOUCH_Y = capi.ovrTouch_Y             # <<<<<<<<<<<<<<
 * TOUCH_LTHUMB = capi.ovrTouch_LThumb
 * TOUCH_LTHUMBREST = capi.ovrTouch_LThumbRest
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_Y); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_Y, __pyx_t_7) < 0) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":530
 * TOUCH_X = capi.ovrTouch_X
 * TOUCH_Y = capi.ovrTouch_Y
 * TOUCH_LTHUMB = capi.ovrTouch_LThumb             # <<<<<<<<<<<<<<
 * TOUCH_LTHUMBREST = capi.ovrTouch_LThumbRest
 * TOUCH_LINDEXTRIGGER = capi.ovrTouch_LIndexTrigger
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LThumb); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_LTHUMB, __pyx_t_7) < 0) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":531
 * TOUCH_Y = capi.ovrTouch_Y
 * TOUCH_LTHUMB = capi.ovrTouch_LThumb
 * TOUCH_LTHUMBREST = capi.ovrTouch_LThumbRest             # <<<<<<<<<<<<<<
 * TOUCH_LINDEXTRIGGER = capi.ovrTouch_LIndexTrigger
 * TOUCH_RINDEXPOINTING = capi.ovrTouch_RIndexPointing
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LThumbRest); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_LTHUMBREST, __pyx_t_7) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":532
 * TOUCH_LTHUMB = capi.ovrTouch_LThumb
 * TOUCH_LTHUMBREST = capi.ovrTouch_LThumbRest
 * TOUCH_LINDEXTRIGGER = capi.ovrTouch_LIndexTrigger             # <<<<<<<<<<<<<<
 * TOUCH_RINDEXPOINTING = capi.ovrTouch_RIndexPointing
 * TOUCH_RTHUMBUP = capi.ovrTouch_RThumbUp
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LIndexTrigger); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_LINDEXTRIGGER, __pyx_t_7) < 0) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":533
 * TOUCH_LTHUMBREST = capi.ovrTouch_LThumbRest
 * TOUCH_LINDEXTRIGGER = capi.ovrTouch_LIndexTrigger
 * TOUCH_RINDEXPOINTING = capi.ovrTouch_RIndexPointing             # <<<<<<<<<<<<<<
 * TOUCH_RTHUMBUP = capi.ovrTouch_RThumbUp
 * TOUCH_LINDEXPOINTING = capi.ovrTouch_LIndexPointing
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RIndexPointing); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_RINDEXPOINTING, __pyx_t_7) < 0) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":534
 * TOUCH_LINDEXTRIGGER = capi.ovrTouch_LIndexTrigger
 * TOUCH_RINDEXPOINTING = capi.ovrTouch_RIndexPointing
 * TOUCH_RTHUMBUP = capi.ovrTouch_RThumbUp             # <<<<<<<<<<<<<<
 * TOUCH_LINDEXPOINTING = capi.ovrTouch_LIndexPointing
 * TOUCH_LTHUMBUP = capi.ovrTouch_LThumbUp
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RThumbUp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_RTHUMBUP, __pyx_t_7) < 0) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":535
 * TOUCH_RINDEXPOINTING = capi.ovrTouch_RIndexPointing
 * TOUCH_RTHUMBUP = capi.ovrTouch_RThumbUp
 * TOUCH_LINDEXPOINTING = capi.ovrTouch_LIndexPointing             # <<<<<<<<<<<<<<
 * TOUCH_LTHUMBUP = capi.ovrTouch_LThumbUp
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LIndexPointing); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_LINDEXPOINTING, __pyx_t_7) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":536
 * TOUCH_RTHUMBUP = capi.ovrTouch_RThumbUp
 * TOUCH_LINDEXPOINTING = capi.ovrTouch_LIndexPointing
 * TOUCH_LTHUMBUP = capi.ovrTouch_LThumbUp             # <<<<<<<<<<<<<<
 * 
 * # controller types
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LThumbUp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOUCH_LTHUMBUP, __pyx_t_7) < 0) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":539
 * 
 * # controller types
 * CONTROLLER_TYPE_NONE = capi.ovrControllerType_None             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_XBOX = capi.ovrControllerType_XBox
 * CONTROLLER_TYPE_REMOTE = capi.ovrControllerType_Remote
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_NONE, __pyx_t_7) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":540
 * # controller types
 * CONTROLLER_TYPE_NONE = capi.ovrControllerType_None
 * CONTROLLER_TYPE_XBOX = capi.ovrControllerType_XBox             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_REMOTE = capi.ovrControllerType_Remote
 * CONTROLLER_TYPE_TOUCH = capi.ovrControllerType_Touch
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_XBox); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_XBOX, __pyx_t_7) < 0) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":541
 * CONTROLLER_TYPE_NONE = capi.ovrControllerType_None
 * CONTROLLER_TYPE_XBOX = capi.ovrControllerType_XBox
 * CONTROLLER_TYPE_REMOTE = capi.ovrControllerType_Remote             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_TOUCH = capi.ovrControllerType_Touch
 * CONTROLLER_TYPE_LTOUCH = capi.ovrControllerType_LTouch
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_Remote); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_REMOTE, __pyx_t_7) < 0) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":542
 * CONTROLLER_TYPE_XBOX = capi.ovrControllerType_XBox
 * CONTROLLER_TYPE_REMOTE = capi.ovrControllerType_Remote
 * CONTROLLER_TYPE_TOUCH = capi.ovrControllerType_Touch             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_LTOUCH = capi.ovrControllerType_LTouch
 * CONTROLLER_TYPE_RTOUCH = capi.ovrControllerType_RTouch
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_Touch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_TOUCH, __pyx_t_7) < 0) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":543
 * CONTROLLER_TYPE_REMOTE = capi.ovrControllerType_Remote
 * CONTROLLER_TYPE_TOUCH = capi.ovrControllerType_Touch
 * CONTROLLER_TYPE_LTOUCH = capi.ovrControllerType_LTouch             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_RTOUCH = capi.ovrControllerType_RTouch
 * CONTROLLER_TYPE_OBJECT0 = capi.ovrControllerType_Object0
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_LTouch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_LTOUCH, __pyx_t_7) < 0) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":544
 * CONTROLLER_TYPE_TOUCH = capi.ovrControllerType_Touch
 * CONTROLLER_TYPE_LTOUCH = capi.ovrControllerType_LTouch
 * CONTROLLER_TYPE_RTOUCH = capi.ovrControllerType_RTouch             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_OBJECT0 = capi.ovrControllerType_Object0
 * CONTROLLER_TYPE_OBJECT1 = capi.ovrControllerType_Object1
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_RTouch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_RTOUCH, __pyx_t_7) < 0) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":545
 * CONTROLLER_TYPE_LTOUCH = capi.ovrControllerType_LTouch
 * CONTROLLER_TYPE_RTOUCH = capi.ovrControllerType_RTouch
 * CONTROLLER_TYPE_OBJECT0 = capi.ovrControllerType_Object0             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_OBJECT1 = capi.ovrControllerType_Object1
 * CONTROLLER_TYPE_OBJECT2 = capi.ovrControllerType_Object2
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_Object0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_OBJECT0, __pyx_t_7) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":546
 * CONTROLLER_TYPE_RTOUCH = capi.ovrControllerType_RTouch
 * CONTROLLER_TYPE_OBJECT0 = capi.ovrControllerType_Object0
 * CONTROLLER_TYPE_OBJECT1 = capi.ovrControllerType_Object1             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_OBJECT2 = capi.ovrControllerType_Object2
 * CONTROLLER_TYPE_OBJECT3 = capi.ovrControllerType_Object3
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_Object1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_OBJECT1, __pyx_t_7) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":547
 * CONTROLLER_TYPE_OBJECT0 = capi.ovrControllerType_Object0
 * CONTROLLER_TYPE_OBJECT1 = capi.ovrControllerType_Object1
 * CONTROLLER_TYPE_OBJECT2 = capi.ovrControllerType_Object2             # <<<<<<<<<<<<<<
 * CONTROLLER_TYPE_OBJECT3 = capi.ovrControllerType_Object3
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_Object2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_OBJECT2, __pyx_t_7) < 0) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":548
 * CONTROLLER_TYPE_OBJECT1 = capi.ovrControllerType_Object1
 * CONTROLLER_TYPE_OBJECT2 = capi.ovrControllerType_Object2
 * CONTROLLER_TYPE_OBJECT3 = capi.ovrControllerType_Object3             # <<<<<<<<<<<<<<
 * 
 * # return success codes, values other than 'SUCCESS' are conditional
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrControllerType(ovrControllerType_Object3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONTROLLER_TYPE_OBJECT3, __pyx_t_7) < 0) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":551
 * 
 * # return success codes, values other than 'SUCCESS' are conditional
 * SUCCESS = capi.ovrSuccess             # <<<<<<<<<<<<<<
 * SUCCESS_NOT_VISIBLE = capi.ovrSuccess_NotVisible
 * SUCCESS_DEVICE_UNAVAILABLE = capi.ovrSuccess_DeviceUnavailable
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrSuccessType(ovrSuccess); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUCCESS, __pyx_t_7) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":552
 * # return success codes, values other than 'SUCCESS' are conditional
 * SUCCESS = capi.ovrSuccess
 * SUCCESS_NOT_VISIBLE = capi.ovrSuccess_NotVisible             # <<<<<<<<<<<<<<
 * SUCCESS_DEVICE_UNAVAILABLE = capi.ovrSuccess_DeviceUnavailable
 * SUCCESS_BOUNDARY_INVALID = capi.ovrSuccess_BoundaryInvalid
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrSuccessTypes(ovrSuccess_NotVisible); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUCCESS_NOT_VISIBLE, __pyx_t_7) < 0) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":553
 * SUCCESS = capi.ovrSuccess
 * SUCCESS_NOT_VISIBLE = capi.ovrSuccess_NotVisible
 * SUCCESS_DEVICE_UNAVAILABLE = capi.ovrSuccess_DeviceUnavailable             # <<<<<<<<<<<<<<
 * SUCCESS_BOUNDARY_INVALID = capi.ovrSuccess_BoundaryInvalid
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrSuccessTypes(ovrSuccess_DeviceUnavailable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUCCESS_DEVICE_UNAVAILABLE, __pyx_t_7) < 0) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":554
 * SUCCESS_NOT_VISIBLE = capi.ovrSuccess_NotVisible
 * SUCCESS_DEVICE_UNAVAILABLE = capi.ovrSuccess_DeviceUnavailable
 * SUCCESS_BOUNDARY_INVALID = capi.ovrSuccess_BoundaryInvalid             # <<<<<<<<<<<<<<
 * 
 * # return error code, not all of these are applicable
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrSuccessTypes(ovrSuccess_BoundaryInvalid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUCCESS_BOUNDARY_INVALID, __pyx_t_7) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":557
 * 
 * # return error code, not all of these are applicable
 * ERROR_MEMORY_ALLOCATION_FAILURE = capi.ovrError_MemoryAllocationFailure             # <<<<<<<<<<<<<<
 * ERROR_INVALID_SESSION = capi.ovrError_InvalidSession
 * ERROR_TIMEOUT = capi.ovrError_Timeout
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_MemoryAllocationFailure); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_MEMORY_ALLOCATION_FAILURE, __pyx_t_7) < 0) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":558
 * # return error code, not all of these are applicable
 * ERROR_MEMORY_ALLOCATION_FAILURE = capi.ovrError_MemoryAllocationFailure
 * ERROR_INVALID_SESSION = capi.ovrError_InvalidSession             # <<<<<<<<<<<<<<
 * ERROR_TIMEOUT = capi.ovrError_Timeout
 * ERROR_NOT_INITIALIZED = capi.ovrError_NotInitialized
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_InvalidSession); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INVALID_SESSION, __pyx_t_7) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":559
 * ERROR_MEMORY_ALLOCATION_FAILURE = capi.ovrError_MemoryAllocationFailure
 * ERROR_INVALID_SESSION = capi.ovrError_InvalidSession
 * ERROR_TIMEOUT = capi.ovrError_Timeout             # <<<<<<<<<<<<<<
 * ERROR_NOT_INITIALIZED = capi.ovrError_NotInitialized
 * ERROR_INVALID_PARAMETER = capi.ovrError_InvalidParameter
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_Timeout); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_TIMEOUT, __pyx_t_7) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":560
 * ERROR_INVALID_SESSION = capi.ovrError_InvalidSession
 * ERROR_TIMEOUT = capi.ovrError_Timeout
 * ERROR_NOT_INITIALIZED = capi.ovrError_NotInitialized             # <<<<<<<<<<<<<<
 * ERROR_INVALID_PARAMETER = capi.ovrError_InvalidParameter
 * ERROR_SERVICE_ERROR = capi.ovrError_ServiceError
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_NotInitialized); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_NOT_INITIALIZED, __pyx_t_7) < 0) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":561
 * ERROR_TIMEOUT = capi.ovrError_Timeout
 * ERROR_NOT_INITIALIZED = capi.ovrError_NotInitialized
 * ERROR_INVALID_PARAMETER = capi.ovrError_InvalidParameter             # <<<<<<<<<<<<<<
 * ERROR_SERVICE_ERROR = capi.ovrError_ServiceError
 * ERROR_NO_HMD = capi.ovrError_NoHmd
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_InvalidParameter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INVALID_PARAMETER, __pyx_t_7) < 0) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":562
 * ERROR_NOT_INITIALIZED = capi.ovrError_NotInitialized
 * ERROR_INVALID_PARAMETER = capi.ovrError_InvalidParameter
 * ERROR_SERVICE_ERROR = capi.ovrError_ServiceError             # <<<<<<<<<<<<<<
 * ERROR_NO_HMD = capi.ovrError_NoHmd
 * ERROR_UNSUPPORTED = capi.ovrError_Unsupported
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ServiceError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_SERVICE_ERROR, __pyx_t_7) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":563
 * ERROR_INVALID_PARAMETER = capi.ovrError_InvalidParameter
 * ERROR_SERVICE_ERROR = capi.ovrError_ServiceError
 * ERROR_NO_HMD = capi.ovrError_NoHmd             # <<<<<<<<<<<<<<
 * ERROR_UNSUPPORTED = capi.ovrError_Unsupported
 * ERROR_DEVICE_UNAVAILABLE = capi.ovrError_DeviceUnavailable
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_NoHmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_NO_HMD, __pyx_t_7) < 0) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":564
 * ERROR_SERVICE_ERROR = capi.ovrError_ServiceError
 * ERROR_NO_HMD = capi.ovrError_NoHmd
 * ERROR_UNSUPPORTED = capi.ovrError_Unsupported             # <<<<<<<<<<<<<<
 * ERROR_DEVICE_UNAVAILABLE = capi.ovrError_DeviceUnavailable
 * ERROR_INVALID_HEADSET_ORIENTATION = capi.ovrError_InvalidHeadsetOrientation
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_Unsupported); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_UNSUPPORTED, __pyx_t_7) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":565
 * ERROR_NO_HMD = capi.ovrError_NoHmd
 * ERROR_UNSUPPORTED = capi.ovrError_Unsupported
 * ERROR_DEVICE_UNAVAILABLE = capi.ovrError_DeviceUnavailable             # <<<<<<<<<<<<<<
 * ERROR_INVALID_HEADSET_ORIENTATION = capi.ovrError_InvalidHeadsetOrientation
 * ERROR_CLIENT_SKIPPED_DESTROY = capi.ovrError_ClientSkippedDestroy
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_DeviceUnavailable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DEVICE_UNAVAILABLE, __pyx_t_7) < 0) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":566
 * ERROR_UNSUPPORTED = capi.ovrError_Unsupported
 * ERROR_DEVICE_UNAVAILABLE = capi.ovrError_DeviceUnavailable
 * ERROR_INVALID_HEADSET_ORIENTATION = capi.ovrError_InvalidHeadsetOrientation             # <<<<<<<<<<<<<<
 * ERROR_CLIENT_SKIPPED_DESTROY = capi.ovrError_ClientSkippedDestroy
 * ERROR_CLIENT_SKIPPED_SHUTDOWN = capi.ovrError_ClientSkippedShutdown
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_InvalidHeadsetOrientation); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INVALID_HEADSET_ORIENTATIO, __pyx_t_7) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":567
 * ERROR_DEVICE_UNAVAILABLE = capi.ovrError_DeviceUnavailable
 * ERROR_INVALID_HEADSET_ORIENTATION = capi.ovrError_InvalidHeadsetOrientation
 * ERROR_CLIENT_SKIPPED_DESTROY = capi.ovrError_ClientSkippedDestroy             # <<<<<<<<<<<<<<
 * ERROR_CLIENT_SKIPPED_SHUTDOWN = capi.ovrError_ClientSkippedShutdown
 * ERROR_SERVICE_DEADLOCK_DETECTED = capi.ovrError_ServiceDeadlockDetected
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ClientSkippedDestroy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_CLIENT_SKIPPED_DESTROY, __pyx_t_7) < 0) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":568
 * ERROR_INVALID_HEADSET_ORIENTATION = capi.ovrError_InvalidHeadsetOrientation
 * ERROR_CLIENT_SKIPPED_DESTROY = capi.ovrError_ClientSkippedDestroy
 * ERROR_CLIENT_SKIPPED_SHUTDOWN = capi.ovrError_ClientSkippedShutdown             # <<<<<<<<<<<<<<
 * ERROR_SERVICE_DEADLOCK_DETECTED = capi.ovrError_ServiceDeadlockDetected
 * ERROR_INVALID_OPERATION = capi.ovrError_InvalidOperation
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ClientSkippedShutdown); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_CLIENT_SKIPPED_SHUTDOWN, __pyx_t_7) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":569
 * ERROR_CLIENT_SKIPPED_DESTROY = capi.ovrError_ClientSkippedDestroy
 * ERROR_CLIENT_SKIPPED_SHUTDOWN = capi.ovrError_ClientSkippedShutdown
 * ERROR_SERVICE_DEADLOCK_DETECTED = capi.ovrError_ServiceDeadlockDetected             # <<<<<<<<<<<<<<
 * ERROR_INVALID_OPERATION = capi.ovrError_InvalidOperation
 * ERROR_INSUFFICENT_ARRAY_SIZE = capi.ovrError_InsufficientArraySize
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ServiceDeadlockDetected); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_SERVICE_DEADLOCK_DETECTED, __pyx_t_7) < 0) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":570
 * ERROR_CLIENT_SKIPPED_SHUTDOWN = capi.ovrError_ClientSkippedShutdown
 * ERROR_SERVICE_DEADLOCK_DETECTED = capi.ovrError_ServiceDeadlockDetected
 * ERROR_INVALID_OPERATION = capi.ovrError_InvalidOperation             # <<<<<<<<<<<<<<
 * ERROR_INSUFFICENT_ARRAY_SIZE = capi.ovrError_InsufficientArraySize
 * ERROR_NO_EXTERNAL_CAMERA_INFO = capi.ovrError_NoExternalCameraInfo
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_InvalidOperation); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INVALID_OPERATION, __pyx_t_7) < 0) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":571
 * ERROR_SERVICE_DEADLOCK_DETECTED = capi.ovrError_ServiceDeadlockDetected
 * ERROR_INVALID_OPERATION = capi.ovrError_InvalidOperation
 * ERROR_INSUFFICENT_ARRAY_SIZE = capi.ovrError_InsufficientArraySize             # <<<<<<<<<<<<<<
 * ERROR_NO_EXTERNAL_CAMERA_INFO = capi.ovrError_NoExternalCameraInfo
 * ERROR_LOST_TRACKING = capi.ovrError_LostTracking
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_InsufficientArraySize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INSUFFICENT_ARRAY_SIZE, __pyx_t_7) < 0) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":572
 * ERROR_INVALID_OPERATION = capi.ovrError_InvalidOperation
 * ERROR_INSUFFICENT_ARRAY_SIZE = capi.ovrError_InsufficientArraySize
 * ERROR_NO_EXTERNAL_CAMERA_INFO = capi.ovrError_NoExternalCameraInfo             # <<<<<<<<<<<<<<
 * ERROR_LOST_TRACKING = capi.ovrError_LostTracking
 * ERROR_EXTERNAL_CAMERA_INITIALIZED_FAILED = capi.ovrError_ExternalCameraInitializedFailed
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_NoExternalCameraInfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_NO_EXTERNAL_CAMERA_INFO, __pyx_t_7) < 0) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":573
 * ERROR_INSUFFICENT_ARRAY_SIZE = capi.ovrError_InsufficientArraySize
 * ERROR_NO_EXTERNAL_CAMERA_INFO = capi.ovrError_NoExternalCameraInfo
 * ERROR_LOST_TRACKING = capi.ovrError_LostTracking             # <<<<<<<<<<<<<<
 * ERROR_EXTERNAL_CAMERA_INITIALIZED_FAILED = capi.ovrError_ExternalCameraInitializedFailed
 * ERROR_EXTERNAL_CAMERA_CAPTURE_FAILED = capi.ovrError_ExternalCameraCaptureFailed
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_LostTracking); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_LOST_TRACKING, __pyx_t_7) < 0) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":574
 * ERROR_NO_EXTERNAL_CAMERA_INFO = capi.ovrError_NoExternalCameraInfo
 * ERROR_LOST_TRACKING = capi.ovrError_LostTracking
 * ERROR_EXTERNAL_CAMERA_INITIALIZED_FAILED = capi.ovrError_ExternalCameraInitializedFailed             # <<<<<<<<<<<<<<
 * ERROR_EXTERNAL_CAMERA_CAPTURE_FAILED = capi.ovrError_ExternalCameraCaptureFailed
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_BUFFER_SIZE = capi.ovrError_ExternalCameraNameListsBufferSize
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ExternalCameraInitializedFailed); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_EXTERNAL_CAMERA_INITIALIZE, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":575
 * ERROR_LOST_TRACKING = capi.ovrError_LostTracking
 * ERROR_EXTERNAL_CAMERA_INITIALIZED_FAILED = capi.ovrError_ExternalCameraInitializedFailed
 * ERROR_EXTERNAL_CAMERA_CAPTURE_FAILED = capi.ovrError_ExternalCameraCaptureFailed             # <<<<<<<<<<<<<<
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_BUFFER_SIZE = capi.ovrError_ExternalCameraNameListsBufferSize
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_MISMATCH = capi.ovrError_ExternalCameraNameListsMistmatch
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ExternalCameraCaptureFailed); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_EXTERNAL_CAMERA_CAPTURE_FA, __pyx_t_7) < 0) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":576
 * ERROR_EXTERNAL_CAMERA_INITIALIZED_FAILED = capi.ovrError_ExternalCameraInitializedFailed
 * ERROR_EXTERNAL_CAMERA_CAPTURE_FAILED = capi.ovrError_ExternalCameraCaptureFailed
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_BUFFER_SIZE = capi.ovrError_ExternalCameraNameListsBufferSize             # <<<<<<<<<<<<<<
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_MISMATCH = capi.ovrError_ExternalCameraNameListsMistmatch
 * ERROR_EXTERNAL_CAMERA_NOT_CALIBRATED = capi.ovrError_ExternalCameraNotCalibrated
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ExternalCameraNameListsBufferSize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_LISTS, __pyx_t_7) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":577
 * ERROR_EXTERNAL_CAMERA_CAPTURE_FAILED = capi.ovrError_ExternalCameraCaptureFailed
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_BUFFER_SIZE = capi.ovrError_ExternalCameraNameListsBufferSize
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_MISMATCH = capi.ovrError_ExternalCameraNameListsMistmatch             # <<<<<<<<<<<<<<
 * ERROR_EXTERNAL_CAMERA_NOT_CALIBRATED = capi.ovrError_ExternalCameraNotCalibrated
 * ERROR_EXTERNAL_CAMERA_NAME_WRONG_SIZE = capi.ovrError_ExternalCameraNameWrongSize
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ExternalCameraNameListsMistmatch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_LISTS_2, __pyx_t_7) < 0) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":578
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_BUFFER_SIZE = capi.ovrError_ExternalCameraNameListsBufferSize
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_MISMATCH = capi.ovrError_ExternalCameraNameListsMistmatch
 * ERROR_EXTERNAL_CAMERA_NOT_CALIBRATED = capi.ovrError_ExternalCameraNotCalibrated             # <<<<<<<<<<<<<<
 * ERROR_EXTERNAL_CAMERA_NAME_WRONG_SIZE = capi.ovrError_ExternalCameraNameWrongSize
 * ERROR_AUDIO_DEVICE_NOT_FOUND = capi.ovrError_AudioDeviceNotFound
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ExternalCameraNotCalibrated); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_EXTERNAL_CAMERA_NOT_CALIBR, __pyx_t_7) < 0) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":579
 * ERROR_EXTERNAL_CAMERA_NAME_LISTS_MISMATCH = capi.ovrError_ExternalCameraNameListsMistmatch
 * ERROR_EXTERNAL_CAMERA_NOT_CALIBRATED = capi.ovrError_ExternalCameraNotCalibrated
 * ERROR_EXTERNAL_CAMERA_NAME_WRONG_SIZE = capi.ovrError_ExternalCameraNameWrongSize             # <<<<<<<<<<<<<<
 * ERROR_AUDIO_DEVICE_NOT_FOUND = capi.ovrError_AudioDeviceNotFound
 * ERROR_AUDIO_COM_ERROR = capi.ovrError_AudioComError
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ExternalCameraNameWrongSize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_EXTERNAL_CAMERA_NAME_WRONG, __pyx_t_7) < 0) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":580
 * ERROR_EXTERNAL_CAMERA_NOT_CALIBRATED = capi.ovrError_ExternalCameraNotCalibrated
 * ERROR_EXTERNAL_CAMERA_NAME_WRONG_SIZE = capi.ovrError_ExternalCameraNameWrongSize
 * ERROR_AUDIO_DEVICE_NOT_FOUND = capi.ovrError_AudioDeviceNotFound             # <<<<<<<<<<<<<<
 * ERROR_AUDIO_COM_ERROR = capi.ovrError_AudioComError
 * ERROR_INITIALIZE = capi.ovrError_Initialize
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_AudioDeviceNotFound); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_AUDIO_DEVICE_NOT_FOUND, __pyx_t_7) < 0) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":581
 * ERROR_EXTERNAL_CAMERA_NAME_WRONG_SIZE = capi.ovrError_ExternalCameraNameWrongSize
 * ERROR_AUDIO_DEVICE_NOT_FOUND = capi.ovrError_AudioDeviceNotFound
 * ERROR_AUDIO_COM_ERROR = capi.ovrError_AudioComError             # <<<<<<<<<<<<<<
 * ERROR_INITIALIZE = capi.ovrError_Initialize
 * ERROR_LIB_LOAD = capi.ovrError_LibLoad
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_AudioComError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_AUDIO_COM_ERROR, __pyx_t_7) < 0) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":582
 * ERROR_AUDIO_DEVICE_NOT_FOUND = capi.ovrError_AudioDeviceNotFound
 * ERROR_AUDIO_COM_ERROR = capi.ovrError_AudioComError
 * ERROR_INITIALIZE = capi.ovrError_Initialize             # <<<<<<<<<<<<<<
 * ERROR_LIB_LOAD = capi.ovrError_LibLoad
 * ERROR_SERVICE_CONNECTION = capi.ovrError_ServiceConnection
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_Initialize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INITIALIZE, __pyx_t_7) < 0) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":583
 * ERROR_AUDIO_COM_ERROR = capi.ovrError_AudioComError
 * ERROR_INITIALIZE = capi.ovrError_Initialize
 * ERROR_LIB_LOAD = capi.ovrError_LibLoad             # <<<<<<<<<<<<<<
 * ERROR_SERVICE_CONNECTION = capi.ovrError_ServiceConnection
 * ERROR_SERVICE_VERSION = capi.ovrError_ServiceVersion
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_LibLoad); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_LIB_LOAD, __pyx_t_7) < 0) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":584
 * ERROR_INITIALIZE = capi.ovrError_Initialize
 * ERROR_LIB_LOAD = capi.ovrError_LibLoad
 * ERROR_SERVICE_CONNECTION = capi.ovrError_ServiceConnection             # <<<<<<<<<<<<<<
 * ERROR_SERVICE_VERSION = capi.ovrError_ServiceVersion
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleOS
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ServiceConnection); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_SERVICE_CONNECTION, __pyx_t_7) < 0) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":585
 * ERROR_LIB_LOAD = capi.ovrError_LibLoad
 * ERROR_SERVICE_CONNECTION = capi.ovrError_ServiceConnection
 * ERROR_SERVICE_VERSION = capi.ovrError_ServiceVersion             # <<<<<<<<<<<<<<
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleOS
 * ERROR_DISPLAY_INIT = capi.ovrError_DisplayInit
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ServiceVersion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_SERVICE_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":586
 * ERROR_SERVICE_CONNECTION = capi.ovrError_ServiceConnection
 * ERROR_SERVICE_VERSION = capi.ovrError_ServiceVersion
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleOS             # <<<<<<<<<<<<<<
 * ERROR_DISPLAY_INIT = capi.ovrError_DisplayInit
 * ERROR_SERVER_START = capi.ovrError_ServerStart
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_IncompatibleOS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INCOMPATIBLE_OS, __pyx_t_7) < 0) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":587
 * ERROR_SERVICE_VERSION = capi.ovrError_ServiceVersion
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleOS
 * ERROR_DISPLAY_INIT = capi.ovrError_DisplayInit             # <<<<<<<<<<<<<<
 * ERROR_SERVER_START = capi.ovrError_ServerStart
 * ERROR_REINITIALIZATION = capi.ovrError_Reinitialization
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_DisplayInit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DISPLAY_INIT, __pyx_t_7) < 0) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":588
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleOS
 * ERROR_DISPLAY_INIT = capi.ovrError_DisplayInit
 * ERROR_SERVER_START = capi.ovrError_ServerStart             # <<<<<<<<<<<<<<
 * ERROR_REINITIALIZATION = capi.ovrError_Reinitialization
 * ERROR_MISMATCHED_ADAPTERS = capi.ovrError_MismatchedAdapters
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ServerStart); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_SERVER_START, __pyx_t_7) < 0) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":589
 * ERROR_DISPLAY_INIT = capi.ovrError_DisplayInit
 * ERROR_SERVER_START = capi.ovrError_ServerStart
 * ERROR_REINITIALIZATION = capi.ovrError_Reinitialization             # <<<<<<<<<<<<<<
 * ERROR_MISMATCHED_ADAPTERS = capi.ovrError_MismatchedAdapters
 * ERROR_LEAKING_RESOURCES = capi.ovrError_LeakingResources
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_Reinitialization); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_REINITIALIZATION, __pyx_t_7) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":590
 * ERROR_SERVER_START = capi.ovrError_ServerStart
 * ERROR_REINITIALIZATION = capi.ovrError_Reinitialization
 * ERROR_MISMATCHED_ADAPTERS = capi.ovrError_MismatchedAdapters             # <<<<<<<<<<<<<<
 * ERROR_LEAKING_RESOURCES = capi.ovrError_LeakingResources
 * ERROR_CLIENT_VERSION = capi.ovrError_ClientVersion
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_MismatchedAdapters); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_MISMATCHED_ADAPTERS, __pyx_t_7) < 0) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":591
 * ERROR_REINITIALIZATION = capi.ovrError_Reinitialization
 * ERROR_MISMATCHED_ADAPTERS = capi.ovrError_MismatchedAdapters
 * ERROR_LEAKING_RESOURCES = capi.ovrError_LeakingResources             # <<<<<<<<<<<<<<
 * ERROR_CLIENT_VERSION = capi.ovrError_ClientVersion
 * ERROR_OUT_OF_DATE_OS = capi.ovrError_OutOfDateOS
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_LeakingResources); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_LEAKING_RESOURCES, __pyx_t_7) < 0) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":592
 * ERROR_MISMATCHED_ADAPTERS = capi.ovrError_MismatchedAdapters
 * ERROR_LEAKING_RESOURCES = capi.ovrError_LeakingResources
 * ERROR_CLIENT_VERSION = capi.ovrError_ClientVersion             # <<<<<<<<<<<<<<
 * ERROR_OUT_OF_DATE_OS = capi.ovrError_OutOfDateOS
 * ERROR_OUT_OF_DATE_GFX_DRIVER = capi.ovrError_OutOfDateGfxDriver
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ClientVersion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_CLIENT_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":593
 * ERROR_LEAKING_RESOURCES = capi.ovrError_LeakingResources
 * ERROR_CLIENT_VERSION = capi.ovrError_ClientVersion
 * ERROR_OUT_OF_DATE_OS = capi.ovrError_OutOfDateOS             # <<<<<<<<<<<<<<
 * ERROR_OUT_OF_DATE_GFX_DRIVER = capi.ovrError_OutOfDateGfxDriver
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleGPU
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_OutOfDateOS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_OUT_OF_DATE_OS, __pyx_t_7) < 0) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":594
 * ERROR_CLIENT_VERSION = capi.ovrError_ClientVersion
 * ERROR_OUT_OF_DATE_OS = capi.ovrError_OutOfDateOS
 * ERROR_OUT_OF_DATE_GFX_DRIVER = capi.ovrError_OutOfDateGfxDriver             # <<<<<<<<<<<<<<
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleGPU
 * ERROR_NO_VALID_VR_DISPLAY_SYSTEM = capi.ovrError_NoValidVRDisplaySystem
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_OutOfDateGfxDriver); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_OUT_OF_DATE_GFX_DRIVER, __pyx_t_7) < 0) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":595
 * ERROR_OUT_OF_DATE_OS = capi.ovrError_OutOfDateOS
 * ERROR_OUT_OF_DATE_GFX_DRIVER = capi.ovrError_OutOfDateGfxDriver
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleGPU             # <<<<<<<<<<<<<<
 * ERROR_NO_VALID_VR_DISPLAY_SYSTEM = capi.ovrError_NoValidVRDisplaySystem
 * ERROR_OBSOLETE = capi.ovrError_Obsolete
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_IncompatibleGPU); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INCOMPATIBLE_OS, __pyx_t_7) < 0) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":596
 * ERROR_OUT_OF_DATE_GFX_DRIVER = capi.ovrError_OutOfDateGfxDriver
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleGPU
 * ERROR_NO_VALID_VR_DISPLAY_SYSTEM = capi.ovrError_NoValidVRDisplaySystem             # <<<<<<<<<<<<<<
 * ERROR_OBSOLETE = capi.ovrError_Obsolete
 * ERROR_DISABLED_OR_DEFAULT_ADAPTER = capi.ovrError_DisabledOrDefaultAdapter
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_NoValidVRDisplaySystem); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_NO_VALID_VR_DISPLAY_SYSTEM, __pyx_t_7) < 0) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":597
 * ERROR_INCOMPATIBLE_OS = capi.ovrError_IncompatibleGPU
 * ERROR_NO_VALID_VR_DISPLAY_SYSTEM = capi.ovrError_NoValidVRDisplaySystem
 * ERROR_OBSOLETE = capi.ovrError_Obsolete             # <<<<<<<<<<<<<<
 * ERROR_DISABLED_OR_DEFAULT_ADAPTER = capi.ovrError_DisabledOrDefaultAdapter
 * ERROR_HYBRID_GRAPHICS_NOT_SUPPORTED = capi.ovrError_HybridGraphicsNotSupported
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_Obsolete); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_OBSOLETE, __pyx_t_7) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":598
 * ERROR_NO_VALID_VR_DISPLAY_SYSTEM = capi.ovrError_NoValidVRDisplaySystem
 * ERROR_OBSOLETE = capi.ovrError_Obsolete
 * ERROR_DISABLED_OR_DEFAULT_ADAPTER = capi.ovrError_DisabledOrDefaultAdapter             # <<<<<<<<<<<<<<
 * ERROR_HYBRID_GRAPHICS_NOT_SUPPORTED = capi.ovrError_HybridGraphicsNotSupported
 * ERROR_DISPLAY_MANAGER_INIT = capi.ovrError_DisplayManagerInit
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_DisabledOrDefaultAdapter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DISABLED_OR_DEFAULT_ADAPTE, __pyx_t_7) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":599
 * ERROR_OBSOLETE = capi.ovrError_Obsolete
 * ERROR_DISABLED_OR_DEFAULT_ADAPTER = capi.ovrError_DisabledOrDefaultAdapter
 * ERROR_HYBRID_GRAPHICS_NOT_SUPPORTED = capi.ovrError_HybridGraphicsNotSupported             # <<<<<<<<<<<<<<
 * ERROR_DISPLAY_MANAGER_INIT = capi.ovrError_DisplayManagerInit
 * ERROR_TRACKER_DRIVER_INIT = capi.ovrError_TrackerDriverInit
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_HybridGraphicsNotSupported); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_HYBRID_GRAPHICS_NOT_SUPPOR, __pyx_t_7) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":600
 * ERROR_DISABLED_OR_DEFAULT_ADAPTER = capi.ovrError_DisabledOrDefaultAdapter
 * ERROR_HYBRID_GRAPHICS_NOT_SUPPORTED = capi.ovrError_HybridGraphicsNotSupported
 * ERROR_DISPLAY_MANAGER_INIT = capi.ovrError_DisplayManagerInit             # <<<<<<<<<<<<<<
 * ERROR_TRACKER_DRIVER_INIT = capi.ovrError_TrackerDriverInit
 * ERROR_LIB_SIGN_CHECK = capi.ovrError_LibSignCheck
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_DisplayManagerInit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DISPLAY_MANAGER_INIT, __pyx_t_7) < 0) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":601
 * ERROR_HYBRID_GRAPHICS_NOT_SUPPORTED = capi.ovrError_HybridGraphicsNotSupported
 * ERROR_DISPLAY_MANAGER_INIT = capi.ovrError_DisplayManagerInit
 * ERROR_TRACKER_DRIVER_INIT = capi.ovrError_TrackerDriverInit             # <<<<<<<<<<<<<<
 * ERROR_LIB_SIGN_CHECK = capi.ovrError_LibSignCheck
 * ERROR_LIB_PATH = capi.ovrError_LibPath
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_TrackerDriverInit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_TRACKER_DRIVER_INIT, __pyx_t_7) < 0) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":602
 * ERROR_DISPLAY_MANAGER_INIT = capi.ovrError_DisplayManagerInit
 * ERROR_TRACKER_DRIVER_INIT = capi.ovrError_TrackerDriverInit
 * ERROR_LIB_SIGN_CHECK = capi.ovrError_LibSignCheck             # <<<<<<<<<<<<<<
 * ERROR_LIB_PATH = capi.ovrError_LibPath
 * ERROR_LIB_SYMBOLS = capi.ovrError_LibSymbols
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_LibSignCheck); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_LIB_SIGN_CHECK, __pyx_t_7) < 0) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":603
 * ERROR_TRACKER_DRIVER_INIT = capi.ovrError_TrackerDriverInit
 * ERROR_LIB_SIGN_CHECK = capi.ovrError_LibSignCheck
 * ERROR_LIB_PATH = capi.ovrError_LibPath             # <<<<<<<<<<<<<<
 * ERROR_LIB_SYMBOLS = capi.ovrError_LibSymbols
 * ERROR_REMOTE_SESSION = capi.ovrError_RemoteSession
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_LibPath); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_LIB_PATH, __pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":604
 * ERROR_LIB_SIGN_CHECK = capi.ovrError_LibSignCheck
 * ERROR_LIB_PATH = capi.ovrError_LibPath
 * ERROR_LIB_SYMBOLS = capi.ovrError_LibSymbols             # <<<<<<<<<<<<<<
 * ERROR_REMOTE_SESSION = capi.ovrError_RemoteSession
 * ERROR_INITIALIZE_VULKAN = capi.ovrError_InitializeVulkan
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_LibSymbols); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_LIB_SYMBOLS, __pyx_t_7) < 0) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":605
 * ERROR_LIB_PATH = capi.ovrError_LibPath
 * ERROR_LIB_SYMBOLS = capi.ovrError_LibSymbols
 * ERROR_REMOTE_SESSION = capi.ovrError_RemoteSession             # <<<<<<<<<<<<<<
 * ERROR_INITIALIZE_VULKAN = capi.ovrError_InitializeVulkan
 * ERROR_BLACKLISTED_GFX_DRIVER = capi.ovrError_BlacklistedGfxDriver
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_RemoteSession); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_REMOTE_SESSION, __pyx_t_7) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":606
 * ERROR_LIB_SYMBOLS = capi.ovrError_LibSymbols
 * ERROR_REMOTE_SESSION = capi.ovrError_RemoteSession
 * ERROR_INITIALIZE_VULKAN = capi.ovrError_InitializeVulkan             # <<<<<<<<<<<<<<
 * ERROR_BLACKLISTED_GFX_DRIVER = capi.ovrError_BlacklistedGfxDriver
 * ERROR_DISPLAY_LOST = capi.ovrError_DisplayLost
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_InitializeVulkan); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_INITIALIZE_VULKAN, __pyx_t_7) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":607
 * ERROR_REMOTE_SESSION = capi.ovrError_RemoteSession
 * ERROR_INITIALIZE_VULKAN = capi.ovrError_InitializeVulkan
 * ERROR_BLACKLISTED_GFX_DRIVER = capi.ovrError_BlacklistedGfxDriver             # <<<<<<<<<<<<<<
 * ERROR_DISPLAY_LOST = capi.ovrError_DisplayLost
 * ERROR_TEXTURE_SWAP_CHAIN_FULL = capi.ovrError_TextureSwapChainFull
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_BlacklistedGfxDriver); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_BLACKLISTED_GFX_DRIVER, __pyx_t_7) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":608
 * ERROR_INITIALIZE_VULKAN = capi.ovrError_InitializeVulkan
 * ERROR_BLACKLISTED_GFX_DRIVER = capi.ovrError_BlacklistedGfxDriver
 * ERROR_DISPLAY_LOST = capi.ovrError_DisplayLost             # <<<<<<<<<<<<<<
 * ERROR_TEXTURE_SWAP_CHAIN_FULL = capi.ovrError_TextureSwapChainFull
 * ERROR_TEXTURE_SWAP_CHAIN_INVALID = capi.ovrError_TextureSwapChainInvalid
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_DisplayLost); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DISPLAY_LOST, __pyx_t_7) < 0) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":609
 * ERROR_BLACKLISTED_GFX_DRIVER = capi.ovrError_BlacklistedGfxDriver
 * ERROR_DISPLAY_LOST = capi.ovrError_DisplayLost
 * ERROR_TEXTURE_SWAP_CHAIN_FULL = capi.ovrError_TextureSwapChainFull             # <<<<<<<<<<<<<<
 * ERROR_TEXTURE_SWAP_CHAIN_INVALID = capi.ovrError_TextureSwapChainInvalid
 * ERROR_GRAPHICS_DEVICE_RESET = capi.ovrError_GraphicsDeviceReset
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_TextureSwapChainFull); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_TEXTURE_SWAP_CHAIN_FULL, __pyx_t_7) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":610
 * ERROR_DISPLAY_LOST = capi.ovrError_DisplayLost
 * ERROR_TEXTURE_SWAP_CHAIN_FULL = capi.ovrError_TextureSwapChainFull
 * ERROR_TEXTURE_SWAP_CHAIN_INVALID = capi.ovrError_TextureSwapChainInvalid             # <<<<<<<<<<<<<<
 * ERROR_GRAPHICS_DEVICE_RESET = capi.ovrError_GraphicsDeviceReset
 * ERROR_DISPLAY_REMOVED = capi.ovrError_DisplayRemoved
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_TextureSwapChainInvalid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_TEXTURE_SWAP_CHAIN_INVALID, __pyx_t_7) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":611
 * ERROR_TEXTURE_SWAP_CHAIN_FULL = capi.ovrError_TextureSwapChainFull
 * ERROR_TEXTURE_SWAP_CHAIN_INVALID = capi.ovrError_TextureSwapChainInvalid
 * ERROR_GRAPHICS_DEVICE_RESET = capi.ovrError_GraphicsDeviceReset             # <<<<<<<<<<<<<<
 * ERROR_DISPLAY_REMOVED = capi.ovrError_DisplayRemoved
 * ERROR_CONTENT_PROTECTION_NOT_AVAILABLE = capi.ovrError_ContentProtectionNotAvailable
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_GraphicsDeviceReset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_GRAPHICS_DEVICE_RESET, __pyx_t_7) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":612
 * ERROR_TEXTURE_SWAP_CHAIN_INVALID = capi.ovrError_TextureSwapChainInvalid
 * ERROR_GRAPHICS_DEVICE_RESET = capi.ovrError_GraphicsDeviceReset
 * ERROR_DISPLAY_REMOVED = capi.ovrError_DisplayRemoved             # <<<<<<<<<<<<<<
 * ERROR_CONTENT_PROTECTION_NOT_AVAILABLE = capi.ovrError_ContentProtectionNotAvailable
 * ERROR_APPLICATION_VISIBLE = capi.ovrError_ApplicationInvisible
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_DisplayRemoved); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DISPLAY_REMOVED, __pyx_t_7) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":613
 * ERROR_GRAPHICS_DEVICE_RESET = capi.ovrError_GraphicsDeviceReset
 * ERROR_DISPLAY_REMOVED = capi.ovrError_DisplayRemoved
 * ERROR_CONTENT_PROTECTION_NOT_AVAILABLE = capi.ovrError_ContentProtectionNotAvailable             # <<<<<<<<<<<<<<
 * ERROR_APPLICATION_VISIBLE = capi.ovrError_ApplicationInvisible
 * ERROR_DISALLOWED = capi.ovrError_Disallowed
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ContentProtectionNotAvailable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_CONTENT_PROTECTION_NOT_AVA, __pyx_t_7) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":614
 * ERROR_DISPLAY_REMOVED = capi.ovrError_DisplayRemoved
 * ERROR_CONTENT_PROTECTION_NOT_AVAILABLE = capi.ovrError_ContentProtectionNotAvailable
 * ERROR_APPLICATION_VISIBLE = capi.ovrError_ApplicationInvisible             # <<<<<<<<<<<<<<
 * ERROR_DISALLOWED = capi.ovrError_Disallowed
 * ERROR_DISPLAY_PLUGGED_INCORRECTY = capi.ovrError_DisplayPluggedIncorrectly
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_ApplicationInvisible); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_APPLICATION_VISIBLE, __pyx_t_7) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":615
 * ERROR_CONTENT_PROTECTION_NOT_AVAILABLE = capi.ovrError_ContentProtectionNotAvailable
 * ERROR_APPLICATION_VISIBLE = capi.ovrError_ApplicationInvisible
 * ERROR_DISALLOWED = capi.ovrError_Disallowed             # <<<<<<<<<<<<<<
 * ERROR_DISPLAY_PLUGGED_INCORRECTY = capi.ovrError_DisplayPluggedIncorrectly
 * ERROR_DISPLAY_LIMIT_REACHED = capi.ovrError_DisplayLimitReached
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_Disallowed); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DISALLOWED, __pyx_t_7) < 0) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":616
 * ERROR_APPLICATION_VISIBLE = capi.ovrError_ApplicationInvisible
 * ERROR_DISALLOWED = capi.ovrError_Disallowed
 * ERROR_DISPLAY_PLUGGED_INCORRECTY = capi.ovrError_DisplayPluggedIncorrectly             # <<<<<<<<<<<<<<
 * ERROR_DISPLAY_LIMIT_REACHED = capi.ovrError_DisplayLimitReached
 * ERROR_RUNTIME_EXCEPTION = capi.ovrError_RuntimeException
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_DisplayPluggedIncorrectly); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DISPLAY_PLUGGED_INCORRECTY, __pyx_t_7) < 0) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":617
 * ERROR_DISALLOWED = capi.ovrError_Disallowed
 * ERROR_DISPLAY_PLUGGED_INCORRECTY = capi.ovrError_DisplayPluggedIncorrectly
 * ERROR_DISPLAY_LIMIT_REACHED = capi.ovrError_DisplayLimitReached             # <<<<<<<<<<<<<<
 * ERROR_RUNTIME_EXCEPTION = capi.ovrError_RuntimeException
 * ERROR_NO_CALIBRATION = capi.ovrError_NoCalibration
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_DisplayLimitReached); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_DISPLAY_LIMIT_REACHED, __pyx_t_7) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":618
 * ERROR_DISPLAY_PLUGGED_INCORRECTY = capi.ovrError_DisplayPluggedIncorrectly
 * ERROR_DISPLAY_LIMIT_REACHED = capi.ovrError_DisplayLimitReached
 * ERROR_RUNTIME_EXCEPTION = capi.ovrError_RuntimeException             # <<<<<<<<<<<<<<
 * ERROR_NO_CALIBRATION = capi.ovrError_NoCalibration
 * ERROR_OLD_VERSION = capi.ovrError_OldVersion
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_RuntimeException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_RUNTIME_EXCEPTION, __pyx_t_7) < 0) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":619
 * ERROR_DISPLAY_LIMIT_REACHED = capi.ovrError_DisplayLimitReached
 * ERROR_RUNTIME_EXCEPTION = capi.ovrError_RuntimeException
 * ERROR_NO_CALIBRATION = capi.ovrError_NoCalibration             # <<<<<<<<<<<<<<
 * ERROR_OLD_VERSION = capi.ovrError_OldVersion
 * ERROR_MISFORMATTED_BLOCK = capi.ovrError_MisformattedBlock
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_NoCalibration); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_NO_CALIBRATION, __pyx_t_7) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":620
 * ERROR_RUNTIME_EXCEPTION = capi.ovrError_RuntimeException
 * ERROR_NO_CALIBRATION = capi.ovrError_NoCalibration
 * ERROR_OLD_VERSION = capi.ovrError_OldVersion             # <<<<<<<<<<<<<<
 * ERROR_MISFORMATTED_BLOCK = capi.ovrError_MisformattedBlock
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_OldVersion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_OLD_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":621
 * ERROR_NO_CALIBRATION = capi.ovrError_NoCalibration
 * ERROR_OLD_VERSION = capi.ovrError_OldVersion
 * ERROR_MISFORMATTED_BLOCK = capi.ovrError_MisformattedBlock             # <<<<<<<<<<<<<<
 * 
 * # misc constants
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrErrorType(ovrError_MisformattedBlock); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR_MISFORMATTED_BLOCK, __pyx_t_7) < 0) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":624
 * 
 * # misc constants
 * EYE_LEFT = capi.ovrEye_Left             # <<<<<<<<<<<<<<
 * EYE_RIGHT = capi.ovrEye_Right
 * EYE_COUNT = capi.ovrEye_Count
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrEyeType(ovrEye_Left); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EYE_LEFT, __pyx_t_7) < 0) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":625
 * # misc constants
 * EYE_LEFT = capi.ovrEye_Left
 * EYE_RIGHT = capi.ovrEye_Right             # <<<<<<<<<<<<<<
 * EYE_COUNT = capi.ovrEye_Count
 * HAND_LEFT = capi.ovrHand_Left
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrEyeType(ovrEye_Right); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EYE_RIGHT, __pyx_t_7) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":626
 * EYE_LEFT = capi.ovrEye_Left
 * EYE_RIGHT = capi.ovrEye_Right
 * EYE_COUNT = capi.ovrEye_Count             # <<<<<<<<<<<<<<
 * HAND_LEFT = capi.ovrHand_Left
 * HAND_RIGHT = capi.ovrHand_Right
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrEyeType(ovrEye_Count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EYE_COUNT, __pyx_t_7) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":627
 * EYE_RIGHT = capi.ovrEye_Right
 * EYE_COUNT = capi.ovrEye_Count
 * HAND_LEFT = capi.ovrHand_Left             # <<<<<<<<<<<<<<
 * HAND_RIGHT = capi.ovrHand_Right
 * HAND_COUNT = capi.ovrHand_Count
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHandType(ovrHand_Left); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HAND_LEFT, __pyx_t_7) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":628
 * EYE_COUNT = capi.ovrEye_Count
 * HAND_LEFT = capi.ovrHand_Left
 * HAND_RIGHT = capi.ovrHand_Right             # <<<<<<<<<<<<<<
 * HAND_COUNT = capi.ovrHand_Count
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHandType(ovrHand_Right); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HAND_RIGHT, __pyx_t_7) < 0) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":629
 * HAND_LEFT = capi.ovrHand_Left
 * HAND_RIGHT = capi.ovrHand_Right
 * HAND_COUNT = capi.ovrHand_Count             # <<<<<<<<<<<<<<
 * 
 * # texture formats, color and depth
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHandType(ovrHand_Count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HAND_COUNT, __pyx_t_7) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":632
 * 
 * # texture formats, color and depth
 * FORMAT_R8G8B8A8_UNORM = capi.OVR_FORMAT_R8G8B8A8_UNORM             # <<<<<<<<<<<<<<
 * FORMAT_R8G8B8A8_UNORM_SRGB = capi.OVR_FORMAT_R8G8B8A8_UNORM_SRGB
 * FORMAT_R16G16B16A16_FLOAT =  capi.OVR_FORMAT_R16G16B16A16_FLOAT
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_R8G8B8A8_UNORM); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT_R8G8B8A8_UNORM, __pyx_t_7) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":633
 * # texture formats, color and depth
 * FORMAT_R8G8B8A8_UNORM = capi.OVR_FORMAT_R8G8B8A8_UNORM
 * FORMAT_R8G8B8A8_UNORM_SRGB = capi.OVR_FORMAT_R8G8B8A8_UNORM_SRGB             # <<<<<<<<<<<<<<
 * FORMAT_R16G16B16A16_FLOAT =  capi.OVR_FORMAT_R16G16B16A16_FLOAT
 * FORMAT_R11G11B10_FLOAT = capi.OVR_FORMAT_R11G11B10_FLOAT
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_R8G8B8A8_UNORM_SRGB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT_R8G8B8A8_UNORM_SRGB, __pyx_t_7) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":634
 * FORMAT_R8G8B8A8_UNORM = capi.OVR_FORMAT_R8G8B8A8_UNORM
 * FORMAT_R8G8B8A8_UNORM_SRGB = capi.OVR_FORMAT_R8G8B8A8_UNORM_SRGB
 * FORMAT_R16G16B16A16_FLOAT =  capi.OVR_FORMAT_R16G16B16A16_FLOAT             # <<<<<<<<<<<<<<
 * FORMAT_R11G11B10_FLOAT = capi.OVR_FORMAT_R11G11B10_FLOAT
 * FORMAT_D16_UNORM = capi.OVR_FORMAT_D16_UNORM
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_R16G16B16A16_FLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT_R16G16B16A16_FLOAT, __pyx_t_7) < 0) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":635
 * FORMAT_R8G8B8A8_UNORM_SRGB = capi.OVR_FORMAT_R8G8B8A8_UNORM_SRGB
 * FORMAT_R16G16B16A16_FLOAT =  capi.OVR_FORMAT_R16G16B16A16_FLOAT
 * FORMAT_R11G11B10_FLOAT = capi.OVR_FORMAT_R11G11B10_FLOAT             # <<<<<<<<<<<<<<
 * FORMAT_D16_UNORM = capi.OVR_FORMAT_D16_UNORM
 * FORMAT_D24_UNORM_S8_UINT = capi.OVR_FORMAT_D24_UNORM_S8_UINT
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_R11G11B10_FLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT_R11G11B10_FLOAT, __pyx_t_7) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":636
 * FORMAT_R16G16B16A16_FLOAT =  capi.OVR_FORMAT_R16G16B16A16_FLOAT
 * FORMAT_R11G11B10_FLOAT = capi.OVR_FORMAT_R11G11B10_FLOAT
 * FORMAT_D16_UNORM = capi.OVR_FORMAT_D16_UNORM             # <<<<<<<<<<<<<<
 * FORMAT_D24_UNORM_S8_UINT = capi.OVR_FORMAT_D24_UNORM_S8_UINT
 * FORMAT_D32_FLOAT = capi.OVR_FORMAT_D32_FLOAT
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_D16_UNORM); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT_D16_UNORM, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":637
 * FORMAT_R11G11B10_FLOAT = capi.OVR_FORMAT_R11G11B10_FLOAT
 * FORMAT_D16_UNORM = capi.OVR_FORMAT_D16_UNORM
 * FORMAT_D24_UNORM_S8_UINT = capi.OVR_FORMAT_D24_UNORM_S8_UINT             # <<<<<<<<<<<<<<
 * FORMAT_D32_FLOAT = capi.OVR_FORMAT_D32_FLOAT
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_D24_UNORM_S8_UINT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT_D24_UNORM_S8_UINT, __pyx_t_7) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":638
 * FORMAT_D16_UNORM = capi.OVR_FORMAT_D16_UNORM
 * FORMAT_D24_UNORM_S8_UINT = capi.OVR_FORMAT_D24_UNORM_S8_UINT
 * FORMAT_D32_FLOAT = capi.OVR_FORMAT_D32_FLOAT             # <<<<<<<<<<<<<<
 * 
 * # performance
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_D32_FLOAT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORMAT_D32_FLOAT, __pyx_t_7) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":641
 * 
 * # performance
 * MAX_PROVIDED_FRAME_STATS = capi.ovrMaxProvidedFrameStats             # <<<<<<<<<<<<<<
 * 
 * # tracked device types
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(ovrMaxProvidedFrameStats); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_PROVIDED_FRAME_STATS, __pyx_t_7) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":644
 * 
 * # tracked device types
 * TRACKED_DEVICE_TYPE_HMD = capi.ovrTrackedDevice_HMD             # <<<<<<<<<<<<<<
 * TRACKED_DEVICE_TYPE_LTOUCH = capi.ovrTrackedDevice_LTouch
 * TRACKED_DEVICE_TYPE_RTOUCH = capi.ovrTrackedDevice_RTouch
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDevice_HMD); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKED_DEVICE_TYPE_HMD, __pyx_t_7) < 0) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":645
 * # tracked device types
 * TRACKED_DEVICE_TYPE_HMD = capi.ovrTrackedDevice_HMD
 * TRACKED_DEVICE_TYPE_LTOUCH = capi.ovrTrackedDevice_LTouch             # <<<<<<<<<<<<<<
 * TRACKED_DEVICE_TYPE_RTOUCH = capi.ovrTrackedDevice_RTouch
 * TRACKED_DEVICE_TYPE_TOUCH = capi.ovrTrackedDevice_Touch
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDevice_LTouch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKED_DEVICE_TYPE_LTOUCH, __pyx_t_7) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":646
 * TRACKED_DEVICE_TYPE_HMD = capi.ovrTrackedDevice_HMD
 * TRACKED_DEVICE_TYPE_LTOUCH = capi.ovrTrackedDevice_LTouch
 * TRACKED_DEVICE_TYPE_RTOUCH = capi.ovrTrackedDevice_RTouch             # <<<<<<<<<<<<<<
 * TRACKED_DEVICE_TYPE_TOUCH = capi.ovrTrackedDevice_Touch
 * TRACKED_DEVICE_TYPE_OBJECT0 = capi.ovrTrackedDevice_Object0
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDevice_RTouch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKED_DEVICE_TYPE_RTOUCH, __pyx_t_7) < 0) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":647
 * TRACKED_DEVICE_TYPE_LTOUCH = capi.ovrTrackedDevice_LTouch
 * TRACKED_DEVICE_TYPE_RTOUCH = capi.ovrTrackedDevice_RTouch
 * TRACKED_DEVICE_TYPE_TOUCH = capi.ovrTrackedDevice_Touch             # <<<<<<<<<<<<<<
 * TRACKED_DEVICE_TYPE_OBJECT0 = capi.ovrTrackedDevice_Object0
 * TRACKED_DEVICE_TYPE_OBJECT1 = capi.ovrTrackedDevice_Object1
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDevice_Touch); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKED_DEVICE_TYPE_TOUCH, __pyx_t_7) < 0) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":648
 * TRACKED_DEVICE_TYPE_RTOUCH = capi.ovrTrackedDevice_RTouch
 * TRACKED_DEVICE_TYPE_TOUCH = capi.ovrTrackedDevice_Touch
 * TRACKED_DEVICE_TYPE_OBJECT0 = capi.ovrTrackedDevice_Object0             # <<<<<<<<<<<<<<
 * TRACKED_DEVICE_TYPE_OBJECT1 = capi.ovrTrackedDevice_Object1
 * TRACKED_DEVICE_TYPE_OBJECT2 = capi.ovrTrackedDevice_Object2
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDevice_Object0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT0, __pyx_t_7) < 0) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":649
 * TRACKED_DEVICE_TYPE_TOUCH = capi.ovrTrackedDevice_Touch
 * TRACKED_DEVICE_TYPE_OBJECT0 = capi.ovrTrackedDevice_Object0
 * TRACKED_DEVICE_TYPE_OBJECT1 = capi.ovrTrackedDevice_Object1             # <<<<<<<<<<<<<<
 * TRACKED_DEVICE_TYPE_OBJECT2 = capi.ovrTrackedDevice_Object2
 * TRACKED_DEVICE_TYPE_OBJECT3 = capi.ovrTrackedDevice_Object3
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDevice_Object1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT1, __pyx_t_7) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":650
 * TRACKED_DEVICE_TYPE_OBJECT0 = capi.ovrTrackedDevice_Object0
 * TRACKED_DEVICE_TYPE_OBJECT1 = capi.ovrTrackedDevice_Object1
 * TRACKED_DEVICE_TYPE_OBJECT2 = capi.ovrTrackedDevice_Object2             # <<<<<<<<<<<<<<
 * TRACKED_DEVICE_TYPE_OBJECT3 = capi.ovrTrackedDevice_Object3
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDevice_Object2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT2, __pyx_t_7) < 0) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":651
 * TRACKED_DEVICE_TYPE_OBJECT1 = capi.ovrTrackedDevice_Object1
 * TRACKED_DEVICE_TYPE_OBJECT2 = capi.ovrTrackedDevice_Object2
 * TRACKED_DEVICE_TYPE_OBJECT3 = capi.ovrTrackedDevice_Object3             # <<<<<<<<<<<<<<
 * 
 * # tracking origin types
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDevice_Object3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKED_DEVICE_TYPE_OBJECT3, __pyx_t_7) < 0) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":654
 * 
 * # tracking origin types
 * TRACKING_ORIGIN_EYE_LEVEL = capi.ovrTrackingOrigin_EyeLevel             # <<<<<<<<<<<<<<
 * TRACKING_ORIGIN_FLOOR_LEVEL = capi.ovrTrackingOrigin_FloorLevel
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackingOrigin(ovrTrackingOrigin_EyeLevel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKING_ORIGIN_EYE_LEVEL, __pyx_t_7) < 0) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":655
 * # tracking origin types
 * TRACKING_ORIGIN_EYE_LEVEL = capi.ovrTrackingOrigin_EyeLevel
 * TRACKING_ORIGIN_FLOOR_LEVEL = capi.ovrTrackingOrigin_FloorLevel             # <<<<<<<<<<<<<<
 * 
 * # trackings state status flags
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrTrackingOrigin(ovrTrackingOrigin_FloorLevel); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRACKING_ORIGIN_FLOOR_LEVEL, __pyx_t_7) < 0) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":658
 * 
 * # trackings state status flags
 * STATUS_ORIENTATION_TRACKED = capi.ovrStatus_OrientationTracked             # <<<<<<<<<<<<<<
 * STATUS_POSITION_TRACKED = capi.ovrStatus_PositionTracked
 * STATUS_ORIENTATION_VALID = capi.ovrStatus_OrientationValid
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrStatusBits(ovrStatus_OrientationTracked); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATUS_ORIENTATION_TRACKED, __pyx_t_7) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":659
 * # trackings state status flags
 * STATUS_ORIENTATION_TRACKED = capi.ovrStatus_OrientationTracked
 * STATUS_POSITION_TRACKED = capi.ovrStatus_PositionTracked             # <<<<<<<<<<<<<<
 * STATUS_ORIENTATION_VALID = capi.ovrStatus_OrientationValid
 * STATUS_POSITION_VALID = capi.ovrStatus_PositionValid
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrStatusBits(ovrStatus_PositionTracked); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATUS_POSITION_TRACKED, __pyx_t_7) < 0) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":660
 * STATUS_ORIENTATION_TRACKED = capi.ovrStatus_OrientationTracked
 * STATUS_POSITION_TRACKED = capi.ovrStatus_PositionTracked
 * STATUS_ORIENTATION_VALID = capi.ovrStatus_OrientationValid             # <<<<<<<<<<<<<<
 * STATUS_POSITION_VALID = capi.ovrStatus_PositionValid
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrStatusBits(ovrStatus_OrientationValid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATUS_ORIENTATION_VALID, __pyx_t_7) < 0) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":661
 * STATUS_POSITION_TRACKED = capi.ovrStatus_PositionTracked
 * STATUS_ORIENTATION_VALID = capi.ovrStatus_OrientationValid
 * STATUS_POSITION_VALID = capi.ovrStatus_PositionValid             # <<<<<<<<<<<<<<
 * 
 * # API version information
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrStatusBits(ovrStatus_PositionValid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATUS_POSITION_VALID, __pyx_t_7) < 0) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":664
 * 
 * # API version information
 * PRODUCT_VERSION = capi.OVR_PRODUCT_VERSION             # <<<<<<<<<<<<<<
 * MAJOR_VERSION = capi.OVR_MAJOR_VERSION
 * MINOR_VERSION = capi.OVR_MINOR_VERSION
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_PRODUCT_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PRODUCT_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":665
 * # API version information
 * PRODUCT_VERSION = capi.OVR_PRODUCT_VERSION
 * MAJOR_VERSION = capi.OVR_MAJOR_VERSION             # <<<<<<<<<<<<<<
 * MINOR_VERSION = capi.OVR_MINOR_VERSION
 * PATCH_VERSION = capi.OVR_PATCH_VERSION
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_MAJOR_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAJOR_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":666
 * PRODUCT_VERSION = capi.OVR_PRODUCT_VERSION
 * MAJOR_VERSION = capi.OVR_MAJOR_VERSION
 * MINOR_VERSION = capi.OVR_MINOR_VERSION             # <<<<<<<<<<<<<<
 * PATCH_VERSION = capi.OVR_PATCH_VERSION
 * BUILD_NUMBER = capi.OVR_BUILD_NUMBER
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_MINOR_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINOR_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":667
 * MAJOR_VERSION = capi.OVR_MAJOR_VERSION
 * MINOR_VERSION = capi.OVR_MINOR_VERSION
 * PATCH_VERSION = capi.OVR_PATCH_VERSION             # <<<<<<<<<<<<<<
 * BUILD_NUMBER = capi.OVR_BUILD_NUMBER
 * DLL_COMPATIBLE_VERSION = capi.OVR_DLL_COMPATIBLE_VERSION
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_PATCH_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PATCH_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":668
 * MINOR_VERSION = capi.OVR_MINOR_VERSION
 * PATCH_VERSION = capi.OVR_PATCH_VERSION
 * BUILD_NUMBER = capi.OVR_BUILD_NUMBER             # <<<<<<<<<<<<<<
 * DLL_COMPATIBLE_VERSION = capi.OVR_DLL_COMPATIBLE_VERSION
 * MIN_REQUESTABLE_MINOR_VERSION = capi.OVR_MIN_REQUESTABLE_MINOR_VERSION
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_BUILD_NUMBER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BUILD_NUMBER, __pyx_t_7) < 0) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":669
 * PATCH_VERSION = capi.OVR_PATCH_VERSION
 * BUILD_NUMBER = capi.OVR_BUILD_NUMBER
 * DLL_COMPATIBLE_VERSION = capi.OVR_DLL_COMPATIBLE_VERSION             # <<<<<<<<<<<<<<
 * MIN_REQUESTABLE_MINOR_VERSION = capi.OVR_MIN_REQUESTABLE_MINOR_VERSION
 * FEATURE_VERSION = capi.OVR_FEATURE_VERSION
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_DLL_COMPATIBLE_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DLL_COMPATIBLE_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":670
 * BUILD_NUMBER = capi.OVR_BUILD_NUMBER
 * DLL_COMPATIBLE_VERSION = capi.OVR_DLL_COMPATIBLE_VERSION
 * MIN_REQUESTABLE_MINOR_VERSION = capi.OVR_MIN_REQUESTABLE_MINOR_VERSION             # <<<<<<<<<<<<<<
 * FEATURE_VERSION = capi.OVR_FEATURE_VERSION
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_MIN_REQUESTABLE_MINOR_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_REQUESTABLE_MINOR_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":671
 * DLL_COMPATIBLE_VERSION = capi.OVR_DLL_COMPATIBLE_VERSION
 * MIN_REQUESTABLE_MINOR_VERSION = capi.OVR_MIN_REQUESTABLE_MINOR_VERSION
 * FEATURE_VERSION = capi.OVR_FEATURE_VERSION             # <<<<<<<<<<<<<<
 * 
 * # API keys
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_FEATURE_VERSION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FEATURE_VERSION, __pyx_t_7) < 0) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":674
 * 
 * # API keys
 * KEY_USER = capi.OVR_KEY_USER             # <<<<<<<<<<<<<<
 * KEY_NAME = capi.OVR_KEY_NAME
 * KEY_GENDER = capi.OVR_KEY_GENDER
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_KEY_USER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_USER, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":675
 * # API keys
 * KEY_USER = capi.OVR_KEY_USER
 * KEY_NAME = capi.OVR_KEY_NAME             # <<<<<<<<<<<<<<
 * KEY_GENDER = capi.OVR_KEY_GENDER
 * DEFAULT_GENDER = capi.OVR_DEFAULT_GENDER
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_KEY_NAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_NAME, __pyx_t_7) < 0) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":676
 * KEY_USER = capi.OVR_KEY_USER
 * KEY_NAME = capi.OVR_KEY_NAME
 * KEY_GENDER = capi.OVR_KEY_GENDER             # <<<<<<<<<<<<<<
 * DEFAULT_GENDER = capi.OVR_DEFAULT_GENDER
 * KEY_PLAYER_HEIGHT = capi.OVR_KEY_PLAYER_HEIGHT
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_KEY_GENDER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_GENDER, __pyx_t_7) < 0) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":677
 * KEY_NAME = capi.OVR_KEY_NAME
 * KEY_GENDER = capi.OVR_KEY_GENDER
 * DEFAULT_GENDER = capi.OVR_DEFAULT_GENDER             # <<<<<<<<<<<<<<
 * KEY_PLAYER_HEIGHT = capi.OVR_KEY_PLAYER_HEIGHT
 * DEFAULT_PLAYER_HEIGHT = capi.OVR_DEFAULT_PLAYER_HEIGHT
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_DEFAULT_GENDER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_GENDER, __pyx_t_7) < 0) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":678
 * KEY_GENDER = capi.OVR_KEY_GENDER
 * DEFAULT_GENDER = capi.OVR_DEFAULT_GENDER
 * KEY_PLAYER_HEIGHT = capi.OVR_KEY_PLAYER_HEIGHT             # <<<<<<<<<<<<<<
 * DEFAULT_PLAYER_HEIGHT = capi.OVR_DEFAULT_PLAYER_HEIGHT
 * KEY_EYE_HEIGHT = capi.OVR_KEY_EYE_HEIGHT
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_KEY_PLAYER_HEIGHT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_PLAYER_HEIGHT, __pyx_t_7) < 0) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":679
 * DEFAULT_GENDER = capi.OVR_DEFAULT_GENDER
 * KEY_PLAYER_HEIGHT = capi.OVR_KEY_PLAYER_HEIGHT
 * DEFAULT_PLAYER_HEIGHT = capi.OVR_DEFAULT_PLAYER_HEIGHT             # <<<<<<<<<<<<<<
 * KEY_EYE_HEIGHT = capi.OVR_KEY_EYE_HEIGHT
 * DEFAULT_EYE_HEIGHT = capi.OVR_DEFAULT_EYE_HEIGHT
 */
  __pyx_t_7 = PyFloat_FromDouble(OVR_DEFAULT_PLAYER_HEIGHT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_PLAYER_HEIGHT, __pyx_t_7) < 0) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":680
 * KEY_PLAYER_HEIGHT = capi.OVR_KEY_PLAYER_HEIGHT
 * DEFAULT_PLAYER_HEIGHT = capi.OVR_DEFAULT_PLAYER_HEIGHT
 * KEY_EYE_HEIGHT = capi.OVR_KEY_EYE_HEIGHT             # <<<<<<<<<<<<<<
 * DEFAULT_EYE_HEIGHT = capi.OVR_DEFAULT_EYE_HEIGHT
 * KEY_NECK_TO_EYE_DISTANCE = capi.OVR_KEY_NECK_TO_EYE_DISTANCE
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_KEY_EYE_HEIGHT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_EYE_HEIGHT, __pyx_t_7) < 0) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":681
 * DEFAULT_PLAYER_HEIGHT = capi.OVR_DEFAULT_PLAYER_HEIGHT
 * KEY_EYE_HEIGHT = capi.OVR_KEY_EYE_HEIGHT
 * DEFAULT_EYE_HEIGHT = capi.OVR_DEFAULT_EYE_HEIGHT             # <<<<<<<<<<<<<<
 * KEY_NECK_TO_EYE_DISTANCE = capi.OVR_KEY_NECK_TO_EYE_DISTANCE
 * DEFAULT_NECK_TO_EYE_HORIZONTAL = capi.OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL
 */
  __pyx_t_7 = PyFloat_FromDouble(OVR_DEFAULT_EYE_HEIGHT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_EYE_HEIGHT, __pyx_t_7) < 0) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":682
 * KEY_EYE_HEIGHT = capi.OVR_KEY_EYE_HEIGHT
 * DEFAULT_EYE_HEIGHT = capi.OVR_DEFAULT_EYE_HEIGHT
 * KEY_NECK_TO_EYE_DISTANCE = capi.OVR_KEY_NECK_TO_EYE_DISTANCE             # <<<<<<<<<<<<<<
 * DEFAULT_NECK_TO_EYE_HORIZONTAL = capi.OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL
 * DEFAULT_NECK_TO_EYE_VERTICAL = capi.OVR_DEFAULT_NECK_TO_EYE_VERTICAL
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_KEY_NECK_TO_EYE_DISTANCE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_NECK_TO_EYE_DISTANCE, __pyx_t_7) < 0) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":683
 * DEFAULT_EYE_HEIGHT = capi.OVR_DEFAULT_EYE_HEIGHT
 * KEY_NECK_TO_EYE_DISTANCE = capi.OVR_KEY_NECK_TO_EYE_DISTANCE
 * DEFAULT_NECK_TO_EYE_HORIZONTAL = capi.OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL             # <<<<<<<<<<<<<<
 * DEFAULT_NECK_TO_EYE_VERTICAL = capi.OVR_DEFAULT_NECK_TO_EYE_VERTICAL
 * KEY_EYE_TO_NOSE_DISTANCE = capi.OVR_KEY_EYE_TO_NOSE_DISTANCE
 */
  __pyx_t_7 = PyFloat_FromDouble(OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_NECK_TO_EYE_HORIZONTAL, __pyx_t_7) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":684
 * KEY_NECK_TO_EYE_DISTANCE = capi.OVR_KEY_NECK_TO_EYE_DISTANCE
 * DEFAULT_NECK_TO_EYE_HORIZONTAL = capi.OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL
 * DEFAULT_NECK_TO_EYE_VERTICAL = capi.OVR_DEFAULT_NECK_TO_EYE_VERTICAL             # <<<<<<<<<<<<<<
 * KEY_EYE_TO_NOSE_DISTANCE = capi.OVR_KEY_EYE_TO_NOSE_DISTANCE
 * PERF_HUD_MODE = capi.OVR_PERF_HUD_MODE
 */
  __pyx_t_7 = PyFloat_FromDouble(OVR_DEFAULT_NECK_TO_EYE_VERTICAL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT_NECK_TO_EYE_VERTICAL, __pyx_t_7) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":685
 * DEFAULT_NECK_TO_EYE_HORIZONTAL = capi.OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL
 * DEFAULT_NECK_TO_EYE_VERTICAL = capi.OVR_DEFAULT_NECK_TO_EYE_VERTICAL
 * KEY_EYE_TO_NOSE_DISTANCE = capi.OVR_KEY_EYE_TO_NOSE_DISTANCE             # <<<<<<<<<<<<<<
 * PERF_HUD_MODE = capi.OVR_PERF_HUD_MODE
 * LAYER_HUD_MODE = capi.OVR_LAYER_HUD_MODE
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_KEY_EYE_TO_NOSE_DISTANCE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_EYE_TO_NOSE_DISTANCE, __pyx_t_7) < 0) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":686
 * DEFAULT_NECK_TO_EYE_VERTICAL = capi.OVR_DEFAULT_NECK_TO_EYE_VERTICAL
 * KEY_EYE_TO_NOSE_DISTANCE = capi.OVR_KEY_EYE_TO_NOSE_DISTANCE
 * PERF_HUD_MODE = capi.OVR_PERF_HUD_MODE             # <<<<<<<<<<<<<<
 * LAYER_HUD_MODE = capi.OVR_LAYER_HUD_MODE
 * LAYER_HUD_CURRENT_LAYER = capi.OVR_LAYER_HUD_CURRENT_LAYER
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_PERF_HUD_MODE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_MODE, __pyx_t_7) < 0) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":687
 * KEY_EYE_TO_NOSE_DISTANCE = capi.OVR_KEY_EYE_TO_NOSE_DISTANCE
 * PERF_HUD_MODE = capi.OVR_PERF_HUD_MODE
 * LAYER_HUD_MODE = capi.OVR_LAYER_HUD_MODE             # <<<<<<<<<<<<<<
 * LAYER_HUD_CURRENT_LAYER = capi.OVR_LAYER_HUD_CURRENT_LAYER
 * LAYER_HUD_SHOW_ALL_LAYERS = capi.OVR_LAYER_HUD_SHOW_ALL_LAYERS
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_LAYER_HUD_MODE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LAYER_HUD_MODE, __pyx_t_7) < 0) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":688
 * PERF_HUD_MODE = capi.OVR_PERF_HUD_MODE
 * LAYER_HUD_MODE = capi.OVR_LAYER_HUD_MODE
 * LAYER_HUD_CURRENT_LAYER = capi.OVR_LAYER_HUD_CURRENT_LAYER             # <<<<<<<<<<<<<<
 * LAYER_HUD_SHOW_ALL_LAYERS = capi.OVR_LAYER_HUD_SHOW_ALL_LAYERS
 * DEBUG_HUD_STEREO_MODE = capi.OVR_DEBUG_HUD_STEREO_MODE
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_LAYER_HUD_CURRENT_LAYER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LAYER_HUD_CURRENT_LAYER, __pyx_t_7) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":689
 * LAYER_HUD_MODE = capi.OVR_LAYER_HUD_MODE
 * LAYER_HUD_CURRENT_LAYER = capi.OVR_LAYER_HUD_CURRENT_LAYER
 * LAYER_HUD_SHOW_ALL_LAYERS = capi.OVR_LAYER_HUD_SHOW_ALL_LAYERS             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_MODE = capi.OVR_DEBUG_HUD_STEREO_MODE
 * DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_LAYER_HUD_SHOW_ALL_LAYERS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LAYER_HUD_SHOW_ALL_LAYERS, __pyx_t_7) < 0) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":690
 * LAYER_HUD_CURRENT_LAYER = capi.OVR_LAYER_HUD_CURRENT_LAYER
 * LAYER_HUD_SHOW_ALL_LAYERS = capi.OVR_LAYER_HUD_SHOW_ALL_LAYERS
 * DEBUG_HUD_STEREO_MODE = capi.OVR_DEBUG_HUD_STEREO_MODE             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE
 * DEBUG_HUD_STEREO_GUIDE_SIZE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_SIZE
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_DEBUG_HUD_STEREO_MODE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_MODE, __pyx_t_7) < 0) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":691
 * LAYER_HUD_SHOW_ALL_LAYERS = capi.OVR_LAYER_HUD_SHOW_ALL_LAYERS
 * DEBUG_HUD_STEREO_MODE = capi.OVR_DEBUG_HUD_STEREO_MODE
 * DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_GUIDE_SIZE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_SIZE
 * DEBUG_HUD_STEREO_GUIDE_POSITION = capi.OVR_DEBUG_HUD_STEREO_GUIDE_POSITION
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_GUIDE_INFO_ENAB, __pyx_t_7) < 0) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":692
 * DEBUG_HUD_STEREO_MODE = capi.OVR_DEBUG_HUD_STEREO_MODE
 * DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE
 * DEBUG_HUD_STEREO_GUIDE_SIZE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_SIZE             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_GUIDE_POSITION = capi.OVR_DEBUG_HUD_STEREO_GUIDE_POSITION
 * DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL = capi.OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_DEBUG_HUD_STEREO_GUIDE_SIZE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_GUIDE_SIZE, __pyx_t_7) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":693
 * DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE
 * DEBUG_HUD_STEREO_GUIDE_SIZE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_SIZE
 * DEBUG_HUD_STEREO_GUIDE_POSITION = capi.OVR_DEBUG_HUD_STEREO_GUIDE_POSITION             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL = capi.OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL
 * DEBUG_HUD_STEREO_GUIDE_COLOR = capi.OVR_DEBUG_HUD_STEREO_GUIDE_COLOR
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_DEBUG_HUD_STEREO_GUIDE_POSITION); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_GUIDE_POSITION, __pyx_t_7) < 0) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":694
 * DEBUG_HUD_STEREO_GUIDE_SIZE = capi.OVR_DEBUG_HUD_STEREO_GUIDE_SIZE
 * DEBUG_HUD_STEREO_GUIDE_POSITION = capi.OVR_DEBUG_HUD_STEREO_GUIDE_POSITION
 * DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL = capi.OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_GUIDE_COLOR = capi.OVR_DEBUG_HUD_STEREO_GUIDE_COLOR
 * 
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_GUIDE_YAWPITCHR, __pyx_t_7) < 0) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":695
 * DEBUG_HUD_STEREO_GUIDE_POSITION = capi.OVR_DEBUG_HUD_STEREO_GUIDE_POSITION
 * DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL = capi.OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL
 * DEBUG_HUD_STEREO_GUIDE_COLOR = capi.OVR_DEBUG_HUD_STEREO_GUIDE_COLOR             # <<<<<<<<<<<<<<
 * 
 * # performance hud modes
 */
  __pyx_t_7 = __Pyx_PyBytes_FromString(OVR_DEBUG_HUD_STEREO_GUIDE_COLOR); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_GUIDE_COLOR, __pyx_t_7) < 0) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":698
 * 
 * # performance hud modes
 * PERF_HUD_OFF = capi.ovrPerfHud_Off             # <<<<<<<<<<<<<<
 * PERF_HUD_PERF_SUMMARY = capi.ovrPerfHud_PerfSummary
 * PERF_HUD_LATENCY_TIMING = capi.ovrPerfHud_LatencyTiming
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHud_Off); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_OFF, __pyx_t_7) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":699
 * # performance hud modes
 * PERF_HUD_OFF = capi.ovrPerfHud_Off
 * PERF_HUD_PERF_SUMMARY = capi.ovrPerfHud_PerfSummary             # <<<<<<<<<<<<<<
 * PERF_HUD_LATENCY_TIMING = capi.ovrPerfHud_LatencyTiming
 * PERF_HUD_APP_RENDER_TIMING = capi.ovrPerfHud_AppRenderTiming
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHud_PerfSummary); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_PERF_SUMMARY, __pyx_t_7) < 0) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":700
 * PERF_HUD_OFF = capi.ovrPerfHud_Off
 * PERF_HUD_PERF_SUMMARY = capi.ovrPerfHud_PerfSummary
 * PERF_HUD_LATENCY_TIMING = capi.ovrPerfHud_LatencyTiming             # <<<<<<<<<<<<<<
 * PERF_HUD_APP_RENDER_TIMING = capi.ovrPerfHud_AppRenderTiming
 * PERF_HUD_COMP_RENDER_TIMING = capi.ovrPerfHud_CompRenderTiming
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHud_LatencyTiming); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_LATENCY_TIMING, __pyx_t_7) < 0) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":701
 * PERF_HUD_PERF_SUMMARY = capi.ovrPerfHud_PerfSummary
 * PERF_HUD_LATENCY_TIMING = capi.ovrPerfHud_LatencyTiming
 * PERF_HUD_APP_RENDER_TIMING = capi.ovrPerfHud_AppRenderTiming             # <<<<<<<<<<<<<<
 * PERF_HUD_COMP_RENDER_TIMING = capi.ovrPerfHud_CompRenderTiming
 * PERF_HUD_ASW_STATS = capi.ovrPerfHud_AswStats
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHud_AppRenderTiming); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_APP_RENDER_TIMING, __pyx_t_7) < 0) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":702
 * PERF_HUD_LATENCY_TIMING = capi.ovrPerfHud_LatencyTiming
 * PERF_HUD_APP_RENDER_TIMING = capi.ovrPerfHud_AppRenderTiming
 * PERF_HUD_COMP_RENDER_TIMING = capi.ovrPerfHud_CompRenderTiming             # <<<<<<<<<<<<<<
 * PERF_HUD_ASW_STATS = capi.ovrPerfHud_AswStats
 * PERF_HUD_VERSION_INFO = capi.ovrPerfHud_VersionInfo
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHud_CompRenderTiming); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_COMP_RENDER_TIMING, __pyx_t_7) < 0) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":703
 * PERF_HUD_APP_RENDER_TIMING = capi.ovrPerfHud_AppRenderTiming
 * PERF_HUD_COMP_RENDER_TIMING = capi.ovrPerfHud_CompRenderTiming
 * PERF_HUD_ASW_STATS = capi.ovrPerfHud_AswStats             # <<<<<<<<<<<<<<
 * PERF_HUD_VERSION_INFO = capi.ovrPerfHud_VersionInfo
 * PERF_HUD_COUNT = capi.ovrPerfHud_Count  # for cycling
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHud_AswStats); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_ASW_STATS, __pyx_t_7) < 0) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":704
 * PERF_HUD_COMP_RENDER_TIMING = capi.ovrPerfHud_CompRenderTiming
 * PERF_HUD_ASW_STATS = capi.ovrPerfHud_AswStats
 * PERF_HUD_VERSION_INFO = capi.ovrPerfHud_VersionInfo             # <<<<<<<<<<<<<<
 * PERF_HUD_COUNT = capi.ovrPerfHud_Count  # for cycling
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHud_VersionInfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_VERSION_INFO, __pyx_t_7) < 0) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":705
 * PERF_HUD_ASW_STATS = capi.ovrPerfHud_AswStats
 * PERF_HUD_VERSION_INFO = capi.ovrPerfHud_VersionInfo
 * PERF_HUD_COUNT = capi.ovrPerfHud_Count  # for cycling             # <<<<<<<<<<<<<<
 * 
 * # stereo debug hud
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHud_Count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERF_HUD_COUNT, __pyx_t_7) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":708
 * 
 * # stereo debug hud
 * DEBUG_HUD_STEREO_MODE_OFF = capi.ovrDebugHudStereo_Off             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_MODE_QUAD = capi.ovrDebugHudStereo_Quad
 * DEBUG_HUD_STEREO_MODE_QUAD_WITH_CROSSHAIR = capi.ovrDebugHudStereo_QuadWithCrosshair
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrDebugHudStereoMode(ovrDebugHudStereo_Off); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_MODE_OFF, __pyx_t_7) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":709
 * # stereo debug hud
 * DEBUG_HUD_STEREO_MODE_OFF = capi.ovrDebugHudStereo_Off
 * DEBUG_HUD_STEREO_MODE_QUAD = capi.ovrDebugHudStereo_Quad             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_MODE_QUAD_WITH_CROSSHAIR = capi.ovrDebugHudStereo_QuadWithCrosshair
 * DEBUG_HUD_STEREO_MODE_CROSSHAIR_AT_INFINITY = capi.ovrDebugHudStereo_CrosshairAtInfinity
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrDebugHudStereoMode(ovrDebugHudStereo_Quad); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_MODE_QUAD, __pyx_t_7) < 0) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":710
 * DEBUG_HUD_STEREO_MODE_OFF = capi.ovrDebugHudStereo_Off
 * DEBUG_HUD_STEREO_MODE_QUAD = capi.ovrDebugHudStereo_Quad
 * DEBUG_HUD_STEREO_MODE_QUAD_WITH_CROSSHAIR = capi.ovrDebugHudStereo_QuadWithCrosshair             # <<<<<<<<<<<<<<
 * DEBUG_HUD_STEREO_MODE_CROSSHAIR_AT_INFINITY = capi.ovrDebugHudStereo_CrosshairAtInfinity
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrDebugHudStereoMode(ovrDebugHudStereo_QuadWithCrosshair); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_MODE_QUAD_WITH, __pyx_t_7) < 0) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":711
 * DEBUG_HUD_STEREO_MODE_QUAD = capi.ovrDebugHudStereo_Quad
 * DEBUG_HUD_STEREO_MODE_QUAD_WITH_CROSSHAIR = capi.ovrDebugHudStereo_QuadWithCrosshair
 * DEBUG_HUD_STEREO_MODE_CROSSHAIR_AT_INFINITY = capi.ovrDebugHudStereo_CrosshairAtInfinity             # <<<<<<<<<<<<<<
 * 
 * # swapchain handles, more than enough for now
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrDebugHudStereoMode(ovrDebugHudStereo_CrosshairAtInfinity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_HUD_STEREO_MODE_CROSSHAIR, __pyx_t_7) < 0) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":714
 * 
 * # swapchain handles, more than enough for now
 * TEXTURE_SWAP_CHAIN0 = 0             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN1 = 1
 * TEXTURE_SWAP_CHAIN2 = 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN0, __pyx_int_0) < 0) __PYX_ERR(0, 714, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":715
 * # swapchain handles, more than enough for now
 * TEXTURE_SWAP_CHAIN0 = 0
 * TEXTURE_SWAP_CHAIN1 = 1             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN2 = 2
 * TEXTURE_SWAP_CHAIN3 = 3
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN1, __pyx_int_1) < 0) __PYX_ERR(0, 715, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":716
 * TEXTURE_SWAP_CHAIN0 = 0
 * TEXTURE_SWAP_CHAIN1 = 1
 * TEXTURE_SWAP_CHAIN2 = 2             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN3 = 3
 * TEXTURE_SWAP_CHAIN4 = 4
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN2, __pyx_int_2) < 0) __PYX_ERR(0, 716, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":717
 * TEXTURE_SWAP_CHAIN1 = 1
 * TEXTURE_SWAP_CHAIN2 = 2
 * TEXTURE_SWAP_CHAIN3 = 3             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN4 = 4
 * TEXTURE_SWAP_CHAIN5 = 5
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN3, __pyx_int_3) < 0) __PYX_ERR(0, 717, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":718
 * TEXTURE_SWAP_CHAIN2 = 2
 * TEXTURE_SWAP_CHAIN3 = 3
 * TEXTURE_SWAP_CHAIN4 = 4             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN5 = 5
 * TEXTURE_SWAP_CHAIN6 = 6
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN4, __pyx_int_4) < 0) __PYX_ERR(0, 718, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":719
 * TEXTURE_SWAP_CHAIN3 = 3
 * TEXTURE_SWAP_CHAIN4 = 4
 * TEXTURE_SWAP_CHAIN5 = 5             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN6 = 6
 * TEXTURE_SWAP_CHAIN7 = 7
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN5, __pyx_int_5) < 0) __PYX_ERR(0, 719, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":720
 * TEXTURE_SWAP_CHAIN4 = 4
 * TEXTURE_SWAP_CHAIN5 = 5
 * TEXTURE_SWAP_CHAIN6 = 6             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN7 = 7
 * TEXTURE_SWAP_CHAIN8 = 8
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN6, __pyx_int_6) < 0) __PYX_ERR(0, 720, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":721
 * TEXTURE_SWAP_CHAIN5 = 5
 * TEXTURE_SWAP_CHAIN6 = 6
 * TEXTURE_SWAP_CHAIN7 = 7             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN8 = 8
 * TEXTURE_SWAP_CHAIN9 = 9
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN7, __pyx_int_7) < 0) __PYX_ERR(0, 721, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":722
 * TEXTURE_SWAP_CHAIN6 = 6
 * TEXTURE_SWAP_CHAIN7 = 7
 * TEXTURE_SWAP_CHAIN8 = 8             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN9 = 9
 * TEXTURE_SWAP_CHAIN10 = 10
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN8, __pyx_int_8) < 0) __PYX_ERR(0, 722, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":723
 * TEXTURE_SWAP_CHAIN7 = 7
 * TEXTURE_SWAP_CHAIN8 = 8
 * TEXTURE_SWAP_CHAIN9 = 9             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN10 = 10
 * TEXTURE_SWAP_CHAIN11 = 11
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN9, __pyx_int_9) < 0) __PYX_ERR(0, 723, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":724
 * TEXTURE_SWAP_CHAIN8 = 8
 * TEXTURE_SWAP_CHAIN9 = 9
 * TEXTURE_SWAP_CHAIN10 = 10             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN11 = 11
 * TEXTURE_SWAP_CHAIN12 = 12
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN10, __pyx_int_10) < 0) __PYX_ERR(0, 724, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":725
 * TEXTURE_SWAP_CHAIN9 = 9
 * TEXTURE_SWAP_CHAIN10 = 10
 * TEXTURE_SWAP_CHAIN11 = 11             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN12 = 12
 * TEXTURE_SWAP_CHAIN13 = 13
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN11, __pyx_int_11) < 0) __PYX_ERR(0, 725, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":726
 * TEXTURE_SWAP_CHAIN10 = 10
 * TEXTURE_SWAP_CHAIN11 = 11
 * TEXTURE_SWAP_CHAIN12 = 12             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN13 = 13
 * TEXTURE_SWAP_CHAIN14 = 14
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN12, __pyx_int_12) < 0) __PYX_ERR(0, 726, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":727
 * TEXTURE_SWAP_CHAIN11 = 11
 * TEXTURE_SWAP_CHAIN12 = 12
 * TEXTURE_SWAP_CHAIN13 = 13             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN14 = 14
 * TEXTURE_SWAP_CHAIN15 = 15
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN13, __pyx_int_13) < 0) __PYX_ERR(0, 727, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":728
 * TEXTURE_SWAP_CHAIN12 = 12
 * TEXTURE_SWAP_CHAIN13 = 13
 * TEXTURE_SWAP_CHAIN14 = 14             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN15 = 15
 * TEXTURE_SWAP_CHAIN_COUNT = 16
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN14, __pyx_int_14) < 0) __PYX_ERR(0, 728, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":729
 * TEXTURE_SWAP_CHAIN13 = 13
 * TEXTURE_SWAP_CHAIN14 = 14
 * TEXTURE_SWAP_CHAIN15 = 15             # <<<<<<<<<<<<<<
 * TEXTURE_SWAP_CHAIN_COUNT = 16
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN15, __pyx_int_15) < 0) __PYX_ERR(0, 729, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":730
 * TEXTURE_SWAP_CHAIN14 = 14
 * TEXTURE_SWAP_CHAIN15 = 15
 * TEXTURE_SWAP_CHAIN_COUNT = 16             # <<<<<<<<<<<<<<
 * 
 * # boundary modes
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TEXTURE_SWAP_CHAIN_COUNT, __pyx_int_16) < 0) __PYX_ERR(0, 730, __pyx_L1_error)

  /* "psychxr/libovr/_libovr.pyx":733
 * 
 * # boundary modes
 * BOUNDARY_PLAY_AREA = capi.ovrBoundary_PlayArea             # <<<<<<<<<<<<<<
 * BOUNDARY_OUTER = capi.ovrBoundary_Outer
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrBoundaryType(ovrBoundary_PlayArea); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BOUNDARY_PLAY_AREA, __pyx_t_7) < 0) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":734
 * # boundary modes
 * BOUNDARY_PLAY_AREA = capi.ovrBoundary_PlayArea
 * BOUNDARY_OUTER = capi.ovrBoundary_Outer             # <<<<<<<<<<<<<<
 * 
 * # layer header flags
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrBoundaryType(ovrBoundary_Outer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BOUNDARY_OUTER, __pyx_t_7) < 0) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":737
 * 
 * # layer header flags
 * LAYER_FLAG_HIGH_QUALITY = capi.ovrLayerFlag_HighQuality             # <<<<<<<<<<<<<<
 * LAYER_FLAG_TEXTURE_ORIGIN_AT_BOTTOM_LEFT = \
 *     capi.ovrLayerFlag_TextureOriginAtBottomLeft
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_HighQuality); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LAYER_FLAG_HIGH_QUALITY, __pyx_t_7) < 0) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":739
 * LAYER_FLAG_HIGH_QUALITY = capi.ovrLayerFlag_HighQuality
 * LAYER_FLAG_TEXTURE_ORIGIN_AT_BOTTOM_LEFT = \
 *     capi.ovrLayerFlag_TextureOriginAtBottomLeft             # <<<<<<<<<<<<<<
 * LAYER_FLAG_HEAD_LOCKED = capi.ovrLayerFlag_HeadLocked
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_TextureOriginAtBottomLeft); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LAYER_FLAG_TEXTURE_ORIGIN_AT_BOT, __pyx_t_7) < 0) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":740
 * LAYER_FLAG_TEXTURE_ORIGIN_AT_BOTTOM_LEFT = \
 *     capi.ovrLayerFlag_TextureOriginAtBottomLeft
 * LAYER_FLAG_HEAD_LOCKED = capi.ovrLayerFlag_HeadLocked             # <<<<<<<<<<<<<<
 * 
 * # HMD types
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_HeadLocked); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LAYER_FLAG_HEAD_LOCKED, __pyx_t_7) < 0) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":743
 * 
 * # HMD types
 * HMD_NONE = capi.ovrHmd_None             # <<<<<<<<<<<<<<
 * HMD_DK1 = capi.ovrHmd_DK1
 * HMD_DKHD = capi.ovrHmd_DKHD
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_NONE, __pyx_t_7) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":744
 * # HMD types
 * HMD_NONE = capi.ovrHmd_None
 * HMD_DK1 = capi.ovrHmd_DK1             # <<<<<<<<<<<<<<
 * HMD_DKHD = capi.ovrHmd_DKHD
 * HMD_DK2 = capi.ovrHmd_DK2
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_DK1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_DK1, __pyx_t_7) < 0) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":745
 * HMD_NONE = capi.ovrHmd_None
 * HMD_DK1 = capi.ovrHmd_DK1
 * HMD_DKHD = capi.ovrHmd_DKHD             # <<<<<<<<<<<<<<
 * HMD_DK2 = capi.ovrHmd_DK2
 * HMD_CB = capi.ovrHmd_CB
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_DKHD); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_DKHD, __pyx_t_7) < 0) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":746
 * HMD_DK1 = capi.ovrHmd_DK1
 * HMD_DKHD = capi.ovrHmd_DKHD
 * HMD_DK2 = capi.ovrHmd_DK2             # <<<<<<<<<<<<<<
 * HMD_CB = capi.ovrHmd_CB
 * HMD_OTHER = capi.ovrHmd_Other
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_DK2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_DK2, __pyx_t_7) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":747
 * HMD_DKHD = capi.ovrHmd_DKHD
 * HMD_DK2 = capi.ovrHmd_DK2
 * HMD_CB = capi.ovrHmd_CB             # <<<<<<<<<<<<<<
 * HMD_OTHER = capi.ovrHmd_Other
 * HMD_E3_2015  = capi.ovrHmd_E3_2015
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_CB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_CB, __pyx_t_7) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":748
 * HMD_DK2 = capi.ovrHmd_DK2
 * HMD_CB = capi.ovrHmd_CB
 * HMD_OTHER = capi.ovrHmd_Other             # <<<<<<<<<<<<<<
 * HMD_E3_2015  = capi.ovrHmd_E3_2015
 * HMD_ES06 = capi.ovrHmd_ES06
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_Other); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_OTHER, __pyx_t_7) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":749
 * HMD_CB = capi.ovrHmd_CB
 * HMD_OTHER = capi.ovrHmd_Other
 * HMD_E3_2015  = capi.ovrHmd_E3_2015             # <<<<<<<<<<<<<<
 * HMD_ES06 = capi.ovrHmd_ES06
 * HMD_ES09 = capi.ovrHmd_ES09
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_E3_2015); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_E3_2015, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":750
 * HMD_OTHER = capi.ovrHmd_Other
 * HMD_E3_2015  = capi.ovrHmd_E3_2015
 * HMD_ES06 = capi.ovrHmd_ES06             # <<<<<<<<<<<<<<
 * HMD_ES09 = capi.ovrHmd_ES09
 * HMD_ES11 = capi.ovrHmd_ES11
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_ES06); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_ES06, __pyx_t_7) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":751
 * HMD_E3_2015  = capi.ovrHmd_E3_2015
 * HMD_ES06 = capi.ovrHmd_ES06
 * HMD_ES09 = capi.ovrHmd_ES09             # <<<<<<<<<<<<<<
 * HMD_ES11 = capi.ovrHmd_ES11
 * HMD_CV1 = capi.ovrHmd_CV1
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_ES09); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_ES09, __pyx_t_7) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":752
 * HMD_ES06 = capi.ovrHmd_ES06
 * HMD_ES09 = capi.ovrHmd_ES09
 * HMD_ES11 = capi.ovrHmd_ES11             # <<<<<<<<<<<<<<
 * HMD_CV1 = capi.ovrHmd_CV1
 * HMD_RIFTS = capi.ovrHmd_RiftS
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_ES11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_ES11, __pyx_t_7) < 0) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":753
 * HMD_ES09 = capi.ovrHmd_ES09
 * HMD_ES11 = capi.ovrHmd_ES11
 * HMD_CV1 = capi.ovrHmd_CV1             # <<<<<<<<<<<<<<
 * HMD_RIFTS = capi.ovrHmd_RiftS
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_CV1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_CV1, __pyx_t_7) < 0) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":754
 * HMD_ES11 = capi.ovrHmd_ES11
 * HMD_CV1 = capi.ovrHmd_CV1
 * HMD_RIFTS = capi.ovrHmd_RiftS             # <<<<<<<<<<<<<<
 * 
 * # haptics buffer
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrHmdType(ovrHmd_RiftS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HMD_RIFTS, __pyx_t_7) < 0) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":757
 * 
 * # haptics buffer
 * HAPTICS_BUFFER_SAMPLES_MAX = capi.OVR_HAPTICS_BUFFER_SAMPLES_MAX             # <<<<<<<<<<<<<<
 * 
 * # mirror texture options
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(OVR_HAPTICS_BUFFER_SAMPLES_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HAPTICS_BUFFER_SAMPLES_MAX, __pyx_t_7) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":760
 * 
 * # mirror texture options
 * MIRROR_OPTION_DEFAULT = capi.ovrMirrorOption_Default             # <<<<<<<<<<<<<<
 * MIRROR_OPTION_POST_DISTORTION = capi.ovrMirrorOption_PostDistortion
 * MIRROR_OPTION_LEFT_EYE_ONLY = capi.ovrMirrorOption_LeftEyeOnly
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_Default); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_OPTION_DEFAULT, __pyx_t_7) < 0) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":761
 * # mirror texture options
 * MIRROR_OPTION_DEFAULT = capi.ovrMirrorOption_Default
 * MIRROR_OPTION_POST_DISTORTION = capi.ovrMirrorOption_PostDistortion             # <<<<<<<<<<<<<<
 * MIRROR_OPTION_LEFT_EYE_ONLY = capi.ovrMirrorOption_LeftEyeOnly
 * MIRROR_OPTION_RIGHT_EYE_ONLY = capi.ovrMirrorOption_RightEyeOnly
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_PostDistortion); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_OPTION_POST_DISTORTION, __pyx_t_7) < 0) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":762
 * MIRROR_OPTION_DEFAULT = capi.ovrMirrorOption_Default
 * MIRROR_OPTION_POST_DISTORTION = capi.ovrMirrorOption_PostDistortion
 * MIRROR_OPTION_LEFT_EYE_ONLY = capi.ovrMirrorOption_LeftEyeOnly             # <<<<<<<<<<<<<<
 * MIRROR_OPTION_RIGHT_EYE_ONLY = capi.ovrMirrorOption_RightEyeOnly
 * MIRROR_OPTION_INCLUDE_GUARDIAN = capi.ovrMirrorOption_IncludeGuardian
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_LeftEyeOnly); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_OPTION_LEFT_EYE_ONLY, __pyx_t_7) < 0) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":763
 * MIRROR_OPTION_POST_DISTORTION = capi.ovrMirrorOption_PostDistortion
 * MIRROR_OPTION_LEFT_EYE_ONLY = capi.ovrMirrorOption_LeftEyeOnly
 * MIRROR_OPTION_RIGHT_EYE_ONLY = capi.ovrMirrorOption_RightEyeOnly             # <<<<<<<<<<<<<<
 * MIRROR_OPTION_INCLUDE_GUARDIAN = capi.ovrMirrorOption_IncludeGuardian
 * MIRROR_OPTION_INCLUDE_NOTIFICATIONS = capi.ovrMirrorOption_IncludeNotifications
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_RightEyeOnly); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_OPTION_RIGHT_EYE_ONLY, __pyx_t_7) < 0) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":764
 * MIRROR_OPTION_LEFT_EYE_ONLY = capi.ovrMirrorOption_LeftEyeOnly
 * MIRROR_OPTION_RIGHT_EYE_ONLY = capi.ovrMirrorOption_RightEyeOnly
 * MIRROR_OPTION_INCLUDE_GUARDIAN = capi.ovrMirrorOption_IncludeGuardian             # <<<<<<<<<<<<<<
 * MIRROR_OPTION_INCLUDE_NOTIFICATIONS = capi.ovrMirrorOption_IncludeNotifications
 * MIRROR_OPTION_INCLUDE_SYSTEM_GUI = capi.ovrMirrorOption_IncludeSystemGui
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_IncludeGuardian); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_OPTION_INCLUDE_GUARDIAN, __pyx_t_7) < 0) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":765
 * MIRROR_OPTION_RIGHT_EYE_ONLY = capi.ovrMirrorOption_RightEyeOnly
 * MIRROR_OPTION_INCLUDE_GUARDIAN = capi.ovrMirrorOption_IncludeGuardian
 * MIRROR_OPTION_INCLUDE_NOTIFICATIONS = capi.ovrMirrorOption_IncludeNotifications             # <<<<<<<<<<<<<<
 * MIRROR_OPTION_INCLUDE_SYSTEM_GUI = capi.ovrMirrorOption_IncludeSystemGui
 * MIRROR_OPTION_FORCE_SYMMETRIC_FOV = capi.ovrMirrorOption_ForceSymmetricFov
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_IncludeNotifications); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_OPTION_INCLUDE_NOTIFICATI, __pyx_t_7) < 0) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":766
 * MIRROR_OPTION_INCLUDE_GUARDIAN = capi.ovrMirrorOption_IncludeGuardian
 * MIRROR_OPTION_INCLUDE_NOTIFICATIONS = capi.ovrMirrorOption_IncludeNotifications
 * MIRROR_OPTION_INCLUDE_SYSTEM_GUI = capi.ovrMirrorOption_IncludeSystemGui             # <<<<<<<<<<<<<<
 * MIRROR_OPTION_FORCE_SYMMETRIC_FOV = capi.ovrMirrorOption_ForceSymmetricFov
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_IncludeSystemGui); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_OPTION_INCLUDE_SYSTEM_GUI, __pyx_t_7) < 0) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":767
 * MIRROR_OPTION_INCLUDE_NOTIFICATIONS = capi.ovrMirrorOption_IncludeNotifications
 * MIRROR_OPTION_INCLUDE_SYSTEM_GUI = capi.ovrMirrorOption_IncludeSystemGui
 * MIRROR_OPTION_FORCE_SYMMETRIC_FOV = capi.ovrMirrorOption_ForceSymmetricFov             # <<<<<<<<<<<<<<
 * 
 * # logging levels
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_ForceSymmetricFov); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_OPTION_FORCE_SYMMETRIC_FO, __pyx_t_7) < 0) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":770
 * 
 * # logging levels
 * LOG_LEVEL_DEBUG = capi.ovrLogLevel_Debug             # <<<<<<<<<<<<<<
 * LOG_LEVEL_INFO = capi.ovrLogLevel_Info
 * LOG_LEVEL_ERROR = capi.ovrLogLevel_Error
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrLogLevel(ovrLogLevel_Debug); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOG_LEVEL_DEBUG, __pyx_t_7) < 0) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":771
 * # logging levels
 * LOG_LEVEL_DEBUG = capi.ovrLogLevel_Debug
 * LOG_LEVEL_INFO = capi.ovrLogLevel_Info             # <<<<<<<<<<<<<<
 * LOG_LEVEL_ERROR = capi.ovrLogLevel_Error
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrLogLevel(ovrLogLevel_Info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOG_LEVEL_INFO, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":772
 * LOG_LEVEL_DEBUG = capi.ovrLogLevel_Debug
 * LOG_LEVEL_INFO = capi.ovrLogLevel_Info
 * LOG_LEVEL_ERROR = capi.ovrLogLevel_Error             # <<<<<<<<<<<<<<
 * 
 * # ------------------------------------------------------------------------------
 */
  __pyx_t_7 = __Pyx_PyInt_From_ovrLogLevel(ovrLogLevel_Error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOG_LEVEL_ERROR, __pyx_t_7) < 0) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":777
 * # Wrapper factory functions
 * #
 * cdef np.npy_intp[1] VEC2_SHAPE = [2]             # <<<<<<<<<<<<<<
 * cdef np.npy_intp[1] VEC3_SHAPE = [3]
 * cdef np.npy_intp[1] FOVPORT_SHAPE = [4]
 */
  __pyx_t_8[0] = 2;
  memcpy(&(__pyx_v_7psychxr_6libovr_7_libovr_VEC2_SHAPE[0]), __pyx_t_8, sizeof(__pyx_v_7psychxr_6libovr_7_libovr_VEC2_SHAPE[0]) * (1));

  /* "psychxr/libovr/_libovr.pyx":778
 * #
 * cdef np.npy_intp[1] VEC2_SHAPE = [2]
 * cdef np.npy_intp[1] VEC3_SHAPE = [3]             # <<<<<<<<<<<<<<
 * cdef np.npy_intp[1] FOVPORT_SHAPE = [4]
 * cdef np.npy_intp[1] QUAT_SHAPE = [4]
 */
  __pyx_t_9[0] = 3;
  memcpy(&(__pyx_v_7psychxr_6libovr_7_libovr_VEC3_SHAPE[0]), __pyx_t_9, sizeof(__pyx_v_7psychxr_6libovr_7_libovr_VEC3_SHAPE[0]) * (1));

  /* "psychxr/libovr/_libovr.pyx":779
 * cdef np.npy_intp[1] VEC2_SHAPE = [2]
 * cdef np.npy_intp[1] VEC3_SHAPE = [3]
 * cdef np.npy_intp[1] FOVPORT_SHAPE = [4]             # <<<<<<<<<<<<<<
 * cdef np.npy_intp[1] QUAT_SHAPE = [4]
 * # cdef np.npy_intp[2] MAT4_SHAPE = [4, 4]
 */
  __pyx_t_10[0] = 4;
  memcpy(&(__pyx_v_7psychxr_6libovr_7_libovr_FOVPORT_SHAPE[0]), __pyx_t_10, sizeof(__pyx_v_7psychxr_6libovr_7_libovr_FOVPORT_SHAPE[0]) * (1));

  /* "psychxr/libovr/_libovr.pyx":780
 * cdef np.npy_intp[1] VEC3_SHAPE = [3]
 * cdef np.npy_intp[1] FOVPORT_SHAPE = [4]
 * cdef np.npy_intp[1] QUAT_SHAPE = [4]             # <<<<<<<<<<<<<<
 * # cdef np.npy_intp[2] MAT4_SHAPE = [4, 4]
 * 
 */
  __pyx_t_11[0] = 4;
  memcpy(&(__pyx_v_7psychxr_6libovr_7_libovr_QUAT_SHAPE[0]), __pyx_t_11, sizeof(__pyx_v_7psychxr_6libovr_7_libovr_QUAT_SHAPE[0]) * (1));

  /* "psychxr/libovr/_libovr.pyx":4239
 * #
 * 
 * def success(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates success.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_3success, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_success, __pyx_t_7) < 0) __PYX_ERR(0, 4239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4251
 * 
 * 
 * def unqualifiedSuccess(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates unqualified success.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_5unqualifiedSuccess, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unqualifiedSuccess, __pyx_t_7) < 0) __PYX_ERR(0, 4251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4263
 * 
 * 
 * def failure(int result):             # <<<<<<<<<<<<<<
 *     """Check if an API return indicates failure (error).
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_7failure, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_failure, __pyx_t_7) < 0) __PYX_ERR(0, 4263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4275
 * 
 * 
 * def getBool(bytes propertyName, bint defaultVal=False):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR boolean property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_9getBool, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getBool, __pyx_t_7) < 0) __PYX_ERR(0, 4275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4304
 * 
 * 
 * def setBool(bytes propertyName, bint value=True):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR boolean property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_11setBool, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setBool, __pyx_t_7) < 0) __PYX_ERR(0, 4304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4332
 * 
 * 
 * def getInt(bytes propertyName, int defaultVal=0):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR integer property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_13getInt, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getInt, __pyx_t_7) < 0) __PYX_ERR(0, 4332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4359
 * 
 * 
 * def setInt(bytes propertyName, int value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR integer property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_15setInt, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setInt, __pyx_t_7) < 0) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4397
 * 
 * 
 * def getFloat(bytes propertyName, float defaultVal=0.0):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR floating point number property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_17getFloat, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getFloat, __pyx_t_7) < 0) __PYX_ERR(0, 4397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4425
 * 
 * 
 * def setFloat(bytes propertyName, float value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_19setFloat, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setFloat, __pyx_t_7) < 0) __PYX_ERR(0, 4425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4452
 * 
 * 
 * def setFloatArray(bytes propertyName, np.ndarray[np.float32_t, ndim=1] values):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_21setFloatArray, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setFloatArray, __pyx_t_7) < 0) __PYX_ERR(0, 4452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4489
 * 
 * 
 * def getFloatArray(bytes propertyName, np.ndarray[np.float32_t, ndim=1] values not None):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR float array property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_23getFloatArray, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getFloatArray, __pyx_t_7) < 0) __PYX_ERR(0, 4489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4529
 * 
 * 
 * def setString(bytes propertyName, object value):             # <<<<<<<<<<<<<<
 *     """Write a LibOVR floating point number property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_25setString, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setString, __pyx_t_7) < 0) __PYX_ERR(0, 4529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4564
 * 
 * 
 * def getString(bytes propertyName, object defaultVal=''):             # <<<<<<<<<<<<<<
 *     """Read a LibOVR string property.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_27getString, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getString, __pyx_t_7) < 0) __PYX_ERR(0, 4564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4606
 * 
 * 
 * def isOculusServiceRunning(int timeoutMs=100):             # <<<<<<<<<<<<<<
 *     """Check if the Oculus Runtime is loaded and running.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_29isOculusServiceRunning, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isOculusServiceRunning, __pyx_t_7) < 0) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4626
 * 
 * 
 * def isHmdConnected(int timeoutMs=100):             # <<<<<<<<<<<<<<
 *     """Check if an HMD is connected.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_31isHmdConnected, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isHmdConnected, __pyx_t_7) < 0) __PYX_ERR(0, 4626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4646
 * 
 * 
 * def getHmdInfo():             # <<<<<<<<<<<<<<
 *     """Get HMD information.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_33getHmdInfo, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getHmdInfo, __pyx_t_7) < 0) __PYX_ERR(0, 4646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4662
 * 
 * 
 * def initialize(bint focusAware=False, int connectionTimeout=0, object logCallback=None):             # <<<<<<<<<<<<<<
 *     """Initialize the session.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_35initialize, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 4662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4735
 * 
 * 
 * def create():             # <<<<<<<<<<<<<<
 *     """Create a new session. Control is handed over to the application from
 *     Oculus Home.
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_37create, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_create, __pyx_t_7) < 0) __PYX_ERR(0, 4735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4778
 * 
 * 
 * def destroyTextureSwapChain(int swapChain):             # <<<<<<<<<<<<<<
 *     """Destroy a texture swap chain.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_39destroyTextureSwapChain, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_destroyTextureSwapChain, __pyx_t_7) < 0) __PYX_ERR(0, 4778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4795
 * 
 * 
 * def destroyMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Destroy the mirror texture.
 *     """
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_41destroyMirrorTexture, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_destroyMirrorTexture, __pyx_t_7) < 0) __PYX_ERR(0, 4795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4804
 * 
 * 
 * def destroy():             # <<<<<<<<<<<<<<
 *     """Destroy a session.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_43destroy, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_destroy, __pyx_t_7) < 0) __PYX_ERR(0, 4804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4821
 * 
 * 
 * def shutdown():             # <<<<<<<<<<<<<<
 *     """End the current session.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_45shutdown, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_shutdown, __pyx_t_7) < 0) __PYX_ERR(0, 4821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4832
 * 
 * 
 * def getGraphicsLUID():             # <<<<<<<<<<<<<<
 *     """The graphics device LUID.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_47getGraphicsLUID, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getGraphicsLUID, __pyx_t_7) < 0) __PYX_ERR(0, 4832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4845
 * 
 * 
 * def setHighQuality(bint enable):             # <<<<<<<<<<<<<<
 *     """Enable high quality mode.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_49setHighQuality, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setHighQuality, __pyx_t_7) < 0) __PYX_ERR(0, 4845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4865
 * 
 * 
 * def setHeadLocked(bint enable):             # <<<<<<<<<<<<<<
 *     """Set the render layer state for head locking.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_51setHeadLocked, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setHeadLocked, __pyx_t_7) < 0) __PYX_ERR(0, 4865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4894
 * 
 * 
 * def isHeadLocked():             # <<<<<<<<<<<<<<
 *     """Check if head locking is enabled.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_53isHeadLocked, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isHeadLocked, __pyx_t_7) < 0) __PYX_ERR(0, 4894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4908
 * 
 * 
 * def getPixelsPerTanAngleAtCenter(int eye):             # <<<<<<<<<<<<<<
 *     """Get pixels per tan angle (=1) at the center of the display.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_55getPixelsPerTanAngleAtCenter, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getPixelsPerTanAngleAtCenter, __pyx_t_7) < 0) __PYX_ERR(0, 4908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4933
 * 
 * 
 * def getTanAngleToRenderTargetNDC(int eye, object tanAngle):             # <<<<<<<<<<<<<<
 *     """Convert FOV tan angle to normalized device coordinates (NDC).
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_57getTanAngleToRenderTargetNDC, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTanAngleToRenderTargetNDC, __pyx_t_7) < 0) __PYX_ERR(0, 4933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4962
 * 
 * 
 * def getPixelsPerDegree(int eye):             # <<<<<<<<<<<<<<
 *     """Get pixels per degree at the center of the display.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_59getPixelsPerDegree, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getPixelsPerDegree, __pyx_t_7) < 0) __PYX_ERR(0, 4962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":4991
 * 
 * 
 * def getDistortedViewport(int eye):             # <<<<<<<<<<<<<<
 *     """Get the distorted viewport.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_61getDistortedViewport, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getDistortedViewport, __pyx_t_7) < 0) __PYX_ERR(0, 4991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5014
 * 
 * 
 * def getEyeRenderFov(int eye):             # <<<<<<<<<<<<<<
 *     """Get the field-of-view to use for rendering.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_63getEyeRenderFov, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeRenderFov, __pyx_t_7) < 0) __PYX_ERR(0, 5014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5051
 * 
 * 
 * def setEyeRenderFov(int eye, object fov):             # <<<<<<<<<<<<<<
 *     """Set the field-of-view of a given eye. This is used to compute the
 *     projection matrix.
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_65setEyeRenderFov, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setEyeRenderFov, __pyx_t_7) < 0) __PYX_ERR(0, 5051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5102
 * 
 * 
 * def getEyeAspectRatio(int eye):             # <<<<<<<<<<<<<<
 *     """Get the aspect ratio of an eye.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_67getEyeAspectRatio, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeAspectRatio, __pyx_t_7) < 0) __PYX_ERR(0, 5102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5123
 * 
 * 
 * def getEyeHorizontalFovRadians(int eye):             # <<<<<<<<<<<<<<
 *     """Get the angle of the horizontal field-of-view (FOV) for a given eye.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_69getEyeHorizontalFovRadians, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeHorizontalFovRadians, __pyx_t_7) < 0) __PYX_ERR(0, 5123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5143
 * 
 * 
 * def getEyeVerticalFovRadians(int eye):             # <<<<<<<<<<<<<<
 *     """Get the angle of the vertical field-of-view (FOV) for a given eye.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_71getEyeVerticalFovRadians, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeVerticalFovRadians, __pyx_t_7) < 0) __PYX_ERR(0, 5143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5163
 * 
 * 
 * def getEyeFocalLength(int eye):             # <<<<<<<<<<<<<<
 *     """Get the focal length of the eye's frustum.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_73getEyeFocalLength, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeFocalLength, __pyx_t_7) < 0) __PYX_ERR(0, 5163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5184
 * 
 * 
 * def calcEyeBufferSize(int eye, float texelsPerPixel=1.0):             # <<<<<<<<<<<<<<
 *     """Get the recommended buffer (texture) sizes for eye buffers.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_75calcEyeBufferSize, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calcEyeBufferSize, __pyx_t_7) < 0) __PYX_ERR(0, 5184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5247
 * 
 * 
 * def getLayerEyeFovFlags():             # <<<<<<<<<<<<<<
 *     """Get header flags for the render layer.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_77getLayerEyeFovFlags, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getLayerEyeFovFlags, __pyx_t_7) < 0) __PYX_ERR(0, 5247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5272
 * 
 * 
 * def setLayerEyeFovFlags(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """Set header flags for the render layer.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_79setLayerEyeFovFlags, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setLayerEyeFovFlags, __pyx_t_7) < 0) __PYX_ERR(0, 5272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5312
 * 
 * 
 * def createTextureSwapChainGL(int swapChain, int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int levels=1):             # <<<<<<<<<<<<<<
 *     """Create a texture swap chain for eye image buffers.
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_FORMAT_R8G8B8A8_UNORM_SRGB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_k__43 = __pyx_t_2;
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_81createTextureSwapChainGL, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_createTextureSwapChainGL, __pyx_t_7) < 0) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5391
 * 
 * 
 * def getTextureSwapChainLengthGL(int swapChain):             # <<<<<<<<<<<<<<
 *     """Get the length of a specified swap chain.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_83getTextureSwapChainLengthGL, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTextureSwapChainLengthGL, __pyx_t_7) < 0) __PYX_ERR(0, 5391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5438
 * 
 * 
 * def getTextureSwapChainCurrentIndex(int swapChain):             # <<<<<<<<<<<<<<
 *     """Get the current buffer index within the swap chain.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_85getTextureSwapChainCurrentIndex, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTextureSwapChainCurrentIndex, __pyx_t_7) < 0) __PYX_ERR(0, 5438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5476
 * 
 * 
 * def getTextureSwapChainBufferGL(int swapChain, int index):             # <<<<<<<<<<<<<<
 *     """Get the texture buffer as an OpenGL name at a specific index in the
 *     swap chain for a given swapChain.
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_87getTextureSwapChainBufferGL, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTextureSwapChainBufferGL, __pyx_t_7) < 0) __PYX_ERR(0, 5476, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5524
 * 
 * 
 * def setEyeColorTextureSwapChain(int eye, int swapChain):             # <<<<<<<<<<<<<<
 *     """Set the color texture swap chain for a given eye.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_89setEyeColorTextureSwapChain, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setEyeColorTextureSwapChain, __pyx_t_7) < 0) __PYX_ERR(0, 5524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5570
 * 
 * 
 * def createMirrorTexture(int width, int height, int textureFormat=FORMAT_R8G8B8A8_UNORM_SRGB, int mirrorOptions=MIRROR_OPTION_DEFAULT):             # <<<<<<<<<<<<<<
 *     """Create a mirror texture.
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_FORMAT_R8G8B8A8_UNORM_SRGB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_k__46 = __pyx_t_2;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MIRROR_OPTION_DEFAULT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_k__47 = __pyx_t_2;
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_91createMirrorTexture, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_createMirrorTexture, __pyx_t_7) < 0) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5639
 * 
 * 
 * def getMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Mirror texture ID.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_93getMirrorTexture, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getMirrorTexture, __pyx_t_7) < 0) __PYX_ERR(0, 5639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5682
 * 
 * 
 * def getSensorSampleTime():             # <<<<<<<<<<<<<<
 *     """Get the sensor sample timestamp.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_95getSensorSampleTime, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getSensorSampleTime, __pyx_t_7) < 0) __PYX_ERR(0, 5682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5705
 * 
 * 
 * def setSensorSampleTime(double absTime):             # <<<<<<<<<<<<<<
 *     """Set the sensor sample timestamp.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_97setSensorSampleTime, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setSensorSampleTime, __pyx_t_7) < 0) __PYX_ERR(0, 5705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5743
 * 
 * 
 * def getTrackingState(double absTime, bint latencyMarker=True):             # <<<<<<<<<<<<<<
 *     """Get the current tracking state of the head and hands.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_99getTrackingState, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTrackingState, __pyx_t_7) < 0) __PYX_ERR(0, 5743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5787
 * 
 * 
 * def getDevicePoses(object deviceTypes, double absTime, bint latencyMarker=True):             # <<<<<<<<<<<<<<
 *     """Get tracked device poses.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_101getDevicePoses, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getDevicePoses, __pyx_t_7) < 0) __PYX_ERR(0, 5787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":5903
 * 
 * 
 * def calcEyePoses(LibOVRPose headPose, object originPose=None):             # <<<<<<<<<<<<<<
 *     """Calculate eye poses using a given head pose.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_103calcEyePoses, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calcEyePoses, __pyx_t_7) < 0) __PYX_ERR(0, 5903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6000
 * 
 * 
 * def getHmdToEyePose(int eye):             # <<<<<<<<<<<<<<
 *     """HMD to eye pose.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_105getHmdToEyePose, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getHmdToEyePose, __pyx_t_7) < 0) __PYX_ERR(0, 6000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6043
 * 
 * 
 * def setHmdToEyePose(int eye, LibOVRPose eyePose):             # <<<<<<<<<<<<<<
 *     """Set the HMD eye poses.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_107setHmdToEyePose, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setHmdToEyePose, __pyx_t_7) < 0) __PYX_ERR(0, 6043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6073
 * 
 * 
 * def getEyeRenderPose(int eye):             # <<<<<<<<<<<<<<
 *     """Get eye render poses.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_109getEyeRenderPose, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeRenderPose, __pyx_t_7) < 0) __PYX_ERR(0, 6073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6123
 * 
 * 
 * def setEyeRenderPose(int eye, LibOVRPose eyePose):             # <<<<<<<<<<<<<<
 *     """Set eye render pose.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_111setEyeRenderPose, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setEyeRenderPose, __pyx_t_7) < 0) __PYX_ERR(0, 6123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6168
 * 
 * 
 * def getEyeProjectionMatrix(int eye, float nearClip=0.01, float farClip=1000.0, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *     """Compute the projection matrix.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_113getEyeProjectionMatrix, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeProjectionMatrix, __pyx_t_7) < 0) __PYX_ERR(0, 6168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6265
 * 
 * 
 * def getEyeRenderViewport(int eye, np.ndarray[np.int_t, ndim=1] out=None):             # <<<<<<<<<<<<<<
 *     """Get the eye render viewport.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_115getEyeRenderViewport, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeRenderViewport, __pyx_t_7) < 0) __PYX_ERR(0, 6265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6301
 * 
 * 
 * def setEyeRenderViewport(int eye, object values):             # <<<<<<<<<<<<<<
 *     """Set the eye render viewport.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_117setEyeRenderViewport, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setEyeRenderViewport, __pyx_t_7) < 0) __PYX_ERR(0, 6301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6343
 * 
 * 
 * def getEyeViewMatrix(int eye, np.ndarray[np.float32_t, ndim=2] out=None):             # <<<<<<<<<<<<<<
 *     """Compute a view matrix for a specified eye.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_119getEyeViewMatrix, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getEyeViewMatrix, __pyx_t_7) < 0) __PYX_ERR(0, 6343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6381
 * 
 * 
 * def getPredictedDisplayTime(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Get the predicted time a frame will be displayed.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_121getPredictedDisplayTime, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getPredictedDisplayTime, __pyx_t_7) < 0) __PYX_ERR(0, 6381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6403
 * 
 * 
 * def timeInSeconds():             # <<<<<<<<<<<<<<
 *     """Absolute time in seconds.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_123timeInSeconds, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_timeInSeconds, __pyx_t_7) < 0) __PYX_ERR(0, 6403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6417
 * 
 * 
 * def waitToBeginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Wait until a buffer is available so frame rendering can begin. Must be
 *     called before :func:`beginFrame`.
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_125waitToBeginFrame, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_waitToBeginFrame, __pyx_t_7) < 0) __PYX_ERR(0, 6417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6442
 * 
 * 
 * def beginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Begin rendering the frame. Must be called prior to drawing and
 *     :func:`endFrame`.
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_127beginFrame, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_beginFrame, __pyx_t_7) < 0) __PYX_ERR(0, 6442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6464
 * 
 * 
 * def commitTextureSwapChain(int eye):             # <<<<<<<<<<<<<<
 *     """Commit changes to a given eye's texture swap chain. When called, the
 *     runtime is notified that the texture is ready for use, and the swap
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_129commitTextureSwapChain, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_commitTextureSwapChain, __pyx_t_7) < 0) __PYX_ERR(0, 6464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6497
 * 
 * 
 * def endFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     """Call when rendering a frame has completed. Buffers which have been
 *     committed are passed to the compositor for distortion.
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_131endFrame, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_endFrame, __pyx_t_7) < 0) __PYX_ERR(0, 6497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6542
 * 
 * 
 * def getTrackingOriginType():             # <<<<<<<<<<<<<<
 *     """Get the current tracking origin type.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_133getTrackingOriginType, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTrackingOriginType, __pyx_t_7) < 0) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6565
 * 
 * 
 * def setTrackingOriginType(int value):             # <<<<<<<<<<<<<<
 *     """Set the tracking origin type.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_135setTrackingOriginType, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setTrackingOriginType, __pyx_t_7) < 0) __PYX_ERR(0, 6565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6603
 * 
 * 
 * def recenterTrackingOrigin():             # <<<<<<<<<<<<<<
 *     """Recenter the tracking origin.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_137recenterTrackingOrigin, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_recenterTrackingOrigin, __pyx_t_7) < 0) __PYX_ERR(0, 6603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6627
 * 
 * 
 * def specifyTrackingOrigin(LibOVRPose newOrigin):             # <<<<<<<<<<<<<<
 *     """Specify a new tracking origin.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_139specifyTrackingOrigin, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_specifyTrackingOrigin, __pyx_t_7) < 0) __PYX_ERR(0, 6627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6644
 * 
 * 
 * def clearShouldRecenterFlag():             # <<<<<<<<<<<<<<
 *     """Clear the :py:attr:`LibOVRSessionStatus.shouldRecenter` flag.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_141clearShouldRecenterFlag, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clearShouldRecenterFlag, __pyx_t_7) < 0) __PYX_ERR(0, 6644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6652
 * 
 * 
 * def getTrackerCount():             # <<<<<<<<<<<<<<
 *     """Get the number of attached trackers.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_143getTrackerCount, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTrackerCount, __pyx_t_7) < 0) __PYX_ERR(0, 6652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6674
 * 
 * 
 * def getTrackerInfo(int trackerIndex):             # <<<<<<<<<<<<<<
 *     """Get information about a given tracker.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_145getTrackerInfo, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTrackerInfo, __pyx_t_7) < 0) __PYX_ERR(0, 6674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6705
 * 
 * 
 * def getSessionStatus():             # <<<<<<<<<<<<<<
 *     """Get the current session status.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_147getSessionStatus, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getSessionStatus, __pyx_t_7) < 0) __PYX_ERR(0, 6705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6744
 * 
 * 
 * def getPerfStats():             # <<<<<<<<<<<<<<
 *     """Get detailed compositor frame statistics.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_149getPerfStats, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getPerfStats, __pyx_t_7) < 0) __PYX_ERR(0, 6744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6771
 * 
 * 
 * def resetPerfStats():             # <<<<<<<<<<<<<<
 *     """Reset frame performance statistics.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_151resetPerfStats, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_resetPerfStats, __pyx_t_7) < 0) __PYX_ERR(0, 6771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6790
 * 
 * 
 * def getLastErrorInfo():             # <<<<<<<<<<<<<<
 *     """Get the last error code and information string reported by the API.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_153getLastErrorInfo, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getLastErrorInfo, __pyx_t_7) < 0) __PYX_ERR(0, 6790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6825
 * 
 * 
 * def setBoundaryColor(float red, float green, float blue):             # <<<<<<<<<<<<<<
 *     """Set the boundary color.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_155setBoundaryColor, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setBoundaryColor, __pyx_t_7) < 0) __PYX_ERR(0, 6825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6863
 * 
 * 
 * def resetBoundaryColor():             # <<<<<<<<<<<<<<
 *     """Reset the boundary color to system default.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_157resetBoundaryColor, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_resetBoundaryColor, __pyx_t_7) < 0) __PYX_ERR(0, 6863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6879
 * 
 * 
 * def getBoundaryVisible():             # <<<<<<<<<<<<<<
 *     """Check if the Guardian boundary is visible.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_159getBoundaryVisible, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getBoundaryVisible, __pyx_t_7) < 0) __PYX_ERR(0, 6879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6905
 * 
 * 
 * def showBoundary():             # <<<<<<<<<<<<<<
 *     """Show the boundary.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_161showBoundary, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_showBoundary, __pyx_t_7) < 0) __PYX_ERR(0, 6905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6924
 * 
 * 
 * def hideBoundary():             # <<<<<<<<<<<<<<
 *     """Hide the boundry.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_163hideBoundary, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hideBoundary, __pyx_t_7) < 0) __PYX_ERR(0, 6924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6940
 * 
 * 
 * def getBoundaryDimensions(int boundaryType):             # <<<<<<<<<<<<<<
 *     """Get the dimensions of the boundary.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_165getBoundaryDimensions, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getBoundaryDimensions, __pyx_t_7) < 0) __PYX_ERR(0, 6940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":6971
 * 
 * 
 * def testBoundary(int deviceBitmask, int boundaryType):             # <<<<<<<<<<<<<<
 *     """Test collision of tracked devices on boundary.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_167testBoundary, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_testBoundary, __pyx_t_7) < 0) __PYX_ERR(0, 6971, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7010
 * 
 * 
 * def getConnectedControllerTypes():             # <<<<<<<<<<<<<<
 *     """Get connected controller types.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_169getConnectedControllerTypes, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getConnectedControllerTypes, __pyx_t_7) < 0) __PYX_ERR(0, 7010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7073
 * 
 * 
 * def updateInputState(int controller):             # <<<<<<<<<<<<<<
 *     """Refresh the input state of a controller.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_171updateInputState, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateInputState, __pyx_t_7) < 0) __PYX_ERR(0, 7073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7155
 * 
 * 
 * def getButton(int controller, int button, str testState='continuous'):             # <<<<<<<<<<<<<<
 *     """Get a button state.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_173getButton, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getButton, __pyx_t_7) < 0) __PYX_ERR(0, 7155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7294
 * 
 * 
 * def getTouch(int controller, int touch, str testState='continuous'):             # <<<<<<<<<<<<<<
 *     """Get a touch state.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_175getTouch, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTouch, __pyx_t_7) < 0) __PYX_ERR(0, 7294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7432
 * 
 * 
 * def getThumbstickValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog thumbstick values.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_177getThumbstickValues, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getThumbstickValues, __pyx_t_7) < 0) __PYX_ERR(0, 7432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7521
 * 
 * 
 * def getIndexTriggerValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog index trigger values.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_179getIndexTriggerValues, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getIndexTriggerValues, __pyx_t_7) < 0) __PYX_ERR(0, 7521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7616
 * 
 * 
 * def getHandTriggerValues(int controller, bint deadzone=False):             # <<<<<<<<<<<<<<
 *     """Get analog hand trigger values.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_181getHandTriggerValues, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getHandTriggerValues, __pyx_t_7) < 0) __PYX_ERR(0, 7616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7711
 * 
 * 
 * def setControllerVibration(int controller, str frequency, float amplitude):             # <<<<<<<<<<<<<<
 *     """Vibrate a controller.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_183setControllerVibration, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setControllerVibration, __pyx_t_7) < 0) __PYX_ERR(0, 7711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7773
 * 
 * 
 * def getHapticsInfo(int controller):             # <<<<<<<<<<<<<<
 *     """Get information about the haptics engine for a particular controller.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_185getHapticsInfo, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getHapticsInfo, __pyx_t_7) < 0) __PYX_ERR(0, 7773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7806
 * 
 * 
 * def submitControllerVibration(int controller, LibOVRHapticsBuffer buffer):             # <<<<<<<<<<<<<<
 *     """Submit a haptics buffer to Touch controllers.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_187submitControllerVibration, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_submitControllerVibration, __pyx_t_7) < 0) __PYX_ERR(0, 7806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7842
 * 
 * 
 * def getControllerPlaybackState(int controller):             # <<<<<<<<<<<<<<
 *     """Get the playback state of a touch controller.
 * 
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_189getControllerPlaybackState, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getControllerPlaybackState, __pyx_t_7) < 0) __PYX_ERR(0, 7842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":7878
 * 
 * 
 * def cullPose(int eye, LibOVRPose pose):             # <<<<<<<<<<<<<<
 *     """Test if a pose's bounding box or position falls outside of an eye's view
 *     frustum.
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_6libovr_7_libovr_191cullPose, NULL, __pyx_n_s_psychxr_libovr__libovr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cullPose, __pyx_t_7) < 0) __PYX_ERR(0, 7878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "psychxr/libovr/_libovr.pyx":1
 * # distutils: language=c++             # <<<<<<<<<<<<<<
 * #  =============================================================================
 * #  Python Interface Module for LibOVR
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "View.MemoryView":209
 *         info.obj = self
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(array self):
 */
  __pyx_t_7 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_7) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_array_type);

  /* "View.MemoryView":286
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
 */
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__263, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_XGOTREF(generic);
  __Pyx_DECREF_SET(generic, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "View.MemoryView":287
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__264, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_XGOTREF(strided);
  __Pyx_DECREF_SET(strided, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "View.MemoryView":288
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__265, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_XGOTREF(indirect);
  __Pyx_DECREF_SET(indirect, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "View.MemoryView":291
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__266, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_XGOTREF(contiguous);
  __Pyx_DECREF_SET(contiguous, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "View.MemoryView":292
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__267, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_XGOTREF(indirect_contiguous);
  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "View.MemoryView":316
 * 
 * DEF THREAD_LOCKS_PREALLOCATED = 8
 * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
 * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
 *     PyThread_allocate_lock(),
 */
  __pyx_memoryview_thread_locks_used = 0;

  /* "View.MemoryView":317
 * DEF THREAD_LOCKS_PREALLOCATED = 8
 * cdef int __pyx_memoryview_thread_locks_used = 0
 * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
 *     PyThread_allocate_lock(),
 *     PyThread_allocate_lock(),
 */
  __pyx_t_12[0] = PyThread_allocate_lock();
  __pyx_t_12[1] = PyThread_allocate_lock();
  __pyx_t_12[2] = PyThread_allocate_lock();
  __pyx_t_12[3] = PyThread_allocate_lock();
  __pyx_t_12[4] = PyThread_allocate_lock();
  __pyx_t_12[5] = PyThread_allocate_lock();
  __pyx_t_12[6] = PyThread_allocate_lock();
  __pyx_t_12[7] = PyThread_allocate_lock();
  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_12, sizeof(__pyx_memoryview_thread_locks[0]) * (8));

  /* "View.MemoryView":545
 *         info.obj = self
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_7 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_7) < 0) __PYX_ERR(1, 545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_memoryview_type);

  /* "View.MemoryView":991
 *         return self.from_object
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_7 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_7) < 0) __PYX_ERR(1, 991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_memoryviewslice_type);

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

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

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init psychxr.libovr._libovr", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init psychxr.libovr._libovr");
  }
  __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;
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* 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, int 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, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    length = stop - start;
    if (unlikely(length <= 0))
        return PyUnicode_FromUnicode(NULL, 0);
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

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

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

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

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

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

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

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

/* SliceObject */
static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_ass_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_ass_slice(obj, cstart, cstop, value);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_ass_subscript))
#endif
    {
        int result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_ass_subscript(obj, py_slice, value);
#else
        result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object does not support slice %.10s",
        Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
bad:
    return -1;
}

/* IsLittleEndian */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
  union {
    uint32_t u32;
    uint8_t u8[4];
  } S;
  S.u32 = 0x01020304;
  return S.u8[0] == 4;
}

/* BufferFormatCheck */
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t < '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1)
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count;
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break;
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue;
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number;
    int ndim = ctx->head->field->type->ndim;
;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    while (*ts && *ts != ')') {
        switch (*ts) {
            case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
            default:  break;
        }
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        return ts;
      case ' ':
      case '\r':
      case '\n':
        ++ts;
        break;
      case '<':
        if (!__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T':
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}':
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }
        CYTHON_FALLTHROUGH;
      case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 'p':
        if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
            ctx->enc_packmode == ctx->new_packmode) {
          ctx->enc_count += ctx->new_count;
          ctx->new_count = 1;
          got_Z = 0;
          ++ts;
          break;
        }
        CYTHON_FALLTHROUGH;
      case 's':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->enc_count = ctx->new_count;
        ctx->enc_packmode = ctx->new_packmode;
        ctx->enc_type = *ts;
        ctx->is_complex = got_Z;
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}

/* BufferGetAndValidate */
  static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
  if (unlikely(info->buf == NULL)) return;
  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
  __Pyx_ReleaseBuffer(info);
}
static void __Pyx_ZeroBuffer(Py_buffer* buf) {
  buf->buf = NULL;
  buf->obj = NULL;
  buf->strides = __Pyx_zeros;
  buf->shape = __Pyx_zeros;
  buf->suboffsets = __Pyx_minusones;
}
static int __Pyx__GetBufferAndValidate(
        Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
        int nd, int cast, __Pyx_BufFmt_StackElem* stack)
{
  buf->buf = NULL;
  if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {
    __Pyx_ZeroBuffer(buf);
    return -1;
  }
  if (unlikely(buf->ndim != nd)) {
    PyErr_Format(PyExc_ValueError,
                 "Buffer has wrong number of dimensions (expected %d, got %d)",
                 nd, buf->ndim);
    goto fail;
  }
  if (!cast) {
    __Pyx_BufFmt_Context ctx;
    __Pyx_BufFmt_Init(&ctx, stack, dtype);
    if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
  }
  if (unlikely((unsigned)buf->itemsize != dtype->size)) {
    PyErr_Format(PyExc_ValueError,
      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
      buf->itemsize, (buf->itemsize > 1) ? "s" : "",
      dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
    goto fail;
  }
  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
  return 0;
fail:;
  __Pyx_SafeReleaseBuffer(buf);
  return -1;
}

/* GetModuleGlobalName */
  #if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* BufferFallbackError */
  static void __Pyx_RaiseBufferFallbackError(void) {
  PyErr_SetString(PyExc_ValueError,
     "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
}

/* BufferIndexError */
  static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

/* PyObjectSetAttrStr */
  #if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* PyObjectCall2Args */
  static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* MemviewSliceInit */
  static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
                        int ndim,
                        __Pyx_memviewslice *memviewslice,
                        int memview_is_new_reference)
{
    __Pyx_RefNannyDeclarations
    int i, retval=-1;
    Py_buffer *buf = &memview->view;
    __Pyx_RefNannySetupContext("init_memviewslice", 0);
    if (!buf) {
        PyErr_SetString(PyExc_ValueError,
            "buf is NULL.");
        goto fail;
    } else if (memviewslice->memview || memviewslice->data) {
        PyErr_SetString(PyExc_ValueError,
            "memviewslice is already initialized!");
        goto fail;
    }
    if (buf->strides) {
        for (i = 0; i < ndim; i++) {
            memviewslice->strides[i] = buf->strides[i];
        }
    } else {
        Py_ssize_t stride = buf->itemsize;
        for (i = ndim - 1; i >= 0; i--) {
            memviewslice->strides[i] = stride;
            stride *= buf->shape[i];
        }
    }
    for (i = 0; i < ndim; i++) {
        memviewslice->shape[i]   = buf->shape[i];
        if (buf->suboffsets) {
            memviewslice->suboffsets[i] = buf->suboffsets[i];
        } else {
            memviewslice->suboffsets[i] = -1;
        }
    }
    memviewslice->memview = memview;
    memviewslice->data = (char *)buf->buf;
    if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
        Py_INCREF(memview);
    }
    retval = 0;
    goto no_fail;
fail:
    memviewslice->memview = 0;
    memviewslice->data = 0;
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}
#ifndef Py_NO_RETURN
#define Py_NO_RETURN
#endif
static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
    va_list vargs;
    char msg[200];
#ifdef HAVE_STDARG_PROTOTYPES
    va_start(vargs, fmt);
#else
    va_start(vargs);
#endif
    vsnprintf(msg, 200, fmt, vargs);
    va_end(vargs);
    Py_FatalError(msg);
}
static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)++;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)--;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
{
    int first_time;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (!memview || (PyObject *) memview == Py_None)
        return;
    if (__pyx_get_slice_count(memview) < 0)
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         __pyx_get_slice_count(memview), lineno);
    first_time = __pyx_add_acquisition_count(memview) == 0;
    if (first_time) {
        if (have_gil) {
            Py_INCREF((PyObject *) memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_INCREF((PyObject *) memview);
            PyGILState_Release(_gilstate);
        }
    }
}
static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
                                             int have_gil, int lineno) {
    int last_time;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (!memview ) {
        return;
    } else if ((PyObject *) memview == Py_None) {
        memslice->memview = NULL;
        return;
    }
    if (__pyx_get_slice_count(memview) <= 0)
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         __pyx_get_slice_count(memview), lineno);
    last_time = __pyx_sub_acquisition_count(memview) == 1;
    memslice->data = NULL;
    if (last_time) {
        if (have_gil) {
            Py_CLEAR(memslice->memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_CLEAR(memslice->memview);
            PyGILState_Release(_gilstate);
        }
    } else {
        memslice->memview = NULL;
    }
}

/* PyFloatBinop */
  #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    (void)inplace;
    (void)zerodivision_check;
    if (likely(PyFloat_CheckExact(op1))) {
        a = PyFloat_AS_DOUBLE(op1);
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        switch (size) {
            case  0: a = 0.0; break;
            case -1: a = -(double) digits[0]; break;
            case  1: a = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #else
        {
        #endif
            a = PyLong_AsDouble(op1);
            if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
            
        }
    } else {
        return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
    }
        
        PyFPE_START_PROTECT("divide", return NULL)
        result = a / b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* BytesEquals */
    static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
    static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* DictGetItem */
    #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* RaiseTooManyValuesToUnpack */
    static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
    static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* RaiseNoneIterError */
    static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* GetTopmostException */
    #if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
    #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
    #if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetException */
    #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* None */
    static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* GetAttr */
    static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* ObjectGetItem */
    #if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* GetAttr3 */
    static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* SwapException */
    #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* Import */
    static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

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

/* PyIntBinop */
    #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* None */
    static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* None */
    static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* ImportFrom */
    static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* HasAttr */
    static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

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

/* 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_2);
  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 GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto 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 BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
            ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
            ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto 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_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto GOOD;
BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
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;
}

/* TypeImport */
    #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* CLineInTraceback */
    #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    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;
        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 = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    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);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    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);
}

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
    PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    if (!obj) return;
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
    if ((0)) {}
        else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);
    view->obj = NULL;
    Py_DECREF(obj);
}
#endif


    /* MemviewSliceIsContig */
    static int
__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
{
    int i, index, step, start;
    Py_ssize_t itemsize = mvs.memview->view.itemsize;
    if (order == 'F') {
        step = 1;
        start = 0;
    } else {
        step = -1;
        start = ndim - 1;
    }
    for (i = 0; i < ndim; i++) {
        index = start + step * i;
        if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
            return 0;
        itemsize *= mvs.shape[index];
    }
    return 1;
}

/* OverlappingSlices */
    static void
__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
                               void **out_start, void **out_end,
                               int ndim, size_t itemsize)
{
    char *start, *end;
    int i;
    start = end = slice->data;
    for (i = 0; i < ndim; i++) {
        Py_ssize_t stride = slice->strides[i];
        Py_ssize_t extent = slice->shape[i];
        if (extent == 0) {
            *out_start = *out_end = start;
            return;
        } else {
            if (stride > 0)
                end += stride * (extent - 1);
            else
                start += stride * (extent - 1);
        }
    }
    *out_start = start;
    *out_end = end + itemsize;
}
static int
__pyx_slices_overlap(__Pyx_memviewslice *slice1,
                     __Pyx_memviewslice *slice2,
                     int ndim, size_t itemsize)
{
    void *start1, *end1, *start2, *end2;
    __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
    __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
    return (start1 < end2) && (start2 < end1);
}

/* Capsule */
    static CYTHON_INLINE PyObject *
__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
{
    PyObject *cobj;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(p, sig, NULL);
#else
    cobj = PyCObject_FromVoidPtr(p, NULL);
#endif
    return cobj;
}

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

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrButton(ovrButton value) {
    const ovrButton neg_one = (ovrButton) ((ovrButton) 0 - (ovrButton) 1), const_zero = (ovrButton) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrButton) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrButton) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrButton) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrButton) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrButton) <= 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(ovrButton),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTouch(ovrTouch value) {
    const ovrTouch neg_one = (ovrTouch) ((ovrTouch) 0 - (ovrTouch) 1), const_zero = (ovrTouch) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrTouch) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrTouch) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTouch) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrTouch) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTouch) <= 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(ovrTouch),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrControllerType(ovrControllerType value) {
    const ovrControllerType neg_one = (ovrControllerType) ((ovrControllerType) 0 - (ovrControllerType) 1), const_zero = (ovrControllerType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrControllerType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrControllerType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrControllerType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrControllerType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrControllerType) <= 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(ovrControllerType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrSuccessType(ovrSuccessType value) {
    const ovrSuccessType neg_one = (ovrSuccessType) ((ovrSuccessType) 0 - (ovrSuccessType) 1), const_zero = (ovrSuccessType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrSuccessType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrSuccessType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrSuccessType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrSuccessType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrSuccessType) <= 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(ovrSuccessType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrSuccessTypes(ovrSuccessTypes value) {
    const ovrSuccessTypes neg_one = (ovrSuccessTypes) ((ovrSuccessTypes) 0 - (ovrSuccessTypes) 1), const_zero = (ovrSuccessTypes) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrSuccessTypes) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrSuccessTypes) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrSuccessTypes) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrSuccessTypes) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrSuccessTypes) <= 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(ovrSuccessTypes),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrErrorType(ovrErrorType value) {
    const ovrErrorType neg_one = (ovrErrorType) ((ovrErrorType) 0 - (ovrErrorType) 1), const_zero = (ovrErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrErrorType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrErrorType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrErrorType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrErrorType) <= 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(ovrErrorType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrEyeType(ovrEyeType value) {
    const ovrEyeType neg_one = (ovrEyeType) ((ovrEyeType) 0 - (ovrEyeType) 1), const_zero = (ovrEyeType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrEyeType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrEyeType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrEyeType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrEyeType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrEyeType) <= 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(ovrEyeType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrHandType(ovrHandType value) {
    const ovrHandType neg_one = (ovrHandType) ((ovrHandType) 0 - (ovrHandType) 1), const_zero = (ovrHandType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrHandType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrHandType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrHandType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrHandType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrHandType) <= 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(ovrHandType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTextureFormat(ovrTextureFormat value) {
    const ovrTextureFormat neg_one = (ovrTextureFormat) ((ovrTextureFormat) 0 - (ovrTextureFormat) 1), const_zero = (ovrTextureFormat) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrTextureFormat) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrTextureFormat) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTextureFormat) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrTextureFormat) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTextureFormat) <= 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(ovrTextureFormat),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTrackedDeviceType(ovrTrackedDeviceType value) {
    const ovrTrackedDeviceType neg_one = (ovrTrackedDeviceType) ((ovrTrackedDeviceType) 0 - (ovrTrackedDeviceType) 1), const_zero = (ovrTrackedDeviceType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrTrackedDeviceType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrTrackedDeviceType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTrackedDeviceType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrTrackedDeviceType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTrackedDeviceType) <= 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(ovrTrackedDeviceType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTrackingOrigin(ovrTrackingOrigin value) {
    const ovrTrackingOrigin neg_one = (ovrTrackingOrigin) ((ovrTrackingOrigin) 0 - (ovrTrackingOrigin) 1), const_zero = (ovrTrackingOrigin) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrTrackingOrigin) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrTrackingOrigin) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTrackingOrigin) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrTrackingOrigin) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTrackingOrigin) <= 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(ovrTrackingOrigin),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrStatusBits(ovrStatusBits value) {
    const ovrStatusBits neg_one = (ovrStatusBits) ((ovrStatusBits) 0 - (ovrStatusBits) 1), const_zero = (ovrStatusBits) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrStatusBits) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrStatusBits) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrStatusBits) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrStatusBits) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrStatusBits) <= 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(ovrStatusBits),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrPerfHudMode(ovrPerfHudMode value) {
    const ovrPerfHudMode neg_one = (ovrPerfHudMode) ((ovrPerfHudMode) 0 - (ovrPerfHudMode) 1), const_zero = (ovrPerfHudMode) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrPerfHudMode) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrPerfHudMode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrPerfHudMode) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrPerfHudMode) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrPerfHudMode) <= 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(ovrPerfHudMode),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrDebugHudStereoMode(ovrDebugHudStereoMode value) {
    const ovrDebugHudStereoMode neg_one = (ovrDebugHudStereoMode) ((ovrDebugHudStereoMode) 0 - (ovrDebugHudStereoMode) 1), const_zero = (ovrDebugHudStereoMode) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrDebugHudStereoMode) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrDebugHudStereoMode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrDebugHudStereoMode) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrDebugHudStereoMode) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrDebugHudStereoMode) <= 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(ovrDebugHudStereoMode),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrBoundaryType(ovrBoundaryType value) {
    const ovrBoundaryType neg_one = (ovrBoundaryType) ((ovrBoundaryType) 0 - (ovrBoundaryType) 1), const_zero = (ovrBoundaryType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrBoundaryType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrBoundaryType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrBoundaryType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrBoundaryType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrBoundaryType) <= 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(ovrBoundaryType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlags value) {
    const ovrLayerFlags neg_one = (ovrLayerFlags) ((ovrLayerFlags) 0 - (ovrLayerFlags) 1), const_zero = (ovrLayerFlags) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrLayerFlags) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrLayerFlags) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrLayerFlags) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrLayerFlags) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrLayerFlags) <= 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(ovrLayerFlags),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrHmdType(ovrHmdType value) {
    const ovrHmdType neg_one = (ovrHmdType) ((ovrHmdType) 0 - (ovrHmdType) 1), const_zero = (ovrHmdType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrHmdType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrHmdType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrHmdType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrHmdType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrHmdType) <= 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(ovrHmdType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOptions value) {
    const ovrMirrorOptions neg_one = (ovrMirrorOptions) ((ovrMirrorOptions) 0 - (ovrMirrorOptions) 1), const_zero = (ovrMirrorOptions) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrMirrorOptions) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrMirrorOptions) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrMirrorOptions) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrMirrorOptions) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrMirrorOptions) <= 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(ovrMirrorOptions),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrLogLevel(ovrLogLevel value) {
    const ovrLogLevel neg_one = (ovrLogLevel) ((ovrLogLevel) 0 - (ovrLogLevel) 1), const_zero = (ovrLogLevel) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrLogLevel) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrLogLevel) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrLogLevel) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrLogLevel) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrLogLevel) <= 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(ovrLogLevel),
                                     little, !is_unsigned);
    }
}

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

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    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);
    }
}

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

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrBool(ovrBool value) {
    const ovrBool neg_one = (ovrBool) ((ovrBool) 0 - (ovrBool) 1), const_zero = (ovrBool) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrBool) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrBool) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrBool) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrBool) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrBool) <= 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(ovrBool),
                                     little, !is_unsigned);
    }
}

static PyObject* __pyx_convert__to_py_ovrSessionStatus(ovrSessionStatus s) {
      PyObject* res;
      PyObject* member;
      res = __Pyx_PyDict_NewPresized(9); if (unlikely(!res)) return NULL;
      member = __Pyx_PyInt_From_ovrBool(s.IsVisible); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_IsVisible, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_ovrBool(s.HmdPresent); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_HmdPresent, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_ovrBool(s.HmdMounted); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_HmdMounted, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_ovrBool(s.DisplayLost); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_DisplayLost, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_ovrBool(s.ShouldQuit); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_ShouldQuit, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_ovrBool(s.ShouldRecenter); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_ShouldRecenter, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_ovrBool(s.HasInputFocus); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_HasInputFocus, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_ovrBool(s.OverlayPresent); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_OverlayPresent, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_ovrBool(s.DepthRequested); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_DepthRequested, member) < 0)) goto bad;
      Py_DECREF(member);
      return res;
      bad:
      Py_XDECREF(member);
      Py_DECREF(res);
      return NULL;
    }
    /* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) ((int32_t) 0 - (int32_t) 1), const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

/* Declarations */
    #if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
    #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = 1.0 / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = 1.0 / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_float(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

/* Declarations */
    #if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
    #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = 1.0 / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = 1.0 / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_double(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
    const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum NPY_TYPES) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
                                     little, !is_unsigned);
    }
}

/* MemviewSliceCopyTemplate */
    static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object)
{
    __Pyx_RefNannyDeclarations
    int i;
    __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
    struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
    Py_buffer *buf = &from_memview->view;
    PyObject *shape_tuple = NULL;
    PyObject *temp_int = NULL;
    struct __pyx_array_obj *array_obj = NULL;
    struct __pyx_memoryview_obj *memview_obj = NULL;
    __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
    for (i = 0; i < ndim; i++) {
        if (from_mvs->suboffsets[i] >= 0) {
            PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
                                           "indirect dimensions (axis %d)", i);
            goto fail;
        }
    }
    shape_tuple = PyTuple_New(ndim);
    if (unlikely(!shape_tuple)) {
        goto fail;
    }
    __Pyx_GOTREF(shape_tuple);
    for(i = 0; i < ndim; i++) {
        temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
        if(unlikely(!temp_int)) {
            goto fail;
        } else {
            PyTuple_SET_ITEM(shape_tuple, i, temp_int);
            temp_int = NULL;
        }
    }
    array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
    if (unlikely(!array_obj)) {
        goto fail;
    }
    __Pyx_GOTREF(array_obj);
    memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                    (PyObject *) array_obj, contig_flag,
                                    dtype_is_object,
                                    from_mvs->memview->typeinfo);
    if (unlikely(!memview_obj))
        goto fail;
    if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
        goto fail;
    if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
                                                dtype_is_object) < 0))
        goto fail;
    goto no_fail;
fail:
    __Pyx_XDECREF(new_mvs.memview);
    new_mvs.memview = NULL;
    new_mvs.data = NULL;
no_fail:
    __Pyx_XDECREF(shape_tuple);
    __Pyx_XDECREF(temp_int);
    __Pyx_XDECREF(array_obj);
    __Pyx_RefNannyFinishContext();
    return new_mvs;
}

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

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

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

/* CIntFromPy */
    static CYTHON_INLINE ovrTrackedDeviceType __Pyx_PyInt_As_ovrTrackedDeviceType(PyObject *x) {
    const ovrTrackedDeviceType neg_one = (ovrTrackedDeviceType) ((ovrTrackedDeviceType) 0 - (ovrTrackedDeviceType) 1), const_zero = (ovrTrackedDeviceType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(ovrTrackedDeviceType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (ovrTrackedDeviceType) 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 (ovrTrackedDeviceType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, digit, digits[0])
                case 2:
                    if (8 * sizeof(ovrTrackedDeviceType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(ovrTrackedDeviceType) >= 2 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) (((((ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(ovrTrackedDeviceType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(ovrTrackedDeviceType) >= 3 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) (((((((ovrTrackedDeviceType)digits[2]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(ovrTrackedDeviceType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, 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(ovrTrackedDeviceType) >= 4 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) (((((((((ovrTrackedDeviceType)digits[3]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[2]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)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 (ovrTrackedDeviceType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(ovrTrackedDeviceType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(ovrTrackedDeviceType, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(ovrTrackedDeviceType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(ovrTrackedDeviceType, 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 (ovrTrackedDeviceType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(ovrTrackedDeviceType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(ovrTrackedDeviceType) - 1 > 2 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) (((ovrTrackedDeviceType)-1)*(((((ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(ovrTrackedDeviceType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(ovrTrackedDeviceType) - 1 > 2 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) ((((((ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(ovrTrackedDeviceType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(ovrTrackedDeviceType) - 1 > 3 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) (((ovrTrackedDeviceType)-1)*(((((((ovrTrackedDeviceType)digits[2]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(ovrTrackedDeviceType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(ovrTrackedDeviceType) - 1 > 3 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) ((((((((ovrTrackedDeviceType)digits[2]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(ovrTrackedDeviceType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, 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(ovrTrackedDeviceType) - 1 > 4 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) (((ovrTrackedDeviceType)-1)*(((((((((ovrTrackedDeviceType)digits[3]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[2]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(ovrTrackedDeviceType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(ovrTrackedDeviceType, 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(ovrTrackedDeviceType) - 1 > 4 * PyLong_SHIFT) {
                            return (ovrTrackedDeviceType) ((((((((((ovrTrackedDeviceType)digits[3]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[2]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[1]) << PyLong_SHIFT) | (ovrTrackedDeviceType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(ovrTrackedDeviceType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(ovrTrackedDeviceType, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(ovrTrackedDeviceType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(ovrTrackedDeviceType, 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
            ovrTrackedDeviceType 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 (ovrTrackedDeviceType) -1;
        }
    } else {
        ovrTrackedDeviceType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (ovrTrackedDeviceType) -1;
        val = __Pyx_PyInt_As_ovrTrackedDeviceType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to ovrTrackedDeviceType");
    return (ovrTrackedDeviceType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to ovrTrackedDeviceType");
    return (ovrTrackedDeviceType) -1;
}

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

/* TypeInfoCompare */
    static int
__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
{
    int i;
    if (!a || !b)
        return 0;
    if (a == b)
        return 1;
    if (a->size != b->size || a->typegroup != b->typegroup ||
            a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
        if (a->typegroup == 'H' || b->typegroup == 'H') {
            return a->size == b->size;
        } else {
            return 0;
        }
    }
    if (a->ndim) {
        for (i = 0; i < a->ndim; i++)
            if (a->arraysize[i] != b->arraysize[i])
                return 0;
    }
    if (a->typegroup == 'S') {
        if (a->flags != b->flags)
            return 0;
        if (a->fields || b->fields) {
            if (!(a->fields && b->fields))
                return 0;
            for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
                __Pyx_StructField *field_a = a->fields + i;
                __Pyx_StructField *field_b = b->fields + i;
                if (field_a->offset != field_b->offset ||
                    !__pyx_typeinfo_cmp(field_a->type, field_b->type))
                    return 0;
            }
            return !a->fields[i].type && !b->fields[i].type;
        }
    }
    return 1;
}

/* MemviewSliceValidateAndInit */
    static int
__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
{
    if (buf->shape[dim] <= 1)
        return 1;
    if (buf->strides) {
        if (spec & __Pyx_MEMVIEW_CONTIG) {
            if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
                if (buf->strides[dim] != sizeof(void *)) {
                    PyErr_Format(PyExc_ValueError,
                                 "Buffer is not indirectly contiguous "
                                 "in dimension %d.", dim);
                    goto fail;
                }
            } else if (buf->strides[dim] != buf->itemsize) {
                PyErr_SetString(PyExc_ValueError,
                                "Buffer and memoryview are not contiguous "
                                "in the same dimension.");
                goto fail;
            }
        }
        if (spec & __Pyx_MEMVIEW_FOLLOW) {
            Py_ssize_t stride = buf->strides[dim];
            if (stride < 0)
                stride = -stride;
            if (stride < buf->itemsize) {
                PyErr_SetString(PyExc_ValueError,
                                "Buffer and memoryview are not contiguous "
                                "in the same dimension.");
                goto fail;
            }
        }
    } else {
        if (spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1) {
            PyErr_Format(PyExc_ValueError,
                         "C-contiguous buffer is not contiguous in "
                         "dimension %d", dim);
            goto fail;
        } else if (spec & (__Pyx_MEMVIEW_PTR)) {
            PyErr_Format(PyExc_ValueError,
                         "C-contiguous buffer is not indirect in "
                         "dimension %d", dim);
            goto fail;
        } else if (buf->suboffsets) {
            PyErr_SetString(PyExc_ValueError,
                            "Buffer exposes suboffsets but no strides");
            goto fail;
        }
    }
    return 1;
fail:
    return 0;
}
static int
__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
{
    if (spec & __Pyx_MEMVIEW_DIRECT) {
        if (buf->suboffsets && buf->suboffsets[dim] >= 0) {
            PyErr_Format(PyExc_ValueError,
                         "Buffer not compatible with direct access "
                         "in dimension %d.", dim);
            goto fail;
        }
    }
    if (spec & __Pyx_MEMVIEW_PTR) {
        if (!buf->suboffsets || (buf->suboffsets && buf->suboffsets[dim] < 0)) {
            PyErr_Format(PyExc_ValueError,
                         "Buffer is not indirectly accessible "
                         "in dimension %d.", dim);
            goto fail;
        }
    }
    return 1;
fail:
    return 0;
}
static int
__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
{
    int i;
    if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
        Py_ssize_t stride = 1;
        for (i = 0; i < ndim; i++) {
            if (stride * buf->itemsize != buf->strides[i] &&
                    buf->shape[i] > 1)
            {
                PyErr_SetString(PyExc_ValueError,
                    "Buffer not fortran contiguous.");
                goto fail;
            }
            stride = stride * buf->shape[i];
        }
    } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
        Py_ssize_t stride = 1;
        for (i = ndim - 1; i >- 1; i--) {
            if (stride * buf->itemsize != buf->strides[i] &&
                    buf->shape[i] > 1) {
                PyErr_SetString(PyExc_ValueError,
                    "Buffer not C contiguous.");
                goto fail;
            }
            stride = stride * buf->shape[i];
        }
    }
    return 1;
fail:
    return 0;
}
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj)
{
    struct __pyx_memoryview_obj *memview, *new_memview;
    __Pyx_RefNannyDeclarations
    Py_buffer *buf;
    int i, spec = 0, retval = -1;
    __Pyx_BufFmt_Context ctx;
    int from_memoryview = __pyx_memoryview_check(original_obj);
    __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
    if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
                                                            original_obj)->typeinfo)) {
        memview = (struct __pyx_memoryview_obj *) original_obj;
        new_memview = NULL;
    } else {
        memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                            original_obj, buf_flags, 0, dtype);
        new_memview = memview;
        if (unlikely(!memview))
            goto fail;
    }
    buf = &memview->view;
    if (buf->ndim != ndim) {
        PyErr_Format(PyExc_ValueError,
                "Buffer has wrong number of dimensions (expected %d, got %d)",
                ndim, buf->ndim);
        goto fail;
    }
    if (new_memview) {
        __Pyx_BufFmt_Init(&ctx, stack, dtype);
        if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
    }
    if ((unsigned) buf->itemsize != dtype->size) {
        PyErr_Format(PyExc_ValueError,
                     "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
                     "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
                     buf->itemsize,
                     (buf->itemsize > 1) ? "s" : "",
                     dtype->name,
                     dtype->size,
                     (dtype->size > 1) ? "s" : "");
        goto fail;
    }
    for (i = 0; i < ndim; i++) {
        spec = axes_specs[i];
        if (!__pyx_check_strides(buf, i, ndim, spec))
            goto fail;
        if (!__pyx_check_suboffsets(buf, i, ndim, spec))
            goto fail;
    }
    if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))
        goto fail;
    if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
                                         new_memview != NULL) == -1)) {
        goto fail;
    }
    retval = 0;
    goto no_fail;
fail:
    Py_XDECREF(new_memview);
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}

/* ObjectToMemviewSlice */
    static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_float(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
                                                 PyBUF_RECORDS_RO | writable_flag, 2,
                                                 &__Pyx_TypeInfo_float, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

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

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