29#ifndef PY_SSIZE_T_CLEAN
30#define PY_SSIZE_T_CLEAN
33#if defined(Py_LIMITED_API)
34 #if !defined(CYTHON_LIMITED_API)
35 #define CYTHON_LIMITED_API 1
37#elif defined(CYTHON_LIMITED_API)
39 #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
41 #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
47 #error Python headers needed to compile C extensions, please install development version of Python.
48#elif PY_VERSION_HEX < 0x03090000
49 #error Cython requires Python 3.9+.
50#elif defined(Py_LIMITED_API) && (Py_LIMITED_API & 0xFFFF0000) > (PY_VERSION_HEX & 0xFFFF0000)
51 #error 'Py_LIMITED_API' can only select past Python X.Y versions, not future ones.
53#define __PYX_ABI_VERSION "3_3_0"
54#define CYTHON_HEX_VERSION 0x030300F0
55#define CYTHON_FUTURE_DIVISION 1
59 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
61#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
73 #define __Pyx_has_cbuiltin(name) __has_builtin(name)
75 #define __Pyx_has_cbuiltin(name) (0)
78 #define DL_IMPORT(t) t
81 #define DL_EXPORT(t) t
85 #define PY_LONG_LONG LONG_LONG
88 #define Py_HUGE_VAL HUGE_VAL
90#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
91#if defined(CYTHON_LIMITED_API)
93 #undef __PYX_LIMITED_VERSION_HEX
94 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
95 #if Py_LIMITED_API < 0x03090000
96 #error "Cython 3.3 requires the Python Limited API version to be 3.9 or greater."
99 #if defined(GRAALVM_PYTHON) || defined(PYPY_VERSION)
101 #pragma message ("Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
102 code for PyPy and GraalPy and is unlikely to work.")
104 #warning "Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
105 code for PyPy and GraalPy and is unlikely to work."
108 #define CYTHON_COMPILING_IN_PYPY 0
109 #define CYTHON_COMPILING_IN_CPYTHON 0
110 #define CYTHON_COMPILING_IN_LIMITED_API 1
111 #define CYTHON_COMPILING_IN_GRAAL 0
112 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
113 #undef CYTHON_USE_TYPE_SLOTS
114 #define CYTHON_USE_TYPE_SLOTS 0
115 #undef CYTHON_USE_TYPE_SPECS
116 #define CYTHON_USE_TYPE_SPECS 1
117 #undef CYTHON_USE_PYTYPE_LOOKUP
118 #define CYTHON_USE_PYTYPE_LOOKUP 0
119 #undef CYTHON_USE_PYLIST_INTERNALS
120 #define CYTHON_USE_PYLIST_INTERNALS 0
121 #undef CYTHON_USE_UNICODE_INTERNALS
122 #define CYTHON_USE_UNICODE_INTERNALS 0
123 #ifndef CYTHON_USE_UNICODE_WRITER
124 #define CYTHON_USE_UNICODE_WRITER 0
126 #undef CYTHON_USE_PYLONG_INTERNALS
127 #define CYTHON_USE_PYLONG_INTERNALS 0
128 #ifndef CYTHON_AVOID_BORROWED_REFS
129 #define CYTHON_AVOID_BORROWED_REFS 0
131 #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
132 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
134 #undef CYTHON_ASSUME_SAFE_MACROS
135 #define CYTHON_ASSUME_SAFE_MACROS 0
136 #undef CYTHON_ASSUME_SAFE_SIZE
137 #define CYTHON_ASSUME_SAFE_SIZE 0
138 #undef CYTHON_UNPACK_METHODS
139 #define CYTHON_UNPACK_METHODS 0
140 #undef CYTHON_FAST_THREAD_STATE
141 #define CYTHON_FAST_THREAD_STATE 0
142 #undef CYTHON_FAST_GIL
143 #define CYTHON_FAST_GIL 0
144 #undef CYTHON_VECTORCALL
145 #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
146 #ifndef CYTHON_VECTORCALL_TPNEW
147 #define CYTHON_VECTORCALL_TPNEW (CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
149 #ifndef CYTHON_PEP487_INIT_SUBCLASS
150 #define CYTHON_PEP487_INIT_SUBCLASS 1
152 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
153 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
155 #ifndef CYTHON_USE_MODULE_STATE
156 #define CYTHON_USE_MODULE_STATE 0
158 #undef CYTHON_USE_SYS_MONITORING
159 #define CYTHON_USE_SYS_MONITORING 0
160 #ifndef CYTHON_USE_TP_FINALIZE
161 #define CYTHON_USE_TP_FINALIZE (__PYX_LIMITED_VERSION_HEX >= 0x030F0000 && PY_VERSION_HEX > 0x030F00A8)
163 #ifndef CYTHON_USE_AM_SEND
164 #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
166 #undef CYTHON_USE_DICT_VERSIONS
167 #define CYTHON_USE_DICT_VERSIONS 0
168 #undef CYTHON_USE_EXC_INFO_STACK
169 #define CYTHON_USE_EXC_INFO_STACK 0
170 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
171 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
173 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
174 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
176 #ifndef CYTHON_USE_FREELISTS
177 #define CYTHON_USE_FREELISTS 1
179 #undef CYTHON_IMMORTAL_CONSTANTS
180 #define CYTHON_IMMORTAL_CONSTANTS 0
181 #if __PYX_LIMITED_VERSION_HEX < 0x030E0000
182 #undef CYTHON_OPAQUE_OBJECTS
183 #define CYTHON_OPAQUE_OBJECTS 0
184 #elif !defined(CYTHON_OPAQUE_OBJECTS)
185 #define CYTHON_OPAQUE_OBJECTS (__PYX_LIMITED_VERSION_HEX >= 0x030F0000)
187#elif defined(GRAALVM_PYTHON)
190 #define CYTHON_COMPILING_IN_PYPY 0
191 #define CYTHON_COMPILING_IN_CPYTHON 0
192 #define CYTHON_COMPILING_IN_LIMITED_API 0
193 #define CYTHON_COMPILING_IN_GRAAL 1
194 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
195 #ifndef CYTHON_USE_TYPE_SLOTS
196 #define CYTHON_USE_TYPE_SLOTS 0
198 #undef CYTHON_USE_TYPE_SPECS
199 #define CYTHON_USE_TYPE_SPECS 0
200 #undef CYTHON_USE_PYTYPE_LOOKUP
201 #define CYTHON_USE_PYTYPE_LOOKUP 0
202 #undef CYTHON_USE_PYLIST_INTERNALS
203 #define CYTHON_USE_PYLIST_INTERNALS 0
204 #undef CYTHON_USE_UNICODE_INTERNALS
205 #define CYTHON_USE_UNICODE_INTERNALS 0
206 #undef CYTHON_USE_UNICODE_WRITER
207 #define CYTHON_USE_UNICODE_WRITER 0
208 #undef CYTHON_USE_PYLONG_INTERNALS
209 #define CYTHON_USE_PYLONG_INTERNALS 0
210 #undef CYTHON_AVOID_BORROWED_REFS
211 #define CYTHON_AVOID_BORROWED_REFS 1
212 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
213 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
214 #undef CYTHON_ASSUME_SAFE_MACROS
215 #define CYTHON_ASSUME_SAFE_MACROS 0
216 #undef CYTHON_ASSUME_SAFE_SIZE
217 #define CYTHON_ASSUME_SAFE_SIZE 0
218 #undef CYTHON_UNPACK_METHODS
219 #define CYTHON_UNPACK_METHODS 0
220 #undef CYTHON_FAST_THREAD_STATE
221 #define CYTHON_FAST_THREAD_STATE 0
222 #undef CYTHON_FAST_GIL
223 #define CYTHON_FAST_GIL 0
224 #ifndef CYTHON_VECTORCALL
225 #define CYTHON_VECTORCALL 1
227 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
228 #undef CYTHON_VECTORCALL_TPNEW
229 #define CYTHON_VECTORCALL_TPNEW 0
230 #elif !defined(CYTHON_VECTORCALL_TPNEW)
231 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
233 #ifndef CYTHON_PEP487_INIT_SUBCLASS
234 #define CYTHON_PEP487_INIT_SUBCLASS 1
236 #undef CYTHON_PEP489_MULTI_PHASE_INIT
237 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
238 #undef CYTHON_USE_MODULE_STATE
239 #define CYTHON_USE_MODULE_STATE 0
240 #undef CYTHON_USE_SYS_MONITORING
241 #define CYTHON_USE_SYS_MONITORING 0
242 #undef CYTHON_USE_TP_FINALIZE
243 #define CYTHON_USE_TP_FINALIZE 0
244 #undef CYTHON_USE_AM_SEND
245 #define CYTHON_USE_AM_SEND 0
246 #undef CYTHON_USE_DICT_VERSIONS
247 #define CYTHON_USE_DICT_VERSIONS 0
248 #undef CYTHON_USE_EXC_INFO_STACK
249 #define CYTHON_USE_EXC_INFO_STACK 1
250 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
251 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
253 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
254 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
256 #undef CYTHON_USE_FREELISTS
257 #define CYTHON_USE_FREELISTS 0
258 #undef CYTHON_IMMORTAL_CONSTANTS
259 #define CYTHON_IMMORTAL_CONSTANTS 0
260 #undef CYTHON_OPAQUE_OBJECTS
261 #define CYTHON_OPAQUE_OBJECTS 0
262#elif defined(PYPY_VERSION)
263 #define CYTHON_COMPILING_IN_PYPY 1
264 #define CYTHON_COMPILING_IN_CPYTHON 0
265 #define CYTHON_COMPILING_IN_LIMITED_API 0
266 #define CYTHON_COMPILING_IN_GRAAL 0
267 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
268 #undef CYTHON_USE_TYPE_SLOTS
269 #define CYTHON_USE_TYPE_SLOTS 1
270 #ifndef CYTHON_USE_TYPE_SPECS
271 #define CYTHON_USE_TYPE_SPECS 0
273 #undef CYTHON_USE_PYTYPE_LOOKUP
274 #define CYTHON_USE_PYTYPE_LOOKUP 0
275 #undef CYTHON_USE_PYLIST_INTERNALS
276 #define CYTHON_USE_PYLIST_INTERNALS 0
277 #undef CYTHON_USE_UNICODE_INTERNALS
278 #define CYTHON_USE_UNICODE_INTERNALS 0
279 #undef CYTHON_USE_UNICODE_WRITER
280 #define CYTHON_USE_UNICODE_WRITER 0
281 #undef CYTHON_USE_PYLONG_INTERNALS
282 #define CYTHON_USE_PYLONG_INTERNALS 0
283 #undef CYTHON_AVOID_BORROWED_REFS
284 #define CYTHON_AVOID_BORROWED_REFS 1
285 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
286 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
287 #undef CYTHON_ASSUME_SAFE_MACROS
288 #define CYTHON_ASSUME_SAFE_MACROS 0
289 #ifndef CYTHON_ASSUME_SAFE_SIZE
290 #define CYTHON_ASSUME_SAFE_SIZE 1
292 #undef CYTHON_UNPACK_METHODS
293 #define CYTHON_UNPACK_METHODS 0
294 #undef CYTHON_FAST_THREAD_STATE
295 #define CYTHON_FAST_THREAD_STATE 0
296 #undef CYTHON_FAST_GIL
297 #define CYTHON_FAST_GIL 0
298 #ifndef CYTHON_VECTORCALL
299 #define CYTHON_VECTORCALL 1
301 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
302 #undef CYTHON_VECTORCALL_TPNEW
303 #define CYTHON_VECTORCALL_TPNEW 0
304 #elif !defined(CYTHON_VECTORCALL_TPNEW)
305 #define CYTHON_VECTORCALL_TPNEW (PYPY_VERSION_NUM >= 0x07030800 && CYTHON_VECTORCALL)
307 #ifndef CYTHON_PEP487_INIT_SUBCLASS
308 #define CYTHON_PEP487_INIT_SUBCLASS 1
310 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
311 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
313 #undef CYTHON_USE_MODULE_STATE
314 #define CYTHON_USE_MODULE_STATE 0
315 #undef CYTHON_USE_SYS_MONITORING
316 #define CYTHON_USE_SYS_MONITORING 0
317 #ifndef CYTHON_USE_TP_FINALIZE
318 #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
320 #undef CYTHON_USE_AM_SEND
321 #define CYTHON_USE_AM_SEND 0
322 #undef CYTHON_USE_DICT_VERSIONS
323 #define CYTHON_USE_DICT_VERSIONS 0
324 #undef CYTHON_USE_EXC_INFO_STACK
325 #define CYTHON_USE_EXC_INFO_STACK 0
326 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
327 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
329 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
330 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
332 #undef CYTHON_USE_FREELISTS
333 #define CYTHON_USE_FREELISTS 0
334 #undef CYTHON_IMMORTAL_CONSTANTS
335 #define CYTHON_IMMORTAL_CONSTANTS 0
336 #undef CYTHON_OPAQUE_OBJECTS
337 #define CYTHON_OPAQUE_OBJECTS 0
339 #define CYTHON_COMPILING_IN_PYPY 0
340 #define CYTHON_COMPILING_IN_CPYTHON 1
341 #define CYTHON_COMPILING_IN_LIMITED_API 0
342 #define CYTHON_COMPILING_IN_GRAAL 0
343 #ifdef Py_GIL_DISABLED
344 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
346 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
348 #if PY_VERSION_HEX < 0x030A0000
349 #undef CYTHON_USE_TYPE_SLOTS
350 #define CYTHON_USE_TYPE_SLOTS 1
351 #elif !defined(CYTHON_USE_TYPE_SLOTS)
352 #define CYTHON_USE_TYPE_SLOTS 1
354 #ifndef CYTHON_USE_TYPE_SPECS
355 #define CYTHON_USE_TYPE_SPECS 0
357 #ifndef CYTHON_USE_PYTYPE_LOOKUP
358 #define CYTHON_USE_PYTYPE_LOOKUP 1
360 #ifndef CYTHON_USE_PYLONG_INTERNALS
361 #define CYTHON_USE_PYLONG_INTERNALS 1
363 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
364 #undef CYTHON_USE_PYLIST_INTERNALS
365 #define CYTHON_USE_PYLIST_INTERNALS 0
366 #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
367 #define CYTHON_USE_PYLIST_INTERNALS 1
369 #ifndef CYTHON_USE_UNICODE_INTERNALS
370 #define CYTHON_USE_UNICODE_INTERNALS 1
372 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
373 #undef CYTHON_USE_UNICODE_WRITER
374 #define CYTHON_USE_UNICODE_WRITER 0
375 #elif !defined(CYTHON_USE_UNICODE_WRITER)
376 #define CYTHON_USE_UNICODE_WRITER 1
378 #ifndef CYTHON_AVOID_BORROWED_REFS
379 #define CYTHON_AVOID_BORROWED_REFS 0
381 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
382 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
383 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
384 #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
385 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
387 #ifndef CYTHON_ASSUME_SAFE_MACROS
388 #define CYTHON_ASSUME_SAFE_MACROS 1
390 #ifndef CYTHON_ASSUME_SAFE_SIZE
391 #define CYTHON_ASSUME_SAFE_SIZE 1
393 #ifndef CYTHON_UNPACK_METHODS
394 #define CYTHON_UNPACK_METHODS 1
396 #ifndef CYTHON_FAST_THREAD_STATE
397 #define CYTHON_FAST_THREAD_STATE 1
399 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
400 #undef CYTHON_FAST_GIL
401 #define CYTHON_FAST_GIL 0
402 #elif !defined(CYTHON_FAST_GIL)
403 #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
405 #ifndef CYTHON_VECTORCALL
406 #define CYTHON_VECTORCALL 1
408 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
409 #undef CYTHON_VECTORCALL_TPNEW
410 #define CYTHON_VECTORCALL_TPNEW 0
411 #elif !defined(CYTHON_VECTORCALL_TPNEW)
412 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
414 #ifndef CYTHON_PEP487_INIT_SUBCLASS
415 #define CYTHON_PEP487_INIT_SUBCLASS 1
417 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
418 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
420 #ifndef CYTHON_USE_MODULE_STATE
421 #define CYTHON_USE_MODULE_STATE 0
423 #ifndef CYTHON_USE_SYS_MONITORING
424 #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
426 #ifndef CYTHON_USE_TP_FINALIZE
427 #define CYTHON_USE_TP_FINALIZE 1
429 #ifndef CYTHON_USE_AM_SEND
430 #define CYTHON_USE_AM_SEND 1
432 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
433 #undef CYTHON_USE_DICT_VERSIONS
434 #define CYTHON_USE_DICT_VERSIONS 0
435 #elif !defined(CYTHON_USE_DICT_VERSIONS)
436 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
438 #ifndef CYTHON_USE_EXC_INFO_STACK
439 #define CYTHON_USE_EXC_INFO_STACK 1
441 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
442 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
444 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
445 #define CYTHON_USE_OWN_PREP_RERAISE_STAR (PY_VERSION_HEX < 0x030C00B2)
447 #ifndef CYTHON_USE_FREELISTS
448 #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
450 #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
451 #undef CYTHON_IMMORTAL_CONSTANTS
452 #define CYTHON_IMMORTAL_CONSTANTS 0
453 #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
454 #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
456 #ifndef CYTHON_OPAQUE_OBJECTS
457 #define CYTHON_OPAQUE_OBJECTS 0
460#if CYTHON_USE_PYLONG_INTERNALS
465 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
468#ifndef __has_attribute
469 #define __has_attribute(x) 0
471#ifndef __has_cpp_attribute
472 #define __has_cpp_attribute(x) 0
474#ifndef CYTHON_RESTRICT
475 #if defined(__GNUC__)
476 #define CYTHON_RESTRICT __restrict__
477 #elif defined(_MSC_VER) && _MSC_VER >= 1400
478 #define CYTHON_RESTRICT __restrict
479 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
480 #define CYTHON_RESTRICT restrict
482 #define CYTHON_RESTRICT
486 #if defined(__cplusplus)
489 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
490 #if __has_cpp_attribute(maybe_unused)
491 #define CYTHON_UNUSED [[maybe_unused]]
494 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
495 #define CYTHON_UNUSED [[maybe_unused]]
499# if defined(__GNUC__)
500# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
501# define CYTHON_UNUSED __attribute__ ((__unused__))
503# define CYTHON_UNUSED
505# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
506# define CYTHON_UNUSED __attribute__ ((__unused__))
508# define CYTHON_UNUSED
511#ifndef CYTHON_UNUSED_VAR
512# if defined(__cplusplus)
513 template<
class T>
void CYTHON_UNUSED_VAR(
const T& ) { }
515# define CYTHON_UNUSED_VAR(x) (void)(x)
518#ifndef CYTHON_MAYBE_UNUSED_VAR
519 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
521#ifndef CYTHON_NCP_UNUSED
522# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
523# define CYTHON_NCP_UNUSED
525# define CYTHON_NCP_UNUSED CYTHON_UNUSED
528#ifndef CYTHON_USE_CPP_STD_MOVE
529 #if defined(__cplusplus) && (\
530 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
531 #define CYTHON_USE_CPP_STD_MOVE 1
533 #define CYTHON_USE_CPP_STD_MOVE 0
536#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
538typedef uintptr_t __pyx_uintptr_t;
539#ifndef CYTHON_FALLTHROUGH
540 #if defined(__cplusplus)
543 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
544 #if __has_cpp_attribute(fallthrough)
545 #define CYTHON_FALLTHROUGH [[fallthrough]]
548 #ifndef CYTHON_FALLTHROUGH
549 #if __has_cpp_attribute(clang::fallthrough)
550 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
551 #elif __has_cpp_attribute(gnu::fallthrough)
552 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
556 #ifndef CYTHON_FALLTHROUGH
557 #if __has_attribute(fallthrough)
558 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
560 #define CYTHON_FALLTHROUGH
563 #if defined(__clang__) && defined(__apple_build_version__)
564 #if __apple_build_version__ < 7000000
565 #undef CYTHON_FALLTHROUGH
566 #define CYTHON_FALLTHROUGH
571 #define __Pyx_UNREACHABLE() Py_UNREACHABLE()
572#elif __Pyx_has_cbuiltin(__builtin_unreachable)
573 #define __Pyx_UNREACHABLE() __builtin_unreachable()
574#elif defined(__clang__) || defined(__INTEL_COMPILER) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
575 #define __Pyx_UNREACHABLE() __builtin_unreachable()
576#elif defined(_MSC_VER)
577 #define __Pyx_UNREACHABLE() __assume(0)
579 #define __Pyx_UNREACHABLE() Py_FatalError("Unreachable C code path reached")
581#ifndef Py_UNREACHABLE
582 #define Py_UNREACHABLE() __Pyx_UNREACHABLE()
585 template <
typename T>
586 struct __PYX_IS_UNSIGNED_IMPL {
static const bool value =
T(0) <
T(-1);};
587 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
589 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
591#if CYTHON_COMPILING_IN_PYPY == 1
592 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
594 #define __PYX_NEED_TP_PRINT_SLOT 0
596#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
597#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
598#define __Pyx_PyErr_FetchException(petype, peval, petb) PyErr_Fetch(petype, peval, petb)
599#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_Restore(etype, eval, etb)
601#define __Pyx_PyErr_FetchException(petype, peval, petb) *(petype)=NULL; *(peval)=PyErr_GetRaisedException(); *(petb)=NULL
602#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_SetRaisedException(eval)
607 #if defined(__clang__)
608 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
609 #elif defined(__GNUC__)
610 #define CYTHON_INLINE __inline__
611 #elif defined(_MSC_VER)
612 #define CYTHON_INLINE __inline
613 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
614 #define CYTHON_INLINE inline
616 #define CYTHON_INLINE
621#define __PYX_BUILD_PY_SSIZE_T "n"
622#define CYTHON_FORMAT_SSIZE_T "z"
623#define __Pyx_BUILTIN_MODULE_NAME "builtins"
624#define __Pyx_DefaultClassType PyType_Type
625#if CYTHON_COMPILING_IN_LIMITED_API
627 static int CO_OPTIMIZED;
630 static int CO_NEWLOCALS;
633 static int CO_VARARGS;
635 #ifndef CO_VARKEYWORDS
636 static int CO_VARKEYWORDS;
638 #ifndef CO_ASYNC_GENERATOR
639 static int CO_ASYNC_GENERATOR;
642 static int CO_GENERATOR;
645 static int CO_COROUTINE;
649 #define CO_COROUTINE 0x80
651 #ifndef CO_ASYNC_GENERATOR
652 #define CO_ASYNC_GENERATOR 0x200
655static int __Pyx_init_co_variables(
void);
656#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
657 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
659 #define __Pyx_Py_Is(x, y) ((x) == (y))
661#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
662 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
664 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
666#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
667 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
669 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
671#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
672 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
674 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
676#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
677#if CYTHON_COMPILING_IN_PYPY
678 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
680 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
682#if CYTHON_COMPILING_IN_LIMITED_API
683static unsigned long __Pyx_Runtime_TPFLAGS_SEQUENCE;
684static unsigned long __Pyx_Runtime_TPFLAGS_MAPPING;
686#define __Pyx_Runtime_TPFLAGS_SEQUENCE Py_TPFLAGS_SEQUENCE
687#define __Pyx_Runtime_TPFLAGS_MAPPING Py_TPFLAGS_MAPPING
689static int __Pyx_init_tpflags_variables(
void);
690#ifndef Py_TPFLAGS_HAVE_FINALIZE
691 #define Py_TPFLAGS_HAVE_FINALIZE 0
693#ifndef Py_TPFLAGS_SEQUENCE
694 #define Py_TPFLAGS_SEQUENCE (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 5)
696#ifndef Py_TPFLAGS_MAPPING
697 #define Py_TPFLAGS_MAPPING (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 6)
699#ifndef Py_TPFLAGS_IMMUTABLETYPE
700 #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
702#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
703 #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
705#ifndef METH_STACKLESS
706 #define METH_STACKLESS 0
708#if !defined(METH_FASTCALL) || CYTHON_COMPILING_IN_PYPY
709 #ifndef METH_FASTCALL
710 #define METH_FASTCALL 0x80
712 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *
const *args, Py_ssize_t nargs);
713 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *
const *args,
714 Py_ssize_t nargs, PyObject *kwnames);
716 #if PY_VERSION_HEX >= 0x030d00A4
717 # define __Pyx_PyCFunctionFast PyCFunctionFast
718 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
720 # define __Pyx_PyCFunctionFast _PyCFunctionFast
721 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
725 #define __Pyx_METH_FASTCALL METH_FASTCALL
726 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
727 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
729 #define __Pyx_METH_FASTCALL METH_VARARGS
730 #define __Pyx_PyCFunction_FastCall PyCFunction
731 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
734 #define __pyx_vectorcallfunc vectorcallfunc
735 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
736 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
738 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
739 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
741#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
742#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
743#if CYTHON_COMPILING_IN_CPYTHON
744#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
745#elif !CYTHON_COMPILING_IN_LIMITED_API
746#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
748#if CYTHON_COMPILING_IN_CPYTHON
749#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
750static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
751 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
754static CYTHON_INLINE
int __Pyx__IsSameCFunction(PyObject *func,
void (*cfunc)(
void)) {
755#if CYTHON_COMPILING_IN_LIMITED_API
756 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
758 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
761#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
762#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
763 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
765 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
767#if CYTHON_COMPILING_IN_PYPY
768 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *
const *, size_t, PyObject *);
770 #define __Pyx_PyCMethod PyCMethod
773 #define METH_METHOD 0x200
775#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
776 #define PyObject_Malloc(s) PyMem_Malloc(s)
777 #define PyObject_Free(p) PyMem_Free(p)
778 #define PyObject_Realloc(p) PyMem_Realloc(p)
780#if CYTHON_COMPILING_IN_LIMITED_API
781 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
782#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
783 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
784 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
785#elif CYTHON_COMPILING_IN_GRAAL
786 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
787 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
789 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
790 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
792#if CYTHON_COMPILING_IN_LIMITED_API
793 #define __Pyx_PyThreadState_Current PyThreadState_Get()
794#elif !CYTHON_FAST_THREAD_STATE
795 #define __Pyx_PyThreadState_Current PyThreadState_GET()
796#elif PY_VERSION_HEX >= 0x030d00A1
797 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
799 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
801#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
802 #define __PYX_SHARED_SIZEOF(T) -((int)sizeof(T))
803 #define __PYX_SHARED_RELATIVE_OFFSET Py_RELATIVE_OFFSET
804 #define CYTHON_OPAQUE_SHARED_TYPES 1
806 #define __PYX_SHARED_SIZEOF(T) sizeof(T)
807 #define __PYX_SHARED_RELATIVE_OFFSET 0
808 #define CYTHON_OPAQUE_SHARED_TYPES 0
810#if CYTHON_USE_MODULE_STATE
811static CYTHON_INLINE
void *__Pyx__PyModule_GetState(PyObject *op)
814 result = PyModule_GetState(op);
816 Py_FatalError(
"Couldn't find the module state");
819#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
821#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
823#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
824#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
825#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
826#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
827#if CYTHON_USE_TYPE_SLOTS
828 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
829 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
830 #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
831 #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
833 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
834 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
835 ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
836 (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
837 __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
838 #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
839 #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
841#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
842#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
844#define __Pyx_PyDict_NewPresized(n) PyDict_New()
846#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
847#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
848#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
849#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
850static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
851 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
852 if (res == NULL && PyErr_Occurred()) {
853 PyErr_WriteUnraisable(NULL);
857#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
858#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
859#define __Pyx_PyDict_GetItemStr PyDict_GetItem
861static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
862#if CYTHON_COMPILING_IN_PYPY
863 return PyDict_GetItem(dict, name);
866 PyDictObject *mp = (PyDictObject*) dict;
867 long hash = ((PyStringObject *) name)->ob_shash;
869 ep = (mp->ma_lookup)(mp, name, hash);
876#define __Pyx_PyDict_GetItemStr PyDict_GetItem
878#if CYTHON_USE_TYPE_SLOTS
879 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
880 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
882 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
883 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
885#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
886#if CYTHON_USE_TYPE_SPECS
887#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
888 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
889 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
890 PyObject_GC_Del(obj);\
894#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
896#if CYTHON_COMPILING_IN_LIMITED_API
897 #define __Pyx_PyUnicode_READY(op) (0)
898 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
899 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
900 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
901 #define __Pyx_PyUnicode_KIND_04(u) __Pyx_PyUnicode_KIND(u)
902 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
903 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
904 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
906 #if PY_VERSION_HEX >= 0x030C0000
907 #define __Pyx_PyUnicode_READY(op) (0)
909 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
910 0 : _PyUnicode_Ready((PyObject *)(op)))
912 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
913 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
914 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
915 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
916 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
917 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
918 #if PY_VERSION_HEX >= 0x030C0000
919 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
921 #if CYTHON_COMPILING_IN_CPYTHON
922 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
924 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
927 static CYTHON_INLINE
int __Pyx_PyUnicode_KIND_04(PyObject *o) {
928 return __Pyx_PyUnicode_KIND(o) - (int) !!PyUnicode_IS_ASCII(o);
931#if CYTHON_COMPILING_IN_PYPY
932 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
933 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
935 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
936 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
937 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
939#if CYTHON_COMPILING_IN_PYPY
940 #if !defined(PyUnicode_DecodeUnicodeEscape)
941 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
943 #if !defined(PyUnicode_Contains)
944 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
946 #if !defined(PyByteArray_Check)
947 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
949 #if !defined(PyObject_Format)
950 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
953#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
954#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
955 #define __Pyx_PySequence_ListKeepNew(obj)\
956 (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
957#elif CYTHON_COMPILING_IN_CPYTHON
958 #define __Pyx_PySequence_ListKeepNew(obj)\
959 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
961 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
963#ifndef PySet_CheckExact
964 #define PySet_CheckExact(obj) Py_IS_TYPE(obj, &PySet_Type)
966enum __Pyx_ReferenceSharing {
967 __Pyx_ReferenceSharing_DefinitelyUnique,
968 __Pyx_ReferenceSharing_OwnStrongReference,
969 __Pyx_ReferenceSharing_FunctionArgument,
970 __Pyx_ReferenceSharing_SharedReference,
972#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
973#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
974 (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
975 (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
976 (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
977#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
978#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
980#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
982#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
983 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
984#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
985 #if CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
986 #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
988 #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
990#elif CYTHON_COMPILING_IN_LIMITED_API || !(CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE)
991 #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
993 #define __Pyx_PyList_GetItemRef(o, i) (likely(__Pyx_is_valid_index(i, PyList_GET_SIZE(o))) ?\
994 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
996#if CYTHON_AVOID_BORROWED_REFS || CYTHON_COMPILING_IN_LIMITED_API
997 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
998 __Pyx_PyList_GetItemRef(o, i))
999#elif CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1000 #if CYTHON_ASSUME_SAFE_MACROS
1001 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1002 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1003 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1005 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1006 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1007 __Pyx_XNewRef(PyList_GetItem(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1009#elif CYTHON_ASSUME_SAFE_MACROS
1010 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1011 __Pyx_NewRef(PyList_GET_ITEM(o, i)))
1013 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1014 __Pyx_XNewRef(PyList_GetItem(o, i)))
1016#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1017#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
1018#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1019static CYTHON_INLINE
int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1020 *result = PyObject_GetItem(dict, key);
1021 if (*result == NULL) {
1022 if (PyErr_ExceptionMatches(PyExc_KeyError)) {
1031static CYTHON_INLINE
int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1032 *result = PyDict_GetItemWithError(dict, key);
1033 if (*result == NULL) {
1034 return PyErr_Occurred() ? -1 : 0;
1040#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
1041 #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
1043 #define __Pyx_VISIT_CONST(obj)
1045#if CYTHON_ASSUME_SAFE_MACROS
1046 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1047 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1048 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1049 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
1050 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1051 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
1053 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1054 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1055 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1056 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
1057 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1058 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
1060#if CYTHON_ASSUME_SAFE_SIZE
1061 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1062 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1063 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1064 #define __Pyx_PyDict_GET_SIZE(o) PyDict_GET_SIZE(o)
1065 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1066 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1067 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
1069 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1070 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1071 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1072 #define __Pyx_PyDict_GET_SIZE(o) PyDict_Size(o)
1073 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1074 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1075 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
1077#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
1078 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1080#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
1081#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t
1082#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1083 #define __Pyx_PySendResult PySendResult
1089 } __Pyx_PySendResult;
1091#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
1092 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
1094 #define __Pyx_pyiter_sendfunc sendfunc
1096#if !CYTHON_USE_AM_SEND
1097#define __PYX_HAS_PY_AM_SEND 0
1098#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1099#define __PYX_HAS_PY_AM_SEND 1
1101#define __PYX_HAS_PY_AM_SEND 2
1103#if __PYX_HAS_PY_AM_SEND < 2
1104 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1110 __Pyx_pyiter_sendfunc am_send;
1111 } __Pyx_PyAsyncMethodsStruct;
1112 #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
1114#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
1115 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
1117 #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
1119#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
1123PyAPI_FUNC(
void *) PyMem_Calloc(
size_t nelem,
size_t elsize);
1125#if CYTHON_COMPILING_IN_LIMITED_API
1126static int __Pyx_init_co_variable(PyObject *inspect,
const char* name,
int *write_to) {
1128 PyObject *py_value = PyObject_GetAttrString(inspect, name);
1129 if (!py_value)
return 0;
1130 value = (int) PyLong_AsLong(py_value);
1131 Py_DECREF(py_value);
1133 return value != -1 || !PyErr_Occurred();
1135static int __Pyx_init_co_variables(
void) {
1138 inspect = PyImport_ImportModule(
"inspect");
1140#if !defined(CO_OPTIMIZED)
1141 __Pyx_init_co_variable(inspect,
"CO_OPTIMIZED", &CO_OPTIMIZED) &&
1143#if !defined(CO_NEWLOCALS)
1144 __Pyx_init_co_variable(inspect,
"CO_NEWLOCALS", &CO_NEWLOCALS) &&
1146#if !defined(CO_VARARGS)
1147 __Pyx_init_co_variable(inspect,
"CO_VARARGS", &CO_VARARGS) &&
1149#if !defined(CO_VARKEYWORDS)
1150 __Pyx_init_co_variable(inspect,
"CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
1152#if !defined(CO_ASYNC_GENERATOR)
1153 __Pyx_init_co_variable(inspect,
"CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
1155#if !defined(CO_GENERATOR)
1156 __Pyx_init_co_variable(inspect,
"CO_GENERATOR", &CO_GENERATOR) &&
1158#if !defined(CO_COROUTINE)
1159 __Pyx_init_co_variable(inspect,
"CO_COROUTINE", &CO_COROUTINE) &&
1163 return result ? 0 : -1;
1165static int __Pyx_init_tpflags_bitcount(
unsigned long flag) {
1168 count += (int) (flag & 1);
1173static int __Pyx_init_tpflags_variables(
void) {
1174 if (__Pyx_Runtime_TPFLAGS_SEQUENCE != 0 && __Pyx_Runtime_TPFLAGS_MAPPING != 0) {
1177 PyObject *collections_abc = PyImport_ImportModule(
"collections.abc");
1178 if (!collections_abc)
return -1;
1180 PyObject *sequence = NULL, *mapping = NULL;
1181#if __PYX_LIMITED_VERSION_HEX >= 0x030D0000
1182 if (PyObject_GetOptionalAttrString(collections_abc,
"Sequence", &sequence) != 1)
goto fail;
1183 if (PyObject_GetOptionalAttrString(collections_abc,
"Mapping", &mapping) != 1)
goto fail;
1185 sequence = PyObject_GetAttrString(collections_abc,
"Sequence");
1186 if (!sequence)
goto fail_attr_lookup;
1187 mapping = PyObject_GetAttrString(collections_abc,
"Mapping");
1188 if (!mapping)
goto fail_attr_lookup;
1190 if (!PyType_Check(sequence) || !PyType_Check(mapping))
goto fail;
1192 unsigned long sequence_flags = PyType_GetFlags((PyTypeObject*)sequence);
1193 unsigned long mapping_flags = PyType_GetFlags((PyTypeObject*)mapping);
1194 unsigned long mutual_flags = sequence_flags & mapping_flags;
1195 sequence_flags = sequence_flags ^ mutual_flags;
1196 mapping_flags = mapping_flags ^ mutual_flags;
1197 if (__Pyx_Runtime_TPFLAGS_SEQUENCE == 0 && __Pyx_init_tpflags_bitcount(sequence_flags) == 1) {
1198 __Pyx_Runtime_TPFLAGS_SEQUENCE = sequence_flags;
1200 if (__Pyx_Runtime_TPFLAGS_MAPPING == 0 && __Pyx_init_tpflags_bitcount(mapping_flags) == 1) {
1201 __Pyx_Runtime_TPFLAGS_MAPPING = mapping_flags;
1205 Py_XDECREF(mapping);
1206 Py_XDECREF(sequence);
1207 Py_DECREF(collections_abc);
1209#if __PYX_LIMITED_VERSION_HEX < 0x030D0000
1211 if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
1216 result = PyErr_Occurred() ? -1 : 0;
1220static int __Pyx_init_co_variables(
void) {
1223static int __Pyx_init_tpflags_variables(
void) {
1229#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1230 #ifndef _USE_MATH_DEFINES
1231 #define _USE_MATH_DEFINES
1235#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1236#define __Pyx_truncl trunc
1238#define __Pyx_truncl truncl
1241#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1242#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 1
1244#ifndef CYTHON_CLINE_IN_TRACEBACK
1245#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1247#if CYTHON_CLINE_IN_TRACEBACK
1248#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
1250#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
1252#define __PYX_ERR(f_index, lineno, Ln_error) \
1253 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1255#ifdef CYTHON_EXTERN_C
1256 #undef __PYX_EXTERN_C
1257 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1258#elif defined(__PYX_EXTERN_C)
1260 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1262 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1266 #define __PYX_EXTERN_C extern "C"
1268 #define __PYX_EXTERN_C extern
1272#define __PYX_HAVE__ctimeIntegration
1273#define __PYX_HAVE_API__ctimeIntegration
1280#include "numpy/arrayobject.h"
1281#include "numpy/ndarrayobject.h"
1282#include "numpy/ndarraytypes.h"
1283#include "numpy/arrayscalars.h"
1284#include "numpy/ufuncobject.h"
1290#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1291#define CYTHON_WITHOUT_ASSERTIONS
1294#ifdef CYTHON_FREETHREADING_COMPATIBLE
1295#if CYTHON_FREETHREADING_COMPATIBLE
1296#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
1298#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1301#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1303#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1304#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1305#define __PYX_DEFAULT_STRING_ENCODING ""
1306#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1307#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1308#define __Pyx_uchar_cast(c) ((unsigned char)c)
1309#define __Pyx_long_cast(x) ((long)x)
1310#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1311 (sizeof(type) < sizeof(Py_ssize_t)) ||\
1312 (sizeof(type) > sizeof(Py_ssize_t) &&\
1313 likely(v < (type)PY_SSIZE_T_MAX ||\
1314 v == (type)PY_SSIZE_T_MAX) &&\
1315 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1316 v == (type)PY_SSIZE_T_MIN))) ||\
1317 (sizeof(type) == sizeof(Py_ssize_t) &&\
1318 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1319 v == (type)PY_SSIZE_T_MAX))) )
1320static CYTHON_INLINE
int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1321 return (
size_t) i < (size_t) limit;
1323#if defined (__cplusplus) && __cplusplus >= 201103L
1325 #define __Pyx_sst_abs(value) std::abs(value)
1326#elif SIZEOF_INT >= SIZEOF_SIZE_T
1327 #define __Pyx_sst_abs(value) abs(value)
1328#elif SIZEOF_LONG >= SIZEOF_SIZE_T
1329 #define __Pyx_sst_abs(value) labs(value)
1330#elif defined (_MSC_VER)
1331 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1332#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1333 #define __Pyx_sst_abs(value) llabs(value)
1334#elif defined (__GNUC__)
1335 #define __Pyx_sst_abs(value) __builtin_llabs(value)
1337 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1339static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(
const char *
s);
1340static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject*);
1341static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1342static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(
const char*);
1343#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1344#define __Pyx_PyBytes_FromString PyBytes_FromString
1345#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1346static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
1347#if CYTHON_ASSUME_SAFE_MACROS
1348 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1349 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1350 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1351 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1352 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1353 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1354 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
1356 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
1357 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
1358 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
1359 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
1360 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
1361 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
1362 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
1364#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1365#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1366#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1367#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1368#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1369#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1370#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1371#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1372#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1373#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1374#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1375static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
1376#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
1377 return Py_NewRef(obj);
1383static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
1384#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
1385 return Py_XNewRef(obj);
1391static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(
int b);
1392static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b);
1393static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
1394static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1395static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
1396#define __Pyx_PyObject_RichCompareBool(a,b,cmp) __Pyx_PyObject_IsTrueAndDecref(PyObject_RichCompare((a),(b),(cmp)))
1397#define __Pyx_PySequence_Tuple(obj)\
1398 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1399static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1400static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(
size_t);
1401static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1402#if CYTHON_ASSUME_SAFE_MACROS
1403#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1404#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
1405#define __Pyx_PyFloat_IsNonZero(x) (PyFloat_AS_DOUBLE(x) != 0.0)
1407#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1408#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
1409#define __Pyx_PyFloat_IsNonZero(x) PyObject_IsTrue(x)
1411#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
1412#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1413#if CYTHON_USE_PYLONG_INTERNALS
1414 #if PY_VERSION_HEX >= 0x030C00A7
1415 #ifndef _PyLong_SIGN_MASK
1416 #define _PyLong_SIGN_MASK 3
1418 #ifndef _PyLong_NON_SIZE_BITS
1419 #define _PyLong_NON_SIZE_BITS 3
1421 #define __Pyx_PyLong_SignBits(x) ((int) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK))
1422 #define __Pyx_PyLong_Sign(x) (1 - __Pyx_PyLong_SignBits(x))
1423 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_SignBits(x) & 2) != 0)
1424 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1425 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_SignBits(x) & 1)
1426 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_SignBits(x) == 0)
1427 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1428 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1429 #define __Pyx_PyLong_SignedDigitCount(x)\
1430 (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1431 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1432 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1433 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1435 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1436 #define __Pyx_PyLong_CompactValue(x) (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1438 static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_CompareSignAndSize(PyObject *a, PyObject *b) {
1439 uintptr_t tag_a = ((PyLongObject*)a)->long_value.lv_tag;
1440 uintptr_t tag_b = ((PyLongObject*)b)->long_value.lv_tag;
1441 if (tag_a == tag_b)
return 0;
1442 int sign_a = (int) (tag_a & _PyLong_SIGN_MASK);
1443 int sign_b = (int) (tag_b & _PyLong_SIGN_MASK);
1444 if (sign_a > sign_b)
return -1;
1445 if (sign_a < sign_b)
return 1;
1446 Py_ssize_t size_a = (Py_ssize_t) (tag_a >> _PyLong_NON_SIZE_BITS);
1447 Py_ssize_t size_b = (Py_ssize_t) (tag_b >> _PyLong_NON_SIZE_BITS);
1448 return (1 - sign_a) * (size_a - size_b);
1450 typedef Py_ssize_t __Pyx_compact_pylong;
1451 typedef size_t __Pyx_compact_upylong;
1453 #define __Pyx_PyLong_Sign(x) ((int) ((Py_SIZE(x) == 0) ? 0 : (Py_SIZE(x) < 0) ? -1 : 1))
1454 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1455 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1456 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1457 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1458 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1459 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1460 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1461 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1462 #define __Pyx_PyLong_CompactValue(x)\
1463 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1464 #define __Pyx_PyLong_CompareSignAndSize(a, b) (Py_SIZE(a) - Py_SIZE(b))
1465 typedef sdigit __Pyx_compact_pylong;
1466 typedef digit __Pyx_compact_upylong;
1468 #if PY_VERSION_HEX >= 0x030C00A5
1469 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1471 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1473 #define __Pyx_PyLong_IsNonZero(x) (!__Pyx_PyLong_IsZero(x))
1475 #define __Pyx_PyLong_IsNonZero(x) PyObject_IsTrue(x)
1477#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
1478 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1479#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1480 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
1482 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1487#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1488 #define likely(x) __builtin_expect(!!(x), 1)
1489 #define unlikely(x) __builtin_expect(!!(x), 0)
1491 #define likely(x) (x)
1492 #define unlikely(x) (x)
1496#if __cplusplus > 201103L
1497#include <type_traits>
1499template <
typename T>
1500static void __Pyx_pretend_to_initialize(
T* ptr) {
1501#if __cplusplus > 201103L
1502 if ((std::is_trivially_default_constructible<T>::value))
1508static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
1512#if !CYTHON_USE_MODULE_STATE
1513static PyObject *__pyx_m = NULL;
1515static const char *
const __pyx_cfilenm = __FILE__;
1518#if !defined(CYTHON_CCOMPLEX)
1519 #if defined(__cplusplus)
1520 #define CYTHON_CCOMPLEX 1
1521 #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
1522 #define CYTHON_CCOMPLEX 1
1524 #define CYTHON_CCOMPLEX 0
1531 #include <complex.h>
1534#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
1536 #define _Complex_I 1.0fj
1541static const char*
const __pyx_f[] = {
1542 "proteus/ctimeIntegration.pyx",
1543 "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd",
1548#include <pythread.h>
1549#ifndef CYTHON_ATOMICS
1550 #define CYTHON_ATOMICS 1
1552#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1553#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1554#define __pyx_atomic_int_type int
1555#define __pyx_nonatomic_int_type int
1556#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1557 (__STDC_VERSION__ >= 201112L) &&\
1558 !defined(__STDC_NO_ATOMICS__))
1559 #include <stdatomic.h>
1560#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1561 (__cplusplus >= 201103L) ||\
1562 (defined(_MSC_VER) && _MSC_VER >= 1700)))
1565#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1566 (__STDC_VERSION__ >= 201112L) &&\
1567 !defined(__STDC_NO_ATOMICS__) &&\
1568 ATOMIC_INT_LOCK_FREE == 2)
1569 #undef __pyx_atomic_int_type
1570 #define __pyx_atomic_int_type atomic_int
1571 #define __pyx_atomic_ptr_type atomic_uintptr_t
1572 #define __pyx_nonatomic_ptr_type uintptr_t
1573 #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
1574 #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
1575 #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
1576 #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
1577 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1578 #define __pyx_atomic_load(value) atomic_load(value)
1579 #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
1580 #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
1581 #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
1582 #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1583 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1584 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1585 #pragma message ("Using standard C atomics")
1586 #elif defined(__PYX_DEBUG_ATOMICS)
1587 #warning "Using standard C atomics"
1589#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1590 (__cplusplus >= 201103L) ||\
1592 (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
1593 ATOMIC_INT_LOCK_FREE == 2)
1594 #undef __pyx_atomic_int_type
1595 #define __pyx_atomic_int_type std::atomic_int
1596 #define __pyx_atomic_ptr_type std::atomic_uintptr_t
1597 #define __pyx_nonatomic_ptr_type uintptr_t
1598 #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
1599 #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
1600 #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
1601 #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
1602 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1603 #define __pyx_atomic_load(value) std::atomic_load(value)
1604 #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
1605 #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
1606 #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
1607 #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1608 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1609 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1610 #pragma message ("Using standard C++ atomics")
1611 #elif defined(__PYX_DEBUG_ATOMICS)
1612 #warning "Using standard C++ atomics"
1614#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1615 (__GNUC_MINOR__ > 1 ||\
1616 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1617 #define __pyx_atomic_ptr_type void*
1618 #define __pyx_nonatomic_ptr_type void*
1619 #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
1620 #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
1621 #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
1622 #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
1623 static CYTHON_INLINE
int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1624 __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
1625 int result = old == *expected;
1629 #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
1630 #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
1631 #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
1632 #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
1633 #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
1634 static CYTHON_INLINE
int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1635 __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
1636 int result = old == *expected;
1640 #ifdef __PYX_DEBUG_ATOMICS
1641 #warning "Using GNU atomics"
1643#elif CYTHON_ATOMICS && defined(_MSC_VER)
1645 #undef __pyx_atomic_int_type
1646 #define __pyx_atomic_int_type long
1647 #define __pyx_atomic_ptr_type void*
1648 #undef __pyx_nonatomic_int_type
1649 #define __pyx_nonatomic_int_type long
1650 #define __pyx_nonatomic_ptr_type void*
1651 #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
1652 #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
1653 #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
1654 #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
1655 #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
1656 static CYTHON_INLINE
int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1657 __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
1658 int result = old == *expected;
1662 #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
1663 #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
1664 #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
1665 #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
1666 #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
1667 static CYTHON_INLINE
int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1668 __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
1669 int result = old == *expected;
1673 #ifdef __PYX_DEBUG_ATOMICS
1674 #pragma message ("Using MSVC atomics")
1677 #undef CYTHON_ATOMICS
1678 #define CYTHON_ATOMICS 0
1679 #ifdef __PYX_DEBUG_ATOMICS
1680 #warning "Not using atomics"
1685#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1686#define __Pyx_PyCriticalSection void*
1687#define __Pyx_PyCriticalSection2 void*
1688#define __Pyx_PyCriticalSection_End(cs)
1689#define __Pyx_PyCriticalSection2_End(cs)
1691#define __Pyx_PyCriticalSection PyCriticalSection
1692#define __Pyx_PyCriticalSection2 PyCriticalSection2
1693#define __Pyx_PyCriticalSection_End PyCriticalSection_End
1694#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
1698#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1699#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
1700#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
1702#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
1703#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
1705#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
1706#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
1707#define __Pyx_END_CRITICAL_SECTION() }
1709#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
1710#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
1714#include <structmember.h>
1725typedef npy_int8 __pyx_t_5numpy_int8_t;
1734typedef npy_int16 __pyx_t_5numpy_int16_t;
1743typedef npy_int32 __pyx_t_5numpy_int32_t;
1752typedef npy_int64 __pyx_t_5numpy_int64_t;
1761typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1770typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1779typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1788typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1797typedef npy_float32 __pyx_t_5numpy_float32_t;
1806typedef npy_float64 __pyx_t_5numpy_float64_t;
1815typedef npy_longlong __pyx_t_5numpy_longlong_t;
1824typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1833typedef npy_intp __pyx_t_5numpy_intp_t;
1842typedef npy_uintp __pyx_t_5numpy_uintp_t;
1851typedef npy_double __pyx_t_5numpy_float_t;
1860typedef npy_double __pyx_t_5numpy_double_t;
1869typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1872#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1874 typedef ::std::complex< float > __pyx_t_float_complex;
1876 typedef float _Complex __pyx_t_float_complex;
1879 typedef struct {
float real, imag; } __pyx_t_float_complex;
1881static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1884#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1886 typedef ::std::complex< double > __pyx_t_double_complex;
1888 typedef double _Complex __pyx_t_double_complex;
1891 typedef struct {
double real, imag; } __pyx_t_double_complex;
1893static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
1896#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1898 typedef ::std::complex< long double > __pyx_t_long_double_complex;
1900 typedef long double _Complex __pyx_t_long_double_complex;
1903 typedef struct {
long double real, imag; } __pyx_t_long_double_complex;
1905static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double,
long double);
1914#ifndef CYTHON_REFNANNY
1915 #define CYTHON_REFNANNY 0
1919 void (*INCREF)(
void*, PyObject*, Py_ssize_t);
1920 void (*DECREF)(
void*, PyObject*, Py_ssize_t);
1921 void (*GOTREF)(
void*, PyObject*, Py_ssize_t);
1922 void (*GIVEREF)(
void*, PyObject*, Py_ssize_t);
1923 void* (*SetupContext)(
const char*, Py_ssize_t,
const char*);
1924 void (*FinishContext)(
void**);
1925 } __Pyx_RefNannyAPIStruct;
1926 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1927 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
1928 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1929 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1931 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1932 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
1933 PyGILState_Release(__pyx_gilstate_save);\
1935 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
1937 #define __Pyx_RefNannyFinishContextNogil() {\
1938 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1939 __Pyx_RefNannyFinishContext();\
1940 PyGILState_Release(__pyx_gilstate_save);\
1942 #define __Pyx_RefNannyFinishContextNogil() {\
1943 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1944 __Pyx_RefNannyFinishContext();\
1945 PyGILState_Release(__pyx_gilstate_save);\
1947 #define __Pyx_RefNannyFinishContext()\
1948 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1949 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1950 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1951 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1952 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1953 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
1954 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
1955 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
1956 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
1958 #define __Pyx_RefNannyDeclarations
1959 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1960 #define __Pyx_RefNannyFinishContextNogil()
1961 #define __Pyx_RefNannyFinishContext()
1962 #define __Pyx_INCREF(r) Py_INCREF(r)
1963 #define __Pyx_DECREF(r) Py_DECREF(r)
1964 #define __Pyx_GOTREF(r)
1965 #define __Pyx_GIVEREF(r)
1966 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1967 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1968 #define __Pyx_XGOTREF(r)
1969 #define __Pyx_XGIVEREF(r)
1971#define __Pyx_Py_XDECREF_SET(r, v) do {\
1972 PyObject *tmp = (PyObject *) r;\
1973 r = v; Py_XDECREF(tmp);\
1975#define __Pyx_XDECREF_SET(r, v) do {\
1976 PyObject *tmp = (PyObject *) r;\
1977 r = v; __Pyx_XDECREF(tmp);\
1979#define __Pyx_DECREF_SET(r, v) do {\
1980 PyObject *tmp = (PyObject *) r;\
1981 r = v; __Pyx_DECREF(tmp);\
1983#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1984#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1987#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
1988static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1992#if CYTHON_FAST_THREAD_STATE
1993#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1994#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1995#if PY_VERSION_HEX >= 0x030C00A6
1996#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
1997#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
1999#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2000#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
2003#define __Pyx_PyThreadState_declare
2004#define __Pyx_PyThreadState_assign
2005#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
2006#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
2010#if CYTHON_FAST_THREAD_STATE
2011#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2012static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2013#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2014static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2016#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2017#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2021#if CYTHON_COMPILING_IN_CPYTHON
2022#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2023#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
2024static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2025static CYTHON_INLINE
int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2026#define __Pyx_PyAnySet_Check(obj) __Pyx_TypeCheck2(obj, &PySet_Type, &PyFrozenSet_Type)
2028#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2029#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
2030#define __Pyx_PyAnySet_Check(obj) PyAnySet_Check(obj)
2034#define __Pyx_PyExc_Exception_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2037#if CYTHON_FAST_THREAD_STATE
2038#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2039#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2040#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2041#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2042#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2043static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2044static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2045#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
2046#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2048#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2051#define __Pyx_PyErr_Clear() PyErr_Clear()
2052#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2053#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2054#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2055#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2056#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2057#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2058#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2062#if CYTHON_COMPILING_IN_CPYTHON
2063static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2064static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2066#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2067static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
2068 return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
2071#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
2074#if CYTHON_FAST_THREAD_STATE
2075#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2076static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2078#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2082#if CYTHON_FAST_THREAD_STATE
2083#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2084static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2086static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2090#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError)
2093#if CYTHON_COMPILING_IN_CPYTHON
2094static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2096#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2100#if CYTHON_COMPILING_IN_CPYTHON
2101static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2105#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
2106static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *
const*args,
size_t nargsf, PyObject *kwargs);
2109static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2112#if CYTHON_COMPILING_IN_CPYTHON
2113static CYTHON_INLINE
void __Pyx_copy_object_array(PyObject *
const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length);
2117#if PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API
2118#define __Pyx_PyTuple_FromArray(src, n) PyTuple_FromArray(src, ((n)<0) ? 0 : (n))
2120CYTHON_UNUSED
static PyObject *
2121__Pyx_PyTuple_FromArray(PyObject *
const *src, Py_ssize_t
n);
2131static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2,
int pyop);
2134#define __Pyx_PyUnicode_Equals(s1, s2) __Pyx_PyObject_CompareBoolEq_str_str(s1, s2, Py_EQ)
2137#if CYTHON_AVOID_BORROWED_REFS
2138 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
2139#elif CYTHON_ASSUME_SAFE_MACROS
2140 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
2142 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
2144#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
2145#define __Pyx_KwValues_VARARGS(args, nargs) NULL
2146#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
2147#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
2148#if CYTHON_VECTORCALL
2149 #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
2150 #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
2151 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
2152 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues, PyObject *
s);
2153 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
2154 CYTHON_UNUSED
static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues);
2156 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
2159 #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
2160 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
2161 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
2162 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
2163 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
2165#if CYTHON_VECTORCALL_TPNEW
2166 #if !CYTHON_VECTORCALL
2167 #error Enabling CYTHON_VECTORCALL_TPNEW without CYTHON_VECTORCALL is not supported
2169 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_FASTCALL
2170 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_FASTCALL
2171 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_FASTCALL
2172 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_FASTCALL
2173 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_FASTCALL
2175 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_VARARGS
2176 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_VARARGS
2177 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_VARARGS
2178 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_VARARGS
2179 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_VARARGS
2181#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
2182#if CYTHON_VECTORCALL
2183#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
2185#define __Pyx_ArgsSlice_FASTCALL __Pyx_ArgsSlice_VARARGS
2189#define __Pyx_PyDict_items_TypePtr (&PyDictKeys_Type)
2190#define __Pyx_PyDict_items_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictItems_TypePtr)
2191#define __Pyx_PyDict_items_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictItems_TypePtr)
2192static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
2195#define __Pyx_CallCFunction(cfunc, self, args)\
2196 ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
2197#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
2198 ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
2199#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
2200 ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
2201#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
2202 ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
2205static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2210 PyObject **method_name;
2214#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
2215 __pyx_atomic_int_type initialized;
2217} __Pyx_CachedCFunction;
2220static CYTHON_INLINE
int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception);
2221#define __Pyx_IgnoreException(ignorable_exception) __Pyx_IgnoreGivenException(NULL, ignorable_exception)
2224#if CYTHON_USE_TYPE_SLOTS
2225static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2227#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2231static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target);
2234#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2235static CYTHON_INLINE
int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
2239 __pyx_nonatomic_int_type expected = 0;
2240 if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
2246static CYTHON_INLINE
void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
2248 __pyx_atomic_store(&cfunc->initialized, 2);
2252#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
2253#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
2258static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2259#if CYTHON_COMPILING_IN_CPYTHON
2260static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2262#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
2266#define __Pyx_PyDict_values_TypePtr (&PyDictKeys_Type)
2267#define __Pyx_PyDict_values_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictValues_TypePtr)
2268#define __Pyx_PyDict_values_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictValues_TypePtr)
2269static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
2272#if CYTHON_AVOID_BORROWED_REFS
2273static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
2276static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
2280static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
2283static int __Pyx_ParseKeywordsTuple(
2285 PyObject *
const *kwvalues,
2286 PyObject **
const argnames[],
2289 Py_ssize_t num_pos_args,
2290 Py_ssize_t num_kwargs,
2291 const char* function_name,
2292 int ignore_unknown_kwargs
2294static int __Pyx_ParseKeywordDictToDict(
2296 PyObject **
const argnames[],
2299 Py_ssize_t num_pos_args,
2300 const char* function_name
2302static int __Pyx_ParseKeywordDict(
2304 PyObject **
const argnames[],
2306 Py_ssize_t num_pos_args,
2307 Py_ssize_t num_kwargs,
2308 const char* function_name,
2309 int ignore_unknown_kwargs
2314static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
2315#if CYTHON_COMPILING_IN_CPYTHON
2316static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
2318#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
2322static CYTHON_INLINE
int __Pyx_ParseKeywords(
2323 PyObject *kwds, PyObject *
const *kwvalues, PyObject **
const argnames[],
2324 PyObject *kwds2, PyObject *values[],
2325 Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
2326 const char* function_name,
2327 int ignore_unknown_kwargs
2331static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
2332 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2335static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type,
const char *name,
int exact);
2338static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
const char *name,
int exact);
2341#ifndef __PYX_HAVE_RT_ImportType_proto_3_3_0
2342#define __PYX_HAVE_RT_ImportType_proto_3_3_0
2343#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2344#include <stdalign.h>
2346#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2347#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) alignof(s)
2349#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) sizeof(void*)
2351enum __Pyx_ImportType_CheckSize_3_3_0 {
2352 __Pyx_ImportType_CheckSize_Error_3_3_0 = 0,
2353 __Pyx_ImportType_CheckSize_Warn_3_3_0 = 1,
2354 __Pyx_ImportType_CheckSize_Ignore_3_3_0 = 2
2356static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
size_t alignment,
enum __Pyx_ImportType_CheckSize_3_3_0 check_size);
2360static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2363#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2364#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
2366static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *, PyObject *);
2370CYTHON_UNUSED
static PyObject *
2371__Pyx_PyList_FromArray(PyObject *
const *src, Py_ssize_t
n);
2377static PyObject *__Pyx__Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict,
int level);
2380static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname,
int level);
2383static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
2386#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3) ||\
2387 __PYX_LIMITED_VERSION_HEX < 0x030d0000)
2388 static PyObject *__Pyx_PyImport_AddModuleRef(
const char *name);
2390 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
2394static PyObject *__Pyx_FetchSharedCythonABIModule(
void);
2397static int __Pyx_VerifyCachedType(PyObject *cached_type,
2399 Py_ssize_t expected_basicsize);
2402static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
2405static int __pyx_CommonTypesMetaclass_init(PyObject *module);
2406#define __Pyx_CommonTypesMetaclass_USED
2409#define __Pyx_CyFunction_USED
2410#if CYTHON_OPAQUE_SHARED_TYPES
2411#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)PyObject_GetTypeData((o), __pyx_mstate_global->__pyx_CyFunctionType))
2413#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)o)
2415#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2416#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2417#define __Pyx_CYFUNCTION_CCLASS 0x04
2418#define __Pyx_CYFUNCTION_COROUTINE 0x08
2419#define __Pyx_CyFunction_GetClosure(f)\
2420 ((__Pyx_as_CyFunctionObject(f))->func_closure)
2421#if CYTHON_COMPILING_IN_LIMITED_API
2422 #define __Pyx__CyFunction_GetClassObj(f)\
2423 ((f)->func_classobj)
2425 #define __Pyx__CyFunction_GetClassObj(f)\
2426 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
2428#define __Pyx_CyFunction_GetClassObj(f)\
2429 __Pyx__CyFunction_GetClassObj(__Pyx_as_CyFunctionObject(f))
2430#define __Pyx_CyFunction_SetClassObj(f, classobj)\
2431 __Pyx__CyFunction_SetClassObj(__Pyx_as_CyFunctionObject(f), (classobj))
2432#define __Pyx_CyFunction_Defaults(type, f)\
2433 ((type *)((__Pyx_as_CyFunctionObject(f))->defaults))
2434#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2435 (__Pyx_as_CyFunctionObject(f))->defaults_getter = (g)
2437#if CYTHON_COMPILING_IN_LIMITED_API
2438#if !CYTHON_OPAQUE_OBJECTS
2441 PyMethodDef *func_methoddef;
2442 PyObject *func_module;
2444 PyCMethodObject func;
2446#if (CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY) && CYTHON_VECTORCALL
2447 __pyx_vectorcallfunc func_vectorcall;
2449#if CYTHON_COMPILING_IN_LIMITED_API
2450 PyObject *func_weakreflist;
2452#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
2453 PyObject *func_dict;
2455 PyObject *func_name;
2456 PyObject *func_qualname;
2458 PyObject *func_globals;
2459 PyObject *func_code;
2460 PyObject *func_closure;
2461#if CYTHON_COMPILING_IN_LIMITED_API
2462 PyObject *func_classobj;
2466 PyObject *defaults_tuple;
2467 PyObject *defaults_kwdict;
2468 PyObject *(*defaults_getter)(PyObject *);
2469 PyObject *func_annotations;
2470#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
2471 PyObject *func_is_coroutine;
2473} __pyx_CyFunctionObject;
2474#undef __Pyx_CyOrPyCFunction_Check
2475#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
2476#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
2477#define __Pyx_CyFunction_CheckExact(obj) Py_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
2478static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void (*cfunc)(
void));
2479#undef __Pyx_IsSameCFunction
2480#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
2481static CYTHON_INLINE
void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject*
f, PyObject* classobj);
2482static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
2483 PyTypeObject *defaults_type);
2484static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2486static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2488static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2490static int __pyx_CyFunction_init(PyObject *module);
2491#if CYTHON_VECTORCALL
2492#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
2493#define __Pyx_CyFunction_func_vectorcall(f) ((f)->func_vectorcall)
2495#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
2500#if !CYTHON_USE_TYPE_SPECS
2501#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
2503static int __Pyx_call_type_traverse(PyObject *o,
int always_call, visitproc visit,
void *arg);
2507static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
2510#if CYTHON_VECTORCALL
2511static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw);
2515static PyObject *__Pyx_CyFunction_Init(PyObject *op_in, PyMethodDef *ml,
2516 int flags, PyObject* qualname,
2518 PyObject *module, PyObject *globals,
2520#if CYTHON_VECTORCALL
2521static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2522static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2523static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2524static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2528static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2529 int flags, PyObject* qualname,
2531 PyObject *module, PyObject *globals,
2533static PyTypeObject *__Pyx_Get_CyFunction_Type(
void);
2536#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2537#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2538#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2539#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2540 (version_var) = __PYX_GET_DICT_VERSION(dict);\
2541 (cache_var) = (value);
2542#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2543 static PY_UINT64_T __pyx_dict_version = 0;\
2544 static PyObject *__pyx_dict_cached_value = NULL;\
2545 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2546 (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
2548 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2549 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2552static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2553static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2554static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2556#define __PYX_GET_DICT_VERSION(dict) (0)
2557#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2558#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2562#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
2563static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
2565#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2569#if CYTHON_COMPILING_IN_LIMITED_API
2570typedef PyObject __Pyx_CachedCodeObjectType;
2572typedef PyCodeObject __Pyx_CachedCodeObjectType;
2575 __Pyx_CachedCodeObjectType* code_object;
2577} __Pyx_CodeObjectCacheEntry;
2578struct __Pyx_CodeObjectCache {
2581 __Pyx_CodeObjectCacheEntry* entries;
2582 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2583 __pyx_atomic_int_type accessor_count;
2586static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
2587static __Pyx_CachedCodeObjectType *__pyx_find_code_object(
int code_line);
2588static void __pyx_insert_code_object(
int code_line, __Pyx_CachedCodeObjectType* code_object);
2591static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
2592 int py_line,
const char *filename);
2595#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2596#define __Pyx_HAS_GCC_DIAGNOSTIC
2602 #define __Pyx_CREAL(z) ((z).real())
2603 #define __Pyx_CIMAG(z) ((z).imag())
2605 #define __Pyx_CREAL(z) (__real__(z))
2606 #define __Pyx_CIMAG(z) (__imag__(z))
2609 #define __Pyx_CREAL(z) ((z).real)
2610 #define __Pyx_CIMAG(z) ((z).imag)
2612#if defined(__cplusplus) && CYTHON_CCOMPLEX\
2613 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2614 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2615 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2617 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2618 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2622#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2623 #define __Pyx_c_eq_float(a, b) ((a)==(b))
2624 #define __Pyx_c_sum_float(a, b) ((a)+(b))
2625 #define __Pyx_c_diff_float(a, b) ((a)-(b))
2626 #define __Pyx_c_prod_float(a, b) ((a)*(b))
2627 #define __Pyx_c_quot_float(a, b) ((a)/(b))
2628 #define __Pyx_c_neg_float(a) (-(a))
2630 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2631 #define __Pyx_c_conj_float(z) (::std::conj(z))
2633 #define __Pyx_c_abs_float(z) (::std::abs(z))
2634 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2637 #define __Pyx_c_is_zero_float(z) ((z)==0)
2638 #define __Pyx_c_conj_float(z) (conjf(z))
2640 #define __Pyx_c_abs_float(z) (cabsf(z))
2641 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2645 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2646 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2647 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2648 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2649 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2650 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2651 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2652 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2654 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex);
2655 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2660#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2661 #define __Pyx_c_eq_double(a, b) ((a)==(b))
2662 #define __Pyx_c_sum_double(a, b) ((a)+(b))
2663 #define __Pyx_c_diff_double(a, b) ((a)-(b))
2664 #define __Pyx_c_prod_double(a, b) ((a)*(b))
2665 #define __Pyx_c_quot_double(a, b) ((a)/(b))
2666 #define __Pyx_c_neg_double(a) (-(a))
2668 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2669 #define __Pyx_c_conj_double(z) (::std::conj(z))
2671 #define __Pyx_c_abs_double(z) (::std::abs(z))
2672 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2675 #define __Pyx_c_is_zero_double(z) ((z)==0)
2676 #define __Pyx_c_conj_double(z) (conj(z))
2678 #define __Pyx_c_abs_double(z) (cabs(z))
2679 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2683 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2684 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2685 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2686 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2687 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2688 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2689 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2690 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2692 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex);
2693 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2698#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2699 #define __Pyx_c_eq_long__double(a, b) ((a)==(b))
2700 #define __Pyx_c_sum_long__double(a, b) ((a)+(b))
2701 #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
2702 #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
2703 #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
2704 #define __Pyx_c_neg_long__double(a) (-(a))
2706 #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
2707 #define __Pyx_c_conj_long__double(z) (::std::conj(z))
2709 #define __Pyx_c_abs_long__double(z) (::std::abs(z))
2710 #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b))
2713 #define __Pyx_c_is_zero_long__double(z) ((z)==0)
2714 #define __Pyx_c_conj_long__double(z) (conjl(z))
2716 #define __Pyx_c_abs_long__double(z) (cabsl(z))
2717 #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b))
2721 static CYTHON_INLINE
int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2722 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2723 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2724 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2725 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2726 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
2727 static CYTHON_INLINE
int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
2728 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
2730 static CYTHON_INLINE
long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
2731 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2736static CYTHON_INLINE
int __Pyx_PyLong_As_int(PyObject *);
2739#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2740typedef PyObject *__Pyx_TypeName;
2741#define __Pyx_FMT_TYPENAME "%N"
2742#define __Pyx_PyType_GetFullyQualifiedName(tp) Py_NewRef((PyObject*)tp)
2743#define __Pyx_DECREF_TypeName(obj) Py_DECREF(obj)
2744#elif CYTHON_COMPILING_IN_LIMITED_API
2745typedef PyObject *__Pyx_TypeName;
2746#define __Pyx_FMT_TYPENAME "%U"
2747#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
2748static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
2750typedef const char *__Pyx_TypeName;
2751#define __Pyx_FMT_TYPENAME "%.200s"
2752#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
2753#define __Pyx_DECREF_TypeName(obj)
2757#if CYTHON_VECTORCALL
2758#define __Pyx_Object_VectorcallKwds PyObject_Vectorcall
2759CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i);
2761#define __Pyx_Object_VectorcallKwds __Pyx_PyObject_FastCallDict
2762CYTHON_UNUSED
static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t
n);
2763CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i);
2767#if CYTHON_VECTORCALL
2768#define __Pyx_Object_VectorcallMethodKwds PyObject_VectorcallMethod
2770static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2774static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(
long value);
2777static CYTHON_INLINE
long __Pyx_PyLong_As_long(PyObject *);
2780#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
2781static unsigned long __Pyx_cached_runtime_version = 0;
2782static void __Pyx_init_runtime_version(
void);
2784#define __Pyx_init_runtime_version()
2786static unsigned long __Pyx_get_runtime_version(
void);
2789static int __Pyx_check_binary_version(
unsigned long ct_version,
unsigned long rt_version,
int allow_newer);
2792static PyObject *__Pyx_DecompressString(
const char *
s, Py_ssize_t length,
int algo);
2795static PyObject *__Pyx_DecompressString_LZSS(
const char *
s,
size_t compressed_length,
size_t uncompressed_length);
2798#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
2800static PyObject *__Pyx_State_FindModule(
void*);
2801static int __Pyx_State_AddModule(PyObject* module,
void*);
2802static int __Pyx_State_RemoveModule(
void*);
2803#elif CYTHON_USE_MODULE_STATE
2804#define __Pyx_State_FindModule PyState_FindModule
2805#define __Pyx_State_AddModule PyState_AddModule
2806#define __Pyx_State_RemoveModule PyState_RemoveModule
2811#if CYTHON_COMPILING_IN_LIMITED_API
2812 #if CYTHON_VECTORCALL
2813 #define __PYX_VECTORCALL_ABI_SUFFIX "_vectorcall"
2815 #define __PYX_VECTORCALL_ABI_SUFFIX
2817 #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_VECTORCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
2819 #define __PYX_LIMITED_ABI_SUFFIX
2821#if __PYX_HAS_PY_AM_SEND == 1
2822 #define __PYX_AM_SEND_ABI_SUFFIX
2823#elif __PYX_HAS_PY_AM_SEND == 2
2824 #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
2826 #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
2828#ifndef __PYX_MONITORING_ABI_SUFFIX
2829 #define __PYX_MONITORING_ABI_SUFFIX
2831#if CYTHON_USE_TP_FINALIZE
2832 #define __PYX_TP_FINALIZE_ABI_SUFFIX
2834 #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
2836#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
2837 #define __PYX_FREELISTS_ABI_SUFFIX
2839 #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
2841#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
2842 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX "opaque"
2844 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
2846#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
2847#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
2848#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
2850static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self);
2851static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self);
2852static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self);
2853static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self);
2854static CYTHON_INLINE
int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self);
2855static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self);
2856static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self);
2857static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self);
2858static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self);
2859static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self);
2860static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self);
2861static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self);
2862static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self);
2863static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self);
2864static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self);
2865static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self);
2866static CYTHON_INLINE
void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self);
2867static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self);
2868static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self);
2869static CYTHON_INLINE
int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self);
2870static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self);
2871static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self);
2872static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self);
2873static CYTHON_INLINE
char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self);
2874static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self);
2875static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self);
2876static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self);
2877static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self);
2878static CYTHON_INLINE
void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self);
2879static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self);
2880static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self);
2881static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self);
2882static CYTHON_INLINE
void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self);
2883static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self);
2884static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self);
2907#define __Pyx_MODULE_NAME "ctimeIntegration"
2908extern int __pyx_module_is_main_ctimeIntegration;
2909int __pyx_module_is_main_ctimeIntegration = 0;
2915static PyObject *__pyx_pf_16ctimeIntegration_psiTCtteDT(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_nPoints,
double __pyx_v_tau,
double __pyx_v_dtn,
double __pyx_v_dtnm1, PyArrayObject *__pyx_v_yn, PyArrayObject *__pyx_v_ypn, PyArrayObject *__pyx_v_ypnm1, PyArrayObject *__pyx_v_dtnp1);
2916static PyObject *__pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_limiterFlag,
int __pyx_v_nElements_global,
int __pyx_v_nNodes_element,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout);
2917static PyObject *__pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_enforcePositivity,
double __pyx_v_vacuumTol,
int __pyx_v_nElements_global,
int __pyx_v_nNodes_element,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout);
2918static PyObject *__pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients);
2919static PyObject *__pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors);
2920static PyObject *__pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_nu,
double __pyx_v_Mh2, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout);
2921static PyObject *__pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_killExtrema,
int __pyx_v_allowMinWithUndershoot,
int __pyx_v_nElements_global,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nNodes_element,
int __pyx_v_nSpace,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout);
2922static PyObject *__pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_killExtrema,
int __pyx_v_allowMinWithUndershoot,
int __pyx_v_nElements_global,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nNodes_element,
int __pyx_v_nSpace,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout);
2923static PyObject *__pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_killExtrema,
int __pyx_v_allowMinWithUndershoot,
int __pyx_v_enforcePositivity,
double __pyx_v_vacuumTol,
int __pyx_v_nElements_global,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nNodes_element,
int __pyx_v_nSpace,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout);
2927#ifndef CYTHON_SMALL_CODE
2928#if defined(__clang__)
2929 #define CYTHON_SMALL_CODE
2930#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
2931 #define CYTHON_SMALL_CODE __attribute__((cold))
2933 #define CYTHON_SMALL_CODE
2943 PyObject *__pyx_cython_runtime;
2944 PyObject *__pyx_empty_tuple;
2945 PyObject *__pyx_empty_bytes;
2946 PyObject *__pyx_empty_unicode;
2947 PyTypeObject *__pyx_ptype_7cpython_4type_type;
2948 PyTypeObject *__pyx_ptype_5numpy_dtype;
2949 PyTypeObject *__pyx_ptype_5numpy_flatiter;
2950 PyTypeObject *__pyx_ptype_5numpy_broadcast;
2951 PyTypeObject *__pyx_ptype_5numpy_ndarray;
2952 PyTypeObject *__pyx_ptype_5numpy_generic;
2953 PyTypeObject *__pyx_ptype_5numpy_number;
2954 PyTypeObject *__pyx_ptype_5numpy_integer;
2955 PyTypeObject *__pyx_ptype_5numpy_signedinteger;
2956 PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
2957 PyTypeObject *__pyx_ptype_5numpy_inexact;
2958 PyTypeObject *__pyx_ptype_5numpy_floating;
2959 PyTypeObject *__pyx_ptype_5numpy_complexfloating;
2960 PyTypeObject *__pyx_ptype_5numpy_flexible;
2961 PyTypeObject *__pyx_ptype_5numpy_character;
2962 PyTypeObject *__pyx_ptype_5numpy_ufunc;
2963 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
2964 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
2965 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
2966 PyObject *__pyx_codeobj_tab[9];
2967 PyObject *__pyx_string_tab[77];
2970PyTypeObject *__pyx_CommonTypesMetaclassType;
2973#if CYTHON_COMPILING_IN_LIMITED_API
2974PyObject *__Pyx_CachedMethodType;
2978PyTypeObject *__pyx_CyFunctionType;
2981struct __Pyx_CodeObjectCache __pyx_code_cache;
2989#if CYTHON_USE_MODULE_STATE
2992extern struct PyModuleDef __pyx_moduledef;
2995static struct PyModuleDef __pyx_moduledef;
2998#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
3000#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
3002static __pyx_mstatetype __pyx_mstate_global_static =
3008static __pyx_mstatetype *
const __pyx_mstate_global = &__pyx_mstate_global_static;
3011#define __pyx_kp_u_ __pyx_string_tab[0]
3012#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[1]
3013#define __pyx_kp_u_add_note __pyx_string_tab[2]
3014#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[3]
3015#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[4]
3016#define __pyx_kp_u_proteus_ctimeIntegration_pyx __pyx_string_tab[5]
3017#define __pyx_n_u_Mh2 __pyx_string_tab[6]
3018#define __pyx_n_u_Uin __pyx_string_tab[7]
3019#define __pyx_n_u_Uout __pyx_string_tab[8]
3020#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[9]
3021#define __pyx_n_u_annotate __pyx_string_tab[10]
3022#define __pyx_n_u_func __pyx_string_tab[11]
3023#define __pyx_n_u_main __pyx_string_tab[12]
3024#define __pyx_n_u_module __pyx_string_tab[13]
3025#define __pyx_n_u_name __pyx_string_tab[14]
3026#define __pyx_n_u_qualname __pyx_string_tab[15]
3027#define __pyx_n_u_test __pyx_string_tab[16]
3028#define __pyx_n_u_is_coroutine __pyx_string_tab[17]
3029#define __pyx_n_u_allowMinWithUndershoot __pyx_string_tab[18]
3030#define __pyx_n_u_alphaNeighbors __pyx_string_tab[19]
3031#define __pyx_n_u_alphas __pyx_string_tab[20]
3032#define __pyx_n_u_applyCockburnDGlimiterP1Lagrange __pyx_string_tab[21]
3033#define __pyx_n_u_applyDGlimitingP1Lagrange1d __pyx_string_tab[22]
3034#define __pyx_n_u_applyDGlimitingP1Lagrange1d_with __pyx_string_tab[23]
3035#define __pyx_n_u_applyDurlofskyDGlimiterP1Lagrang __pyx_string_tab[24]
3036#define __pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_3 __pyx_string_tab[25]
3037#define __pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_2 __pyx_string_tab[26]
3038#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[27]
3039#define __pyx_n_u_cline_in_traceback __pyx_string_tab[28]
3040#define __pyx_n_u_computeCockburnDGlimiterArrays2d __pyx_string_tab[29]
3041#define __pyx_n_u_computeElementNeighborShapeGradi __pyx_string_tab[30]
3042#define __pyx_n_u_ctimeIntegration __pyx_string_tab[31]
3043#define __pyx_n_u_dtn __pyx_string_tab[32]
3044#define __pyx_n_u_dtnm1 __pyx_string_tab[33]
3045#define __pyx_n_u_dtnp1 __pyx_string_tab[34]
3046#define __pyx_n_u_elementAverages __pyx_string_tab[35]
3047#define __pyx_n_u_elementBarycentersArray __pyx_string_tab[36]
3048#define __pyx_n_u_elementBoundariesArray __pyx_string_tab[37]
3049#define __pyx_n_u_elementBoundaryBarycentersArray __pyx_string_tab[38]
3050#define __pyx_n_u_elementNeighborShapeGradients __pyx_string_tab[39]
3051#define __pyx_n_u_elementNeighborsArray __pyx_string_tab[40]
3052#define __pyx_n_u_elementNodesArray __pyx_string_tab[41]
3053#define __pyx_n_u_enforcePositivity __pyx_string_tab[42]
3054#define __pyx_n_u_grad_v0 __pyx_string_tab[43]
3055#define __pyx_n_u_items __pyx_string_tab[44]
3056#define __pyx_n_u_killExtrema __pyx_string_tab[45]
3057#define __pyx_n_u_l2g __pyx_string_tab[46]
3058#define __pyx_n_u_limiterFlag __pyx_string_tab[47]
3059#define __pyx_n_u_nDOF_element __pyx_string_tab[48]
3060#define __pyx_n_u_nElementBoundaries_element __pyx_string_tab[49]
3061#define __pyx_n_u_nElements_global __pyx_string_tab[50]
3062#define __pyx_n_u_nNodes_element __pyx_string_tab[51]
3063#define __pyx_n_u_nPoints __pyx_string_tab[52]
3064#define __pyx_n_u_nSpace __pyx_string_tab[53]
3065#define __pyx_n_u_nodeArray __pyx_string_tab[54]
3066#define __pyx_n_u_np __pyx_string_tab[55]
3067#define __pyx_n_u_nu __pyx_string_tab[56]
3068#define __pyx_n_u_numpy __pyx_string_tab[57]
3069#define __pyx_n_u_pop __pyx_string_tab[58]
3070#define __pyx_n_u_psiTCtteDT __pyx_string_tab[59]
3071#define __pyx_n_u_setdefault __pyx_string_tab[60]
3072#define __pyx_n_u_tag __pyx_string_tab[61]
3073#define __pyx_n_u_tau __pyx_string_tab[62]
3074#define __pyx_n_u_vacuumTol __pyx_string_tab[63]
3075#define __pyx_n_u_values __pyx_string_tab[64]
3076#define __pyx_n_u_yn __pyx_string_tab[65]
3077#define __pyx_n_u_ypn __pyx_string_tab[66]
3078#define __pyx_n_u_ypnm1 __pyx_string_tab[67]
3079#define __pyx_kp_b_iso88591_vQa_6_6_AQ_6a_5Q_B __pyx_string_tab[68]
3080#define __pyx_kp_b_iso88591_Q_6_vQa_vQb_1_q_Gq_EQ_a_1 __pyx_string_tab[69]
3081#define __pyx_kp_b_iso88591_aq_c_e1_Q __pyx_string_tab[70]
3082#define __pyx_kp_b_iso88591_q_V1A_q_q_1_vQa_DA_s_s_2_Q_2_Q __pyx_string_tab[71]
3083#define __pyx_kp_b_iso88591_5Q_5Q_9A_1_1_3a_4q __pyx_string_tab[72]
3084#define __pyx_kp_b_iso88591_aq_31_7q_Ya_A_Q_Q_S_T __pyx_string_tab[73]
3085#define __pyx_kp_b_iso88591_9_5Q_y_a_Fa_DA_Cq_wa_a_Cq_s_t1 __pyx_string_tab[74]
3086#define __pyx_kp_b_iso88591_1_6a_q_Gq_EQ_S_q_q_S_1_A __pyx_string_tab[75]
3087#define __pyx_kp_b_iso88591_7aq_a_q_IQ_31_1_9_A_G1_O1_A_Cq __pyx_string_tab[76]
3089#if CYTHON_USE_MODULE_STATE
3090static CYTHON_SMALL_CODE
int __pyx_m_clear(PyObject *m) {
3091 __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
3092 if (!clear_module_state)
return 0;
3093 Py_CLEAR(clear_module_state->__pyx_d);
3094 Py_CLEAR(clear_module_state->__pyx_b);
3095 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
3096 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
3097 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
3098 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
3099 #if CYTHON_PEP489_MULTI_PHASE_INIT
3100 __Pyx_State_RemoveModule(NULL);
3102 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
3103 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
3104 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
3105 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
3106 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
3107 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
3108 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
3109 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
3110 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
3111 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
3112 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
3113 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
3114 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
3115 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
3116 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
3117 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
3118 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_items.method);
3119 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_pop.method);
3120 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_values.method);
3121 for (
int i=0; i<9; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
3122 for (
int i=0; i<77; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
3125Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
3128Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
3135#if CYTHON_USE_MODULE_STATE
3136static CYTHON_SMALL_CODE
int __pyx_m_traverse(PyObject *m, visitproc visit,
void *arg) {
3137 __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
3138 if (!traverse_module_state)
return 0;
3139 Py_VISIT(traverse_module_state->__pyx_d);
3140 Py_VISIT(traverse_module_state->__pyx_b);
3141 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
3142 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
3143 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
3144 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
3145 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
3146 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
3147 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
3148 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
3149 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
3150 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
3151 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
3152 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
3153 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
3154 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
3155 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
3156 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
3157 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
3158 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
3159 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
3160 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
3161 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_items.method);
3162 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_pop.method);
3163 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_values.method);
3164 for (
int i=0; i<9; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
3165 for (
int i=0; i<77; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
3168Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
3171Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
3187static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self) {
3188 PyTypeObject *__pyx_r;
3199 __pyx_r = PyDataType_TYPEOBJ(__pyx_v_self);
3224static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self) {
3236 __pyx_r = PyDataType_KIND(__pyx_v_self);
3261static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self) {
3273 __pyx_r = PyDataType_TYPE(__pyx_v_self);
3298static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self) {
3310 __pyx_r = PyDataType_BYTEORDER(__pyx_v_self);
3335static CYTHON_INLINE
int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self) {
3347 __pyx_r = PyDataType_TYPENUM(__pyx_v_self);
3372static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self) {
3384 __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
3409static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self) {
3421 __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
3446static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self) {
3447 PyObject *__pyx_r = NULL;
3448 __Pyx_RefNannyDeclarations
3449 PyObject *__pyx_t_1;
3450 __Pyx_RefNannySetupContext(
"__get__", 0);
3459 __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
3462 PyObject *__pyx_temp;
3464 __pyx_temp = __pyx_r;
3465 __Pyx_INCREF(((PyObject *)__pyx_t_1));
3466 __pyx_r = ((PyObject *)__pyx_t_1);
3468 __Pyx_XDECREF(__pyx_temp);
3483 __Pyx_XGIVEREF(__pyx_r);
3484 __Pyx_RefNannyFinishContext();
3496static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self) {
3497 PyObject *__pyx_r = NULL;
3498 __Pyx_RefNannyDeclarations
3499 PyObject *__pyx_t_1;
3500 __Pyx_RefNannySetupContext(
"__get__", 0);
3509 __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
3512 PyObject *__pyx_temp;
3514 __pyx_temp = __pyx_r;
3515 __Pyx_INCREF(((PyObject*)__pyx_t_1));
3516 __pyx_r = ((PyObject*)__pyx_t_1);
3518 __Pyx_XDECREF(__pyx_temp);
3533 __Pyx_XGIVEREF(__pyx_r);
3534 __Pyx_RefNannyFinishContext();
3546static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self) {
3547 PyArray_ArrayDescr *__pyx_r;
3558 __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
3583static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self) {
3595 __pyx_r = PyDataType_FLAGS(__pyx_v_self);
3620static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self) {
3632 __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
3657static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self) {
3669 __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
3694static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self) {
3706 __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
3731static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self) {
3743 __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
3768static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self) {
3780 __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
3805static CYTHON_INLINE
void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self) {
3817 __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
3842static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self) {
3854 __pyx_r = PyArray_BASE(__pyx_v_self);
3879static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self) {
3880 PyArray_Descr *__pyx_r = NULL;
3881 __Pyx_RefNannyDeclarations
3882 PyArray_Descr *__pyx_t_1;
3883 __Pyx_RefNannySetupContext(
"__get__", 0);
3892 __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
3895 PyArray_Descr *__pyx_temp;
3897 __pyx_temp = __pyx_r;
3898 __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
3899 __pyx_r = ((PyArray_Descr *)__pyx_t_1);
3901 __Pyx_XDECREF((PyObject *)__pyx_temp);
3916 __Pyx_XGIVEREF((PyObject *)__pyx_r);
3917 __Pyx_RefNannyFinishContext();
3929static CYTHON_INLINE
int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self) {
3941 __pyx_r = PyArray_NDIM(__pyx_v_self);
3966static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self) {
3978 __pyx_r = PyArray_DIMS(__pyx_v_self);
4003static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self) {
4015 __pyx_r = PyArray_STRIDES(__pyx_v_self);
4040static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self) {
4052 __pyx_r = PyArray_SIZE(__pyx_v_self);
4077static CYTHON_INLINE
char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self) {
4089 __pyx_r = PyArray_BYTES(__pyx_v_self);
4114static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
4115 PyObject *__pyx_r = NULL;
4116 __Pyx_RefNannyDeclarations
4117 PyObject *__pyx_t_1 = NULL;
4118 int __pyx_lineno = 0;
4119 const char *__pyx_filename = NULL;
4120 int __pyx_clineno = 0;
4121 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew1", 0);
4130 __pyx_t_1 = PyArray_MultiIterNew(1, ((
void *)__pyx_v_a));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 795, __pyx_L1_error)
4131 __Pyx_GOTREF(__pyx_t_1);
4133 PyObject *__pyx_temp;
4135 __pyx_temp = __pyx_r;
4136 __pyx_r = __pyx_t_1;
4138 __Pyx_XDECREF(__pyx_temp);
4153 __Pyx_XDECREF(__pyx_t_1);
4154 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
4157 __Pyx_XGIVEREF(__pyx_r);
4158 __Pyx_RefNannyFinishContext();
4170static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
4171 PyObject *__pyx_r = NULL;
4172 __Pyx_RefNannyDeclarations
4173 PyObject *__pyx_t_1 = NULL;
4174 int __pyx_lineno = 0;
4175 const char *__pyx_filename = NULL;
4176 int __pyx_clineno = 0;
4177 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew2", 0);
4186 __pyx_t_1 = PyArray_MultiIterNew(2, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L1_error)
4187 __Pyx_GOTREF(__pyx_t_1);
4189 PyObject *__pyx_temp;
4191 __pyx_temp = __pyx_r;
4192 __pyx_r = __pyx_t_1;
4194 __Pyx_XDECREF(__pyx_temp);
4209 __Pyx_XDECREF(__pyx_t_1);
4210 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
4213 __Pyx_XGIVEREF(__pyx_r);
4214 __Pyx_RefNannyFinishContext();
4226static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
4227 PyObject *__pyx_r = NULL;
4228 __Pyx_RefNannyDeclarations
4229 PyObject *__pyx_t_1 = NULL;
4230 int __pyx_lineno = 0;
4231 const char *__pyx_filename = NULL;
4232 int __pyx_clineno = 0;
4233 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew3", 0);
4242 __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(1, 801, __pyx_L1_error)
4243 __Pyx_GOTREF(__pyx_t_1);
4245 PyObject *__pyx_temp;
4247 __pyx_temp = __pyx_r;
4248 __pyx_r = __pyx_t_1;
4250 __Pyx_XDECREF(__pyx_temp);
4265 __Pyx_XDECREF(__pyx_t_1);
4266 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4269 __Pyx_XGIVEREF(__pyx_r);
4270 __Pyx_RefNannyFinishContext();
4282static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
4283 PyObject *__pyx_r = NULL;
4284 __Pyx_RefNannyDeclarations
4285 PyObject *__pyx_t_1 = NULL;
4286 int __pyx_lineno = 0;
4287 const char *__pyx_filename = NULL;
4288 int __pyx_clineno = 0;
4289 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew4", 0);
4298 __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(1, 804, __pyx_L1_error)
4299 __Pyx_GOTREF(__pyx_t_1);
4301 PyObject *__pyx_temp;
4303 __pyx_temp = __pyx_r;
4304 __pyx_r = __pyx_t_1;
4306 __Pyx_XDECREF(__pyx_temp);
4321 __Pyx_XDECREF(__pyx_t_1);
4322 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4325 __Pyx_XGIVEREF(__pyx_r);
4326 __Pyx_RefNannyFinishContext();
4338static 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) {
4339 PyObject *__pyx_r = NULL;
4340 __Pyx_RefNannyDeclarations
4341 PyObject *__pyx_t_1 = NULL;
4342 int __pyx_lineno = 0;
4343 const char *__pyx_filename = NULL;
4344 int __pyx_clineno = 0;
4345 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew5", 0);
4354 __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(1, 807, __pyx_L1_error)
4355 __Pyx_GOTREF(__pyx_t_1);
4357 PyObject *__pyx_temp;
4359 __pyx_temp = __pyx_r;
4360 __pyx_r = __pyx_t_1;
4362 __Pyx_XDECREF(__pyx_temp);
4377 __Pyx_XDECREF(__pyx_t_1);
4378 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4381 __Pyx_XGIVEREF(__pyx_r);
4382 __Pyx_RefNannyFinishContext();
4394static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
4395 PyObject *__pyx_r = NULL;
4396 __Pyx_RefNannyDeclarations
4398 PyObject *__pyx_t_2;
4399 __Pyx_RefNannySetupContext(
"PyDataType_SHAPE", 0);
4408 __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
4420 __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray___get__(__pyx_v_d)->shape;
4423 PyObject *__pyx_temp;
4425 __pyx_temp = __pyx_r;
4426 __Pyx_INCREF(((PyObject*)__pyx_t_2));
4427 __pyx_r = ((PyObject*)__pyx_t_2);
4429 __Pyx_XDECREF(__pyx_temp);
4452 PyObject *__pyx_temp;
4454 __pyx_temp = __pyx_r;
4455 __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
4456 __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
4458 __Pyx_XDECREF(__pyx_temp);
4473 __Pyx_XGIVEREF(__pyx_r);
4474 __Pyx_RefNannyFinishContext();
4486static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self) {
4498 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nin;
4523static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self) {
4535 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nout;
4560static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self) {
4572 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nargs;
4597static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self) {
4598 PyUFuncGenericFunction *__pyx_r;
4609 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->functions;
4634static CYTHON_INLINE
void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self) {
4646 __pyx_r = ((
void **)_PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->data);
4671static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self) {
4683 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ntypes;
4708static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self) {
4709 char const *__pyx_r;
4720 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->name;
4745static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self) {
4746 char const *__pyx_r;
4757 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->doc;
4782static CYTHON_INLINE
void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self) {
4794 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ptr;
4819static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self) {
4831 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->obj;
4856static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self) {
4868 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->userloops;
4893static CYTHON_INLINE
void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
4895 int __pyx_lineno = 0;
4896 const char *__pyx_filename = NULL;
4897 int __pyx_clineno = 0;
4906 Py_INCREF(__pyx_v_base);
4915 __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base);
if (unlikely(__pyx_t_1 == ((
int)-1))) __PYX_ERR(1, 1067, __pyx_L1_error)
4929 __Pyx_AddTraceback(
"numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
4942static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
4943 PyObject *__pyx_v_base;
4944 PyObject *__pyx_r = NULL;
4945 __Pyx_RefNannyDeclarations
4947 __Pyx_RefNannySetupContext(
"get_array_base", 0);
4956 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
4965 __pyx_t_1 = (__pyx_v_base == NULL);
4978 PyObject *__pyx_temp;
4980 __pyx_temp = __pyx_r;
4981 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4983 __Pyx_XDECREF(__pyx_temp);
5004 PyObject *__pyx_temp;
5006 __pyx_temp = __pyx_r;
5007 __Pyx_INCREF(((PyObject *)__pyx_v_base));
5008 __pyx_r = ((PyObject *)__pyx_v_base);
5010 __Pyx_XDECREF(__pyx_temp);
5025 __Pyx_XGIVEREF(__pyx_r);
5026 __Pyx_RefNannyFinishContext();
5038static CYTHON_INLINE
int __pyx_f_5numpy_import_array(
void) {
5040 __Pyx_RefNannyDeclarations
5041 PyObject *__pyx_t_1 = NULL;
5042 PyObject *__pyx_t_2 = NULL;
5043 PyObject *__pyx_t_3 = NULL;
5045 PyObject *__pyx_t_5 = NULL;
5046 PyObject *__pyx_t_6 = NULL;
5047 PyObject *__pyx_t_7 = NULL;
5048 PyObject *__pyx_t_8 = NULL;
5049 PyObject *__pyx_t_9 = NULL;
5051 int __pyx_lineno = 0;
5052 const char *__pyx_filename = NULL;
5053 int __pyx_clineno = 0;
5054 __Pyx_RefNannySetupContext(
"import_array", 0);
5064 __Pyx_PyThreadState_declare
5065 __Pyx_PyThreadState_assign
5066 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5067 __Pyx_XGOTREF(__pyx_t_1);
5068 __Pyx_XGOTREF(__pyx_t_2);
5069 __Pyx_XGOTREF(__pyx_t_3);
5079 __pyx_t_4 = _import_array();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 1079, __pyx_L3_error)
5090 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5091 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5092 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5093 goto __pyx_L8_try_end;
5103 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5105 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5106 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1080, __pyx_L5_except_error)
5107 __Pyx_XGOTREF(__pyx_t_5);
5108 __Pyx_XGOTREF(__pyx_t_6);
5109 __Pyx_XGOTREF(__pyx_t_7);
5121 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to};
5122 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
5123 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5124 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1081, __pyx_L5_except_error)
5125 __Pyx_GOTREF(__pyx_t_8);
5127 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5128 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5129 __PYX_ERR(1, 1081, __pyx_L5_except_error)
5131 goto __pyx_L5_except_error;
5140 __pyx_L5_except_error:;
5141 __Pyx_XGIVEREF(__pyx_t_1);
5142 __Pyx_XGIVEREF(__pyx_t_2);
5143 __Pyx_XGIVEREF(__pyx_t_3);
5144 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5145 goto __pyx_L1_error;
5161 __Pyx_XDECREF(__pyx_t_5);
5162 __Pyx_XDECREF(__pyx_t_6);
5163 __Pyx_XDECREF(__pyx_t_7);
5164 __Pyx_XDECREF(__pyx_t_8);
5165 __Pyx_XDECREF(__pyx_t_9);
5166 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5170 __Pyx_RefNannyFinishContext();
5182static CYTHON_INLINE
int __pyx_f_5numpy_import_umath(
void) {
5184 __Pyx_RefNannyDeclarations
5185 PyObject *__pyx_t_1 = NULL;
5186 PyObject *__pyx_t_2 = NULL;
5187 PyObject *__pyx_t_3 = NULL;
5189 PyObject *__pyx_t_5 = NULL;
5190 PyObject *__pyx_t_6 = NULL;
5191 PyObject *__pyx_t_7 = NULL;
5192 PyObject *__pyx_t_8 = NULL;
5193 PyObject *__pyx_t_9 = NULL;
5195 int __pyx_lineno = 0;
5196 const char *__pyx_filename = NULL;
5197 int __pyx_clineno = 0;
5198 __Pyx_RefNannySetupContext(
"import_umath", 0);
5208 __Pyx_PyThreadState_declare
5209 __Pyx_PyThreadState_assign
5210 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5211 __Pyx_XGOTREF(__pyx_t_1);
5212 __Pyx_XGOTREF(__pyx_t_2);
5213 __Pyx_XGOTREF(__pyx_t_3);
5223 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 1085, __pyx_L3_error)
5234 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5235 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5236 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5237 goto __pyx_L8_try_end;
5247 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5249 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5250 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1086, __pyx_L5_except_error)
5251 __Pyx_XGOTREF(__pyx_t_5);
5252 __Pyx_XGOTREF(__pyx_t_6);
5253 __Pyx_XGOTREF(__pyx_t_7);
5265 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
5266 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
5267 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5268 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1087, __pyx_L5_except_error)
5269 __Pyx_GOTREF(__pyx_t_8);
5271 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5272 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5273 __PYX_ERR(1, 1087, __pyx_L5_except_error)
5275 goto __pyx_L5_except_error;
5284 __pyx_L5_except_error:;
5285 __Pyx_XGIVEREF(__pyx_t_1);
5286 __Pyx_XGIVEREF(__pyx_t_2);
5287 __Pyx_XGIVEREF(__pyx_t_3);
5288 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5289 goto __pyx_L1_error;
5305 __Pyx_XDECREF(__pyx_t_5);
5306 __Pyx_XDECREF(__pyx_t_6);
5307 __Pyx_XDECREF(__pyx_t_7);
5308 __Pyx_XDECREF(__pyx_t_8);
5309 __Pyx_XDECREF(__pyx_t_9);
5310 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5314 __Pyx_RefNannyFinishContext();
5326static CYTHON_INLINE
int __pyx_f_5numpy_import_ufunc(
void) {
5328 __Pyx_RefNannyDeclarations
5329 PyObject *__pyx_t_1 = NULL;
5330 PyObject *__pyx_t_2 = NULL;
5331 PyObject *__pyx_t_3 = NULL;
5333 PyObject *__pyx_t_5 = NULL;
5334 PyObject *__pyx_t_6 = NULL;
5335 PyObject *__pyx_t_7 = NULL;
5336 PyObject *__pyx_t_8 = NULL;
5337 PyObject *__pyx_t_9 = NULL;
5339 int __pyx_lineno = 0;
5340 const char *__pyx_filename = NULL;
5341 int __pyx_clineno = 0;
5342 __Pyx_RefNannySetupContext(
"import_ufunc", 0);
5352 __Pyx_PyThreadState_declare
5353 __Pyx_PyThreadState_assign
5354 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5355 __Pyx_XGOTREF(__pyx_t_1);
5356 __Pyx_XGOTREF(__pyx_t_2);
5357 __Pyx_XGOTREF(__pyx_t_3);
5367 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 1091, __pyx_L3_error)
5378 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5379 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5380 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5381 goto __pyx_L8_try_end;
5391 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5393 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5394 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1092, __pyx_L5_except_error)
5395 __Pyx_XGOTREF(__pyx_t_5);
5396 __Pyx_XGOTREF(__pyx_t_6);
5397 __Pyx_XGOTREF(__pyx_t_7);
5409 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
5410 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
5411 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5412 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1093, __pyx_L5_except_error)
5413 __Pyx_GOTREF(__pyx_t_8);
5415 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5416 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5417 __PYX_ERR(1, 1093, __pyx_L5_except_error)
5419 goto __pyx_L5_except_error;
5428 __pyx_L5_except_error:;
5429 __Pyx_XGIVEREF(__pyx_t_1);
5430 __Pyx_XGIVEREF(__pyx_t_2);
5431 __Pyx_XGIVEREF(__pyx_t_3);
5432 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5433 goto __pyx_L1_error;
5449 __Pyx_XDECREF(__pyx_t_5);
5450 __Pyx_XDECREF(__pyx_t_6);
5451 __Pyx_XDECREF(__pyx_t_7);
5452 __Pyx_XDECREF(__pyx_t_8);
5453 __Pyx_XDECREF(__pyx_t_9);
5454 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5458 __Pyx_RefNannyFinishContext();
5470static CYTHON_INLINE
int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
5482 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
5508static CYTHON_INLINE
int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
5520 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
5546static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
5547 npy_datetime __pyx_r;
5558 __pyx_r = _PyDatetimeScalarObject_GetValue(__pyx_v_obj);
5583static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
5584 npy_timedelta __pyx_r;
5595 __pyx_r = _PyTimedeltaScalarObject_GetValue(__pyx_v_obj);
5620static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
5621 NPY_DATETIMEUNIT __pyx_r;
5632 __pyx_r = _PyDatetimeScalarObject_GetMetadata(__pyx_v_obj).base;
5658static PyObject *__pyx_pw_16ctimeIntegration_1psiTCtteDT(PyObject *__pyx_self,
5659#
if CYTHON_VECTORCALL
5660PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5662PyObject *__pyx_args, PyObject *__pyx_kwds
5665static PyMethodDef __pyx_mdef_16ctimeIntegration_1psiTCtteDT = {
"psiTCtteDT", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_1psiTCtteDT, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5666static PyObject *__pyx_pw_16ctimeIntegration_1psiTCtteDT(PyObject *__pyx_self,
5667#
if CYTHON_VECTORCALL
5668PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5670PyObject *__pyx_args, PyObject *__pyx_kwds
5673 int __pyx_v_nPoints;
5676 double __pyx_v_dtnm1;
5677 PyArrayObject *__pyx_v_yn = 0;
5678 PyArrayObject *__pyx_v_ypn = 0;
5679 PyArrayObject *__pyx_v_ypnm1 = 0;
5680 PyArrayObject *__pyx_v_dtnp1 = 0;
5681 #if !CYTHON_VECTORCALL
5682 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5684 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
5685 PyObject* values[8] = {0,0,0,0,0,0,0,0};
5686 int __pyx_lineno = 0;
5687 const char *__pyx_filename = NULL;
5688 int __pyx_clineno = 0;
5689 PyObject *__pyx_r = 0;
5690 __Pyx_RefNannyDeclarations
5691 __Pyx_RefNannySetupContext(
"psiTCtteDT (wrapper)", 0);
5692 #if !CYTHON_VECTORCALL
5693 #if CYTHON_ASSUME_SAFE_SIZE
5694 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5696 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
5699 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5701 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nPoints,&__pyx_mstate_global->__pyx_n_u_tau,&__pyx_mstate_global->__pyx_n_u_dtn,&__pyx_mstate_global->__pyx_n_u_dtnm1,&__pyx_mstate_global->__pyx_n_u_yn,&__pyx_mstate_global->__pyx_n_u_ypn,&__pyx_mstate_global->__pyx_n_u_ypnm1,&__pyx_mstate_global->__pyx_n_u_dtnp1,0};
5702 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
5703 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 144, __pyx_L3_error)
5704 if (__pyx_kwds_len > 0) {
5705 switch (__pyx_nargs) {
5707 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
5708 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 144, __pyx_L3_error)
5711 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5712 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 144, __pyx_L3_error)
5715 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5716 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 144, __pyx_L3_error)
5719 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5720 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 144, __pyx_L3_error)
5723 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5724 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 144, __pyx_L3_error)
5727 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5728 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 144, __pyx_L3_error)
5731 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5732 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 144, __pyx_L3_error)
5735 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5736 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 144, __pyx_L3_error)
5739 default:
goto __pyx_L5_argtuple_error;
5741 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5742 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"psiTCtteDT", 0) < (0)) __PYX_ERR(0, 144, __pyx_L3_error)
5743 for (Py_ssize_t i = __pyx_nargs; i < 8; i++) {
5744 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"psiTCtteDT", 1, 8, 8, i); __PYX_ERR(0, 144, __pyx_L3_error) }
5746 }
else if (unlikely(__pyx_nargs != 8)) {
5747 goto __pyx_L5_argtuple_error;
5749 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5750 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 144, __pyx_L3_error)
5751 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5752 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 144, __pyx_L3_error)
5753 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5754 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 144, __pyx_L3_error)
5755 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5756 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 144, __pyx_L3_error)
5757 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5758 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 144, __pyx_L3_error)
5759 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5760 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 144, __pyx_L3_error)
5761 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5762 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 144, __pyx_L3_error)
5763 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
5764 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 144, __pyx_L3_error)
5766 __pyx_v_nPoints = __Pyx_PyLong_As_int(values[0]);
if (unlikely((__pyx_v_nPoints == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L3_error)
5767 __pyx_v_tau = __Pyx_PyFloat_AsDouble(values[1]);
if (unlikely((__pyx_v_tau == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 145, __pyx_L3_error)
5768 __pyx_v_dtn = __Pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_dtn == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error)
5769 __pyx_v_dtnm1 = __Pyx_PyFloat_AsDouble(values[3]);
if (unlikely((__pyx_v_dtnm1 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
5770 __pyx_v_yn = ((PyArrayObject *)values[4]);
5771 __pyx_v_ypn = ((PyArrayObject *)values[5]);
5772 __pyx_v_ypnm1 = ((PyArrayObject *)values[6]);
5773 __pyx_v_dtnp1 = ((PyArrayObject *)values[7]);
5776 __pyx_L5_argtuple_error:;
5777 __Pyx_RaiseArgtupleInvalid(
"psiTCtteDT", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 144, __pyx_L3_error)
5779 goto __pyx_L4_argument_unpacking_done;
5781 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
5782 Py_XDECREF(values[__pyx_temp]);
5784 __Pyx_AddTraceback(
"ctimeIntegration.psiTCtteDT", __pyx_clineno, __pyx_lineno, __pyx_filename);
5785 __Pyx_RefNannyFinishContext();
5787 __pyx_L4_argument_unpacking_done:;
5788 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"yn", 0))) __PYX_ERR(0, 148, __pyx_L1_error)
5789 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ypn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"ypn", 0))) __PYX_ERR(0, 149, __pyx_L1_error)
5790 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ypnm1), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"ypnm1", 0))) __PYX_ERR(0, 150, __pyx_L1_error)
5791 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtnp1), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"dtnp1", 0))) __PYX_ERR(0, 151, __pyx_L1_error)
5792 __pyx_r = __pyx_pf_16ctimeIntegration_psiTCtteDT(__pyx_self, __pyx_v_nPoints, __pyx_v_tau, __pyx_v_dtn, __pyx_v_dtnm1, __pyx_v_yn, __pyx_v_ypn, __pyx_v_ypnm1, __pyx_v_dtnp1);
5798 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
5799 Py_XDECREF(values[__pyx_temp]);
5801 goto __pyx_L7_cleaned_up;
5803 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
5804 Py_XDECREF(values[__pyx_temp]);
5806 __pyx_L7_cleaned_up:;
5811 __Pyx_RefNannyFinishContext();
5815static PyObject *__pyx_pf_16ctimeIntegration_psiTCtteDT(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_nPoints,
double __pyx_v_tau,
double __pyx_v_dtn,
double __pyx_v_dtnm1, PyArrayObject *__pyx_v_yn, PyArrayObject *__pyx_v_ypn, PyArrayObject *__pyx_v_ypnm1, PyArrayObject *__pyx_v_dtnp1) {
5816 PyObject *__pyx_r = NULL;
5817 __Pyx_RefNannyDeclarations
5818 __Pyx_RefNannySetupContext(
"psiTCtteDT", 0);
5827 psiTCtteDT(__pyx_v_nPoints, __pyx_v_tau, __pyx_v_dtn, __pyx_v_dtnm1, ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_yn)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_ypn)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_ypnm1)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dtnp1)));
5838 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5839 __Pyx_XGIVEREF(__pyx_r);
5840 __Pyx_RefNannyFinishContext();
5853static PyObject *__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d(PyObject *__pyx_self,
5854#
if CYTHON_VECTORCALL
5855PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5857PyObject *__pyx_args, PyObject *__pyx_kwds
5860static PyMethodDef __pyx_mdef_16ctimeIntegration_3applyDGlimitingP1Lagrange1d = {
"applyDGlimitingP1Lagrange1d", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5861static PyObject *__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d(PyObject *__pyx_self,
5862#
if CYTHON_VECTORCALL
5863PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5865PyObject *__pyx_args, PyObject *__pyx_kwds
5868 int __pyx_v_limiterFlag;
5869 int __pyx_v_nElements_global;
5870 int __pyx_v_nNodes_element;
5871 int __pyx_v_nElementBoundaries_element;
5872 int __pyx_v_nDOF_element;
5873 PyArrayObject *__pyx_v_elementNodesArray = 0;
5874 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
5875 PyArrayObject *__pyx_v_nodeArray = 0;
5876 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
5877 PyArrayObject *__pyx_v_l2g = 0;
5878 PyArrayObject *__pyx_v_tag = 0;
5879 PyArrayObject *__pyx_v_Uin = 0;
5880 PyArrayObject *__pyx_v_Uout = 0;
5881 #if !CYTHON_VECTORCALL
5882 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5884 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
5885 PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
5886 int __pyx_lineno = 0;
5887 const char *__pyx_filename = NULL;
5888 int __pyx_clineno = 0;
5889 PyObject *__pyx_r = 0;
5890 __Pyx_RefNannyDeclarations
5891 __Pyx_RefNannySetupContext(
"applyDGlimitingP1Lagrange1d (wrapper)", 0);
5892 #if !CYTHON_VECTORCALL
5893 #if CYTHON_ASSUME_SAFE_SIZE
5894 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5896 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
5899 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5901 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_limiterFlag,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
5902 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
5903 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 161, __pyx_L3_error)
5904 if (__pyx_kwds_len > 0) {
5905 switch (__pyx_nargs) {
5907 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
5908 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 161, __pyx_L3_error)
5911 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
5912 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 161, __pyx_L3_error)
5915 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
5916 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 161, __pyx_L3_error)
5919 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
5920 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 161, __pyx_L3_error)
5923 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
5924 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 161, __pyx_L3_error)
5927 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
5928 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 161, __pyx_L3_error)
5931 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5932 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 161, __pyx_L3_error)
5935 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5936 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 161, __pyx_L3_error)
5939 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5940 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 161, __pyx_L3_error)
5943 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5944 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 161, __pyx_L3_error)
5947 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5948 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 161, __pyx_L3_error)
5951 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5952 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 161, __pyx_L3_error)
5955 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5956 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 161, __pyx_L3_error)
5959 default:
goto __pyx_L5_argtuple_error;
5961 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5962 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"applyDGlimitingP1Lagrange1d", 0) < (0)) __PYX_ERR(0, 161, __pyx_L3_error)
5963 for (Py_ssize_t i = __pyx_nargs; i < 13; i++) {
5964 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"applyDGlimitingP1Lagrange1d", 1, 13, 13, i); __PYX_ERR(0, 161, __pyx_L3_error) }
5966 }
else if (unlikely(__pyx_nargs != 13)) {
5967 goto __pyx_L5_argtuple_error;
5969 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5970 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 161, __pyx_L3_error)
5971 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5972 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 161, __pyx_L3_error)
5973 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5974 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 161, __pyx_L3_error)
5975 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5976 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 161, __pyx_L3_error)
5977 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5978 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 161, __pyx_L3_error)
5979 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5980 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 161, __pyx_L3_error)
5981 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5982 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 161, __pyx_L3_error)
5983 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
5984 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 161, __pyx_L3_error)
5985 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
5986 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 161, __pyx_L3_error)
5987 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
5988 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 161, __pyx_L3_error)
5989 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
5990 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 161, __pyx_L3_error)
5991 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
5992 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 161, __pyx_L3_error)
5993 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
5994 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 161, __pyx_L3_error)
5996 __pyx_v_limiterFlag = __Pyx_PyLong_As_int(values[0]);
if (unlikely((__pyx_v_limiterFlag == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L3_error)
5997 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[1]);
if (unlikely((__pyx_v_nElements_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L3_error)
5998 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[2]);
if (unlikely((__pyx_v_nNodes_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L3_error)
5999 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[3]);
if (unlikely((__pyx_v_nElementBoundaries_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
6000 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[4]);
if (unlikely((__pyx_v_nDOF_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L3_error)
6001 __pyx_v_elementNodesArray = ((PyArrayObject *)values[5]);
6002 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[6]);
6003 __pyx_v_nodeArray = ((PyArrayObject *)values[7]);
6004 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[8]);
6005 __pyx_v_l2g = ((PyArrayObject *)values[9]);
6006 __pyx_v_tag = ((PyArrayObject *)values[10]);
6007 __pyx_v_Uin = ((PyArrayObject *)values[11]);
6008 __pyx_v_Uout = ((PyArrayObject *)values[12]);
6011 __pyx_L5_argtuple_error:;
6012 __Pyx_RaiseArgtupleInvalid(
"applyDGlimitingP1Lagrange1d", 1, 13, 13, __pyx_nargs); __PYX_ERR(0, 161, __pyx_L3_error)
6014 goto __pyx_L4_argument_unpacking_done;
6016 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6017 Py_XDECREF(values[__pyx_temp]);
6019 __Pyx_AddTraceback(
"ctimeIntegration.applyDGlimitingP1Lagrange1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6020 __Pyx_RefNannyFinishContext();
6022 __pyx_L4_argument_unpacking_done:;
6023 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNodesArray", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
6024 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(0, 167, __pyx_L1_error)
6025 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"nodeArray", 0))) __PYX_ERR(0, 168, __pyx_L1_error)
6026 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBarycentersArray", 0))) __PYX_ERR(0, 169, __pyx_L1_error)
6027 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"l2g", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
6028 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"tag", 0))) __PYX_ERR(0, 171, __pyx_L1_error)
6029 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uin", 0))) __PYX_ERR(0, 172, __pyx_L1_error)
6030 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uout", 0))) __PYX_ERR(0, 173, __pyx_L1_error)
6031 __pyx_r = __pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(__pyx_self, __pyx_v_limiterFlag, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, __pyx_v_elementNodesArray, __pyx_v_elementNeighborsArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
6037 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6038 Py_XDECREF(values[__pyx_temp]);
6040 goto __pyx_L7_cleaned_up;
6042 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6043 Py_XDECREF(values[__pyx_temp]);
6045 __pyx_L7_cleaned_up:;
6051 __Pyx_RefNannyFinishContext();
6055static PyObject *__pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_limiterFlag,
int __pyx_v_nElements_global,
int __pyx_v_nNodes_element,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
6056 PyObject *__pyx_r = NULL;
6057 __Pyx_RefNannyDeclarations
6058 __Pyx_RefNannySetupContext(
"applyDGlimitingP1Lagrange1d", 0);
6067 applyDGlimitingP1Lagrange1d(__pyx_v_limiterFlag, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
6078 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6079 __Pyx_XGIVEREF(__pyx_r);
6080 __Pyx_RefNannyFinishContext();
6093static PyObject *__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol(PyObject *__pyx_self,
6094#
if CYTHON_VECTORCALL
6095PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6097PyObject *__pyx_args, PyObject *__pyx_kwds
6100static PyMethodDef __pyx_mdef_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol = {
"applyDGlimitingP1Lagrange1d_withVacuumTol", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6101static PyObject *__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol(PyObject *__pyx_self,
6102#
if CYTHON_VECTORCALL
6103PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6105PyObject *__pyx_args, PyObject *__pyx_kwds
6108 int __pyx_v_enforcePositivity;
6109 double __pyx_v_vacuumTol;
6110 int __pyx_v_nElements_global;
6111 int __pyx_v_nNodes_element;
6112 int __pyx_v_nElementBoundaries_element;
6113 int __pyx_v_nDOF_element;
6114 PyArrayObject *__pyx_v_elementNodesArray = 0;
6115 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6116 PyArrayObject *__pyx_v_nodeArray = 0;
6117 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
6118 PyArrayObject *__pyx_v_l2g = 0;
6119 PyArrayObject *__pyx_v_tag = 0;
6120 PyArrayObject *__pyx_v_Uin = 0;
6121 PyArrayObject *__pyx_v_Uout = 0;
6122 #if !CYTHON_VECTORCALL
6123 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6125 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6126 PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
6127 int __pyx_lineno = 0;
6128 const char *__pyx_filename = NULL;
6129 int __pyx_clineno = 0;
6130 PyObject *__pyx_r = 0;
6131 __Pyx_RefNannyDeclarations
6132 __Pyx_RefNannySetupContext(
"applyDGlimitingP1Lagrange1d_withVacuumTol (wrapper)", 0);
6133 #if !CYTHON_VECTORCALL
6134 #if CYTHON_ASSUME_SAFE_SIZE
6135 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6137 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
6140 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6142 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_enforcePositivity,&__pyx_mstate_global->__pyx_n_u_vacuumTol,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
6143 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6144 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 188, __pyx_L3_error)
6145 if (__pyx_kwds_len > 0) {
6146 switch (__pyx_nargs) {
6148 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6149 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 188, __pyx_L3_error)
6152 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6153 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 188, __pyx_L3_error)
6156 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6157 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 188, __pyx_L3_error)
6160 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6161 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 188, __pyx_L3_error)
6164 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
6165 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 188, __pyx_L3_error)
6168 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6169 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 188, __pyx_L3_error)
6172 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6173 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 188, __pyx_L3_error)
6176 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6177 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 188, __pyx_L3_error)
6180 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6181 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 188, __pyx_L3_error)
6184 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6185 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 188, __pyx_L3_error)
6188 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6189 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 188, __pyx_L3_error)
6192 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6193 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 188, __pyx_L3_error)
6196 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6197 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 188, __pyx_L3_error)
6200 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6201 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 188, __pyx_L3_error)
6204 default:
goto __pyx_L5_argtuple_error;
6206 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6207 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"applyDGlimitingP1Lagrange1d_withVacuumTol", 0) < (0)) __PYX_ERR(0, 188, __pyx_L3_error)
6208 for (Py_ssize_t i = __pyx_nargs; i < 14; i++) {
6209 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, i); __PYX_ERR(0, 188, __pyx_L3_error) }
6211 }
else if (unlikely(__pyx_nargs != 14)) {
6212 goto __pyx_L5_argtuple_error;
6214 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6215 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 188, __pyx_L3_error)
6216 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6217 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 188, __pyx_L3_error)
6218 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6219 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 188, __pyx_L3_error)
6220 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6221 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 188, __pyx_L3_error)
6222 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6223 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 188, __pyx_L3_error)
6224 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6225 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 188, __pyx_L3_error)
6226 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6227 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 188, __pyx_L3_error)
6228 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6229 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 188, __pyx_L3_error)
6230 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6231 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 188, __pyx_L3_error)
6232 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
6233 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 188, __pyx_L3_error)
6234 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6235 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 188, __pyx_L3_error)
6236 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6237 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 188, __pyx_L3_error)
6238 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6239 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 188, __pyx_L3_error)
6240 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6241 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 188, __pyx_L3_error)
6243 __pyx_v_enforcePositivity = __Pyx_PyLong_As_int(values[0]);
if (unlikely((__pyx_v_enforcePositivity == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error)
6244 __pyx_v_vacuumTol = __Pyx_PyFloat_AsDouble(values[1]);
if (unlikely((__pyx_v_vacuumTol == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L3_error)
6245 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[2]);
if (unlikely((__pyx_v_nElements_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L3_error)
6246 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[3]);
if (unlikely((__pyx_v_nNodes_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 191, __pyx_L3_error)
6247 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[4]);
if (unlikely((__pyx_v_nElementBoundaries_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L3_error)
6248 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[5]);
if (unlikely((__pyx_v_nDOF_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __pyx_L3_error)
6249 __pyx_v_elementNodesArray = ((PyArrayObject *)values[6]);
6250 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
6251 __pyx_v_nodeArray = ((PyArrayObject *)values[8]);
6252 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[9]);
6253 __pyx_v_l2g = ((PyArrayObject *)values[10]);
6254 __pyx_v_tag = ((PyArrayObject *)values[11]);
6255 __pyx_v_Uin = ((PyArrayObject *)values[12]);
6256 __pyx_v_Uout = ((PyArrayObject *)values[13]);
6259 __pyx_L5_argtuple_error:;
6260 __Pyx_RaiseArgtupleInvalid(
"applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, __pyx_nargs); __PYX_ERR(0, 188, __pyx_L3_error)
6262 goto __pyx_L4_argument_unpacking_done;
6264 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6265 Py_XDECREF(values[__pyx_temp]);
6267 __Pyx_AddTraceback(
"ctimeIntegration.applyDGlimitingP1Lagrange1d_withVacuumTol", __pyx_clineno, __pyx_lineno, __pyx_filename);
6268 __Pyx_RefNannyFinishContext();
6270 __pyx_L4_argument_unpacking_done:;
6271 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNodesArray", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
6272 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(0, 195, __pyx_L1_error)
6273 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"nodeArray", 0))) __PYX_ERR(0, 196, __pyx_L1_error)
6274 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBarycentersArray", 0))) __PYX_ERR(0, 197, __pyx_L1_error)
6275 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"l2g", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
6276 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"tag", 0))) __PYX_ERR(0, 199, __pyx_L1_error)
6277 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uin", 0))) __PYX_ERR(0, 200, __pyx_L1_error)
6278 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uout", 0))) __PYX_ERR(0, 201, __pyx_L1_error)
6279 __pyx_r = __pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(__pyx_self, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, __pyx_v_elementNodesArray, __pyx_v_elementNeighborsArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
6285 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6286 Py_XDECREF(values[__pyx_temp]);
6288 goto __pyx_L7_cleaned_up;
6290 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6291 Py_XDECREF(values[__pyx_temp]);
6293 __pyx_L7_cleaned_up:;
6300 __Pyx_RefNannyFinishContext();
6304static PyObject *__pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_enforcePositivity,
double __pyx_v_vacuumTol,
int __pyx_v_nElements_global,
int __pyx_v_nNodes_element,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
6305 PyObject *__pyx_r = NULL;
6306 __Pyx_RefNannyDeclarations
6307 __Pyx_RefNannySetupContext(
"applyDGlimitingP1Lagrange1d_withVacuumTol", 0);
6316 applyDGlimitingP1Lagrange1d_withVacuumTol(__pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
6327 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6328 __Pyx_XGIVEREF(__pyx_r);
6329 __Pyx_RefNannyFinishContext();
6342static PyObject *__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients(PyObject *__pyx_self,
6343#
if CYTHON_VECTORCALL
6344PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6346PyObject *__pyx_args, PyObject *__pyx_kwds
6349static PyMethodDef __pyx_mdef_16ctimeIntegration_7computeElementNeighborShapeGradients = {
"computeElementNeighborShapeGradients", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6350static PyObject *__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients(PyObject *__pyx_self,
6351#
if CYTHON_VECTORCALL
6352PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6354PyObject *__pyx_args, PyObject *__pyx_kwds
6357 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
6358 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6359 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
6360 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
6361 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
6362 #if !CYTHON_VECTORCALL
6363 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6365 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6366 PyObject* values[5] = {0,0,0,0,0};
6367 int __pyx_lineno = 0;
6368 const char *__pyx_filename = NULL;
6369 int __pyx_clineno = 0;
6370 PyObject *__pyx_r = 0;
6371 __Pyx_RefNannyDeclarations
6372 __Pyx_RefNannySetupContext(
"computeElementNeighborShapeGradients (wrapper)", 0);
6373 #if !CYTHON_VECTORCALL
6374 #if CYTHON_ASSUME_SAFE_SIZE
6375 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6377 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
6380 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6382 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,0};
6383 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6384 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 218, __pyx_L3_error)
6385 if (__pyx_kwds_len > 0) {
6386 switch (__pyx_nargs) {
6388 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6389 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 218, __pyx_L3_error)
6392 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6393 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 218, __pyx_L3_error)
6396 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6397 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 218, __pyx_L3_error)
6400 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6401 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 218, __pyx_L3_error)
6404 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6405 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error)
6408 default:
goto __pyx_L5_argtuple_error;
6410 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6411 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"computeElementNeighborShapeGradients", 0) < (0)) __PYX_ERR(0, 218, __pyx_L3_error)
6412 for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
6413 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"computeElementNeighborShapeGradients", 1, 5, 5, i); __PYX_ERR(0, 218, __pyx_L3_error) }
6415 }
else if (unlikely(__pyx_nargs != 5)) {
6416 goto __pyx_L5_argtuple_error;
6418 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6419 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error)
6420 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6421 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 218, __pyx_L3_error)
6422 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6423 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 218, __pyx_L3_error)
6424 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6425 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 218, __pyx_L3_error)
6426 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6427 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 218, __pyx_L3_error)
6429 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[0]);
6430 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[1]);
6431 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[2]);
6432 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[3]);
6433 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[4]);
6436 __pyx_L5_argtuple_error:;
6437 __Pyx_RaiseArgtupleInvalid(
"computeElementNeighborShapeGradients", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 218, __pyx_L3_error)
6439 goto __pyx_L4_argument_unpacking_done;
6441 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6442 Py_XDECREF(values[__pyx_temp]);
6444 __Pyx_AddTraceback(
"ctimeIntegration.computeElementNeighborShapeGradients", __pyx_clineno, __pyx_lineno, __pyx_filename);
6445 __Pyx_RefNannyFinishContext();
6447 __pyx_L4_argument_unpacking_done:;
6448 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundariesArray", 0))) __PYX_ERR(0, 218, __pyx_L1_error)
6449 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(0, 219, __pyx_L1_error)
6450 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBarycentersArray", 0))) __PYX_ERR(0, 220, __pyx_L1_error)
6451 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 221, __pyx_L1_error)
6452 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborShapeGradients", 0))) __PYX_ERR(0, 222, __pyx_L1_error)
6453 __pyx_r = __pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(__pyx_self, __pyx_v_elementBoundariesArray, __pyx_v_elementNeighborsArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients);
6459 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6460 Py_XDECREF(values[__pyx_temp]);
6462 goto __pyx_L7_cleaned_up;
6464 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6465 Py_XDECREF(values[__pyx_temp]);
6467 __pyx_L7_cleaned_up:;
6468 __Pyx_RefNannyFinishContext();
6472static PyObject *__pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients) {
6473 PyObject *__pyx_r = NULL;
6474 __Pyx_RefNannyDeclarations
6475 __Pyx_RefNannySetupContext(
"computeElementNeighborShapeGradients", 0);
6484 computeElementNeighborShapeGradients((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[0]), (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]), ((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]) - 1), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)));
6495 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6496 __Pyx_XGIVEREF(__pyx_r);
6497 __Pyx_RefNannyFinishContext();
6510static PyObject *__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d(PyObject *__pyx_self,
6511#
if CYTHON_VECTORCALL
6512PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6514PyObject *__pyx_args, PyObject *__pyx_kwds
6517static PyMethodDef __pyx_mdef_16ctimeIntegration_9computeCockburnDGlimiterArrays2d = {
"computeCockburnDGlimiterArrays2d", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6518static PyObject *__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d(PyObject *__pyx_self,
6519#
if CYTHON_VECTORCALL
6520PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6522PyObject *__pyx_args, PyObject *__pyx_kwds
6525 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
6526 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6527 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
6528 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
6529 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
6530 PyArrayObject *__pyx_v_alphas = 0;
6531 PyArrayObject *__pyx_v_alphaNeighbors = 0;
6532 #if !CYTHON_VECTORCALL
6533 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6535 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6536 PyObject* values[7] = {0,0,0,0,0,0,0};
6537 int __pyx_lineno = 0;
6538 const char *__pyx_filename = NULL;
6539 int __pyx_clineno = 0;
6540 PyObject *__pyx_r = 0;
6541 __Pyx_RefNannyDeclarations
6542 __Pyx_RefNannySetupContext(
"computeCockburnDGlimiterArrays2d (wrapper)", 0);
6543 #if !CYTHON_VECTORCALL
6544 #if CYTHON_ASSUME_SAFE_SIZE
6545 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6547 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
6550 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6552 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,&__pyx_mstate_global->__pyx_n_u_alphas,&__pyx_mstate_global->__pyx_n_u_alphaNeighbors,0};
6553 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6554 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 232, __pyx_L3_error)
6555 if (__pyx_kwds_len > 0) {
6556 switch (__pyx_nargs) {
6558 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6559 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 232, __pyx_L3_error)
6562 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6563 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 232, __pyx_L3_error)
6566 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6567 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 232, __pyx_L3_error)
6570 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6571 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 232, __pyx_L3_error)
6574 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6575 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 232, __pyx_L3_error)
6578 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6579 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 232, __pyx_L3_error)
6582 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6583 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 232, __pyx_L3_error)
6586 default:
goto __pyx_L5_argtuple_error;
6588 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6589 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"computeCockburnDGlimiterArrays2d", 0) < (0)) __PYX_ERR(0, 232, __pyx_L3_error)
6590 for (Py_ssize_t i = __pyx_nargs; i < 7; i++) {
6591 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"computeCockburnDGlimiterArrays2d", 1, 7, 7, i); __PYX_ERR(0, 232, __pyx_L3_error) }
6593 }
else if (unlikely(__pyx_nargs != 7)) {
6594 goto __pyx_L5_argtuple_error;
6596 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6597 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 232, __pyx_L3_error)
6598 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6599 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 232, __pyx_L3_error)
6600 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6601 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 232, __pyx_L3_error)
6602 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6603 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 232, __pyx_L3_error)
6604 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6605 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 232, __pyx_L3_error)
6606 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6607 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 232, __pyx_L3_error)
6608 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6609 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 232, __pyx_L3_error)
6611 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[0]);
6612 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[1]);
6613 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[2]);
6614 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[3]);
6615 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[4]);
6616 __pyx_v_alphas = ((PyArrayObject *)values[5]);
6617 __pyx_v_alphaNeighbors = ((PyArrayObject *)values[6]);
6620 __pyx_L5_argtuple_error:;
6621 __Pyx_RaiseArgtupleInvalid(
"computeCockburnDGlimiterArrays2d", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 232, __pyx_L3_error)
6623 goto __pyx_L4_argument_unpacking_done;
6625 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6626 Py_XDECREF(values[__pyx_temp]);
6628 __Pyx_AddTraceback(
"ctimeIntegration.computeCockburnDGlimiterArrays2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6629 __Pyx_RefNannyFinishContext();
6631 __pyx_L4_argument_unpacking_done:;
6632 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundariesArray", 0))) __PYX_ERR(0, 232, __pyx_L1_error)
6633 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(0, 233, __pyx_L1_error)
6634 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBarycentersArray", 0))) __PYX_ERR(0, 234, __pyx_L1_error)
6635 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 235, __pyx_L1_error)
6636 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborShapeGradients", 0))) __PYX_ERR(0, 236, __pyx_L1_error)
6637 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphas), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"alphas", 0))) __PYX_ERR(0, 237, __pyx_L1_error)
6638 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphaNeighbors), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"alphaNeighbors", 0))) __PYX_ERR(0, 238, __pyx_L1_error)
6639 __pyx_r = __pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(__pyx_self, __pyx_v_elementBoundariesArray, __pyx_v_elementNeighborsArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_alphas, __pyx_v_alphaNeighbors);
6645 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6646 Py_XDECREF(values[__pyx_temp]);
6648 goto __pyx_L7_cleaned_up;
6650 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6651 Py_XDECREF(values[__pyx_temp]);
6653 __pyx_L7_cleaned_up:;
6654 __Pyx_RefNannyFinishContext();
6658static PyObject *__pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors) {
6659 PyObject *__pyx_r = NULL;
6660 __Pyx_RefNannyDeclarations
6661 __Pyx_RefNannySetupContext(
"computeCockburnDGlimiterArrays2d", 0);
6670 computeCockburnDGlimiterArrays2d((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[0]), (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]), ((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]) - 1), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_alphas)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_alphaNeighbors)));
6681 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6682 __Pyx_XGIVEREF(__pyx_r);
6683 __Pyx_RefNannyFinishContext();
6696static PyObject *__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d(PyObject *__pyx_self,
6697#
if CYTHON_VECTORCALL
6698PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6700PyObject *__pyx_args, PyObject *__pyx_kwds
6703static PyMethodDef __pyx_mdef_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d = {
"applyCockburnDGlimiterP1Lagrange2d", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6704static PyObject *__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d(PyObject *__pyx_self,
6705#
if CYTHON_VECTORCALL
6706PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6708PyObject *__pyx_args, PyObject *__pyx_kwds
6713 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6714 PyArrayObject *__pyx_v_l2g = 0;
6715 PyArrayObject *__pyx_v_tag = 0;
6716 PyArrayObject *__pyx_v_alphas = 0;
6717 PyArrayObject *__pyx_v_alphaNeighbors = 0;
6718 PyArrayObject *__pyx_v_Uin = 0;
6719 PyArrayObject *__pyx_v_Uout = 0;
6720 #if !CYTHON_VECTORCALL
6721 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6723 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6724 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
6725 int __pyx_lineno = 0;
6726 const char *__pyx_filename = NULL;
6727 int __pyx_clineno = 0;
6728 PyObject *__pyx_r = 0;
6729 __Pyx_RefNannyDeclarations
6730 __Pyx_RefNannySetupContext(
"applyCockburnDGlimiterP1Lagrange2d (wrapper)", 0);
6731 #if !CYTHON_VECTORCALL
6732 #if CYTHON_ASSUME_SAFE_SIZE
6733 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6735 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
6738 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6740 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nu,&__pyx_mstate_global->__pyx_n_u_Mh2,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_alphas,&__pyx_mstate_global->__pyx_n_u_alphaNeighbors,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
6741 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6742 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 250, __pyx_L3_error)
6743 if (__pyx_kwds_len > 0) {
6744 switch (__pyx_nargs) {
6746 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6747 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 250, __pyx_L3_error)
6750 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6751 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 250, __pyx_L3_error)
6754 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6755 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 250, __pyx_L3_error)
6758 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6759 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 250, __pyx_L3_error)
6762 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6763 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 250, __pyx_L3_error)
6766 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6767 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 250, __pyx_L3_error)
6770 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6771 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 250, __pyx_L3_error)
6774 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6775 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 250, __pyx_L3_error)
6778 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6779 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 250, __pyx_L3_error)
6782 default:
goto __pyx_L5_argtuple_error;
6784 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6785 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"applyCockburnDGlimiterP1Lagrange2d", 0) < (0)) __PYX_ERR(0, 250, __pyx_L3_error)
6786 for (Py_ssize_t i = __pyx_nargs; i < 9; i++) {
6787 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, i); __PYX_ERR(0, 250, __pyx_L3_error) }
6789 }
else if (unlikely(__pyx_nargs != 9)) {
6790 goto __pyx_L5_argtuple_error;
6792 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6793 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 250, __pyx_L3_error)
6794 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6795 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 250, __pyx_L3_error)
6796 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6797 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 250, __pyx_L3_error)
6798 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6799 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 250, __pyx_L3_error)
6800 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6801 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 250, __pyx_L3_error)
6802 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6803 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 250, __pyx_L3_error)
6804 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6805 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 250, __pyx_L3_error)
6806 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6807 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 250, __pyx_L3_error)
6808 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6809 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 250, __pyx_L3_error)
6811 __pyx_v_nu = __Pyx_PyFloat_AsDouble(values[0]);
if (unlikely((__pyx_v_nu == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L3_error)
6812 __pyx_v_Mh2 = __Pyx_PyFloat_AsDouble(values[1]);
if (unlikely((__pyx_v_Mh2 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 251, __pyx_L3_error)
6813 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[2]);
6814 __pyx_v_l2g = ((PyArrayObject *)values[3]);
6815 __pyx_v_tag = ((PyArrayObject *)values[4]);
6816 __pyx_v_alphas = ((PyArrayObject *)values[5]);
6817 __pyx_v_alphaNeighbors = ((PyArrayObject *)values[6]);
6818 __pyx_v_Uin = ((PyArrayObject *)values[7]);
6819 __pyx_v_Uout = ((PyArrayObject *)values[8]);
6822 __pyx_L5_argtuple_error:;
6823 __Pyx_RaiseArgtupleInvalid(
"applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, __pyx_nargs); __PYX_ERR(0, 250, __pyx_L3_error)
6825 goto __pyx_L4_argument_unpacking_done;
6827 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6828 Py_XDECREF(values[__pyx_temp]);
6830 __Pyx_AddTraceback(
"ctimeIntegration.applyCockburnDGlimiterP1Lagrange2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6831 __Pyx_RefNannyFinishContext();
6833 __pyx_L4_argument_unpacking_done:;
6834 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(0, 252, __pyx_L1_error)
6835 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"l2g", 0))) __PYX_ERR(0, 253, __pyx_L1_error)
6836 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"tag", 0))) __PYX_ERR(0, 254, __pyx_L1_error)
6837 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphas), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"alphas", 0))) __PYX_ERR(0, 255, __pyx_L1_error)
6838 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphaNeighbors), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"alphaNeighbors", 0))) __PYX_ERR(0, 256, __pyx_L1_error)
6839 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uin", 0))) __PYX_ERR(0, 257, __pyx_L1_error)
6840 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uout", 0))) __PYX_ERR(0, 258, __pyx_L1_error)
6841 __pyx_r = __pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(__pyx_self, __pyx_v_nu, __pyx_v_Mh2, __pyx_v_elementNeighborsArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_alphas, __pyx_v_alphaNeighbors, __pyx_v_Uin, __pyx_v_Uout);
6847 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6848 Py_XDECREF(values[__pyx_temp]);
6850 goto __pyx_L7_cleaned_up;
6852 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
6853 Py_XDECREF(values[__pyx_temp]);
6855 __pyx_L7_cleaned_up:;
6858 __Pyx_RefNannyFinishContext();
6862static PyObject *__pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self,
double __pyx_v_nu,
double __pyx_v_Mh2, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
6863 PyObject *__pyx_r = NULL;
6864 __Pyx_RefNannyDeclarations
6865 __Pyx_RefNannySetupContext(
"applyCockburnDGlimiterP1Lagrange2d", 0);
6874 applyCockburnDGlimiterP1Lagrange2d(__pyx_v_nu, __pyx_v_Mh2, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[0]), (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]), ((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]) - 1), (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_l2g)[1]), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_alphas)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_alphaNeighbors)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
6885 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6886 __Pyx_XGIVEREF(__pyx_r);
6887 __Pyx_RefNannyFinishContext();
6900static PyObject *__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d(PyObject *__pyx_self,
6901#
if CYTHON_VECTORCALL
6902PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6904PyObject *__pyx_args, PyObject *__pyx_kwds
6907static PyMethodDef __pyx_mdef_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d = {
"applyDurlofskyDGlimiterP1Lagrange2d", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6908static PyObject *__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d(PyObject *__pyx_self,
6909#
if CYTHON_VECTORCALL
6910PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6912PyObject *__pyx_args, PyObject *__pyx_kwds
6915 int __pyx_v_killExtrema;
6916 int __pyx_v_allowMinWithUndershoot;
6917 int __pyx_v_nElements_global;
6918 int __pyx_v_nElementBoundaries_element;
6919 int __pyx_v_nNodes_element;
6921 int __pyx_v_nDOF_element;
6922 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6923 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
6924 PyArrayObject *__pyx_v_elementNodesArray = 0;
6925 PyArrayObject *__pyx_v_nodeArray = 0;
6926 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
6927 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
6928 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
6929 PyArrayObject *__pyx_v_l2g = 0;
6930 PyArrayObject *__pyx_v_grad_v0 = 0;
6931 PyArrayObject *__pyx_v_elementAverages = 0;
6932 PyArrayObject *__pyx_v_tag = 0;
6933 PyArrayObject *__pyx_v_Uin = 0;
6934 PyArrayObject *__pyx_v_Uout = 0;
6935 #if !CYTHON_VECTORCALL
6936 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6938 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
6939 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
6940 int __pyx_lineno = 0;
6941 const char *__pyx_filename = NULL;
6942 int __pyx_clineno = 0;
6943 PyObject *__pyx_r = 0;
6944 __Pyx_RefNannyDeclarations
6945 __Pyx_RefNannySetupContext(
"applyDurlofskyDGlimiterP1Lagrange2d (wrapper)", 0);
6946 #if !CYTHON_VECTORCALL
6947 #if CYTHON_ASSUME_SAFE_SIZE
6948 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6950 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
6953 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6955 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_killExtrema,&__pyx_mstate_global->__pyx_n_u_allowMinWithUndershoot,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nSpace,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_grad_v0,&__pyx_mstate_global->__pyx_n_u_elementAverages,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
6956 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6957 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 273, __pyx_L3_error)
6958 if (__pyx_kwds_len > 0) {
6959 switch (__pyx_nargs) {
6961 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
6962 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 273, __pyx_L3_error)
6965 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
6966 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 273, __pyx_L3_error)
6969 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
6970 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 273, __pyx_L3_error)
6973 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
6974 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 273, __pyx_L3_error)
6977 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
6978 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 273, __pyx_L3_error)
6981 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
6982 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 273, __pyx_L3_error)
6985 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6986 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 273, __pyx_L3_error)
6989 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6990 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 273, __pyx_L3_error)
6993 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6994 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 273, __pyx_L3_error)
6997 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6998 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 273, __pyx_L3_error)
7001 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7002 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 273, __pyx_L3_error)
7005 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7006 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 273, __pyx_L3_error)
7009 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7010 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 273, __pyx_L3_error)
7013 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7014 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 273, __pyx_L3_error)
7017 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7018 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 273, __pyx_L3_error)
7021 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7022 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 273, __pyx_L3_error)
7025 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7026 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 273, __pyx_L3_error)
7029 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7030 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 273, __pyx_L3_error)
7033 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7034 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 273, __pyx_L3_error)
7037 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7038 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 273, __pyx_L3_error)
7041 default:
goto __pyx_L5_argtuple_error;
7043 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7044 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"applyDurlofskyDGlimiterP1Lagrange2d", 0) < (0)) __PYX_ERR(0, 273, __pyx_L3_error)
7045 for (Py_ssize_t i = __pyx_nargs; i < 20; i++) {
7046 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, i); __PYX_ERR(0, 273, __pyx_L3_error) }
7048 }
else if (unlikely(__pyx_nargs != 20)) {
7049 goto __pyx_L5_argtuple_error;
7051 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7052 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 273, __pyx_L3_error)
7053 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7054 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 273, __pyx_L3_error)
7055 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7056 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 273, __pyx_L3_error)
7057 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7058 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 273, __pyx_L3_error)
7059 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7060 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 273, __pyx_L3_error)
7061 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7062 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 273, __pyx_L3_error)
7063 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7064 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 273, __pyx_L3_error)
7065 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7066 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 273, __pyx_L3_error)
7067 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7068 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 273, __pyx_L3_error)
7069 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7070 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 273, __pyx_L3_error)
7071 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7072 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 273, __pyx_L3_error)
7073 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7074 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 273, __pyx_L3_error)
7075 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7076 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 273, __pyx_L3_error)
7077 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7078 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 273, __pyx_L3_error)
7079 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7080 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 273, __pyx_L3_error)
7081 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7082 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 273, __pyx_L3_error)
7083 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7084 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 273, __pyx_L3_error)
7085 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7086 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 273, __pyx_L3_error)
7087 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7088 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 273, __pyx_L3_error)
7089 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7090 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 273, __pyx_L3_error)
7092 __pyx_v_killExtrema = __Pyx_PyLong_As_int(values[0]);
if (unlikely((__pyx_v_killExtrema == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L3_error)
7093 __pyx_v_allowMinWithUndershoot = __Pyx_PyLong_As_int(values[1]);
if (unlikely((__pyx_v_allowMinWithUndershoot == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
7094 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[2]);
if (unlikely((__pyx_v_nElements_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L3_error)
7095 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[3]);
if (unlikely((__pyx_v_nElementBoundaries_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error)
7096 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[4]);
if (unlikely((__pyx_v_nNodes_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error)
7097 __pyx_v_nSpace = __Pyx_PyLong_As_int(values[5]);
if (unlikely((__pyx_v_nSpace == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 278, __pyx_L3_error)
7098 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[6]);
if (unlikely((__pyx_v_nDOF_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error)
7099 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
7100 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[8]);
7101 __pyx_v_elementNodesArray = ((PyArrayObject *)values[9]);
7102 __pyx_v_nodeArray = ((PyArrayObject *)values[10]);
7103 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[11]);
7104 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[12]);
7105 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[13]);
7106 __pyx_v_l2g = ((PyArrayObject *)values[14]);
7107 __pyx_v_grad_v0 = ((PyArrayObject *)values[15]);
7108 __pyx_v_elementAverages = ((PyArrayObject *)values[16]);
7109 __pyx_v_tag = ((PyArrayObject *)values[17]);
7110 __pyx_v_Uin = ((PyArrayObject *)values[18]);
7111 __pyx_v_Uout = ((PyArrayObject *)values[19]);
7114 __pyx_L5_argtuple_error:;
7115 __Pyx_RaiseArgtupleInvalid(
"applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, __pyx_nargs); __PYX_ERR(0, 273, __pyx_L3_error)
7117 goto __pyx_L4_argument_unpacking_done;
7119 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7120 Py_XDECREF(values[__pyx_temp]);
7122 __Pyx_AddTraceback(
"ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
7123 __Pyx_RefNannyFinishContext();
7125 __pyx_L4_argument_unpacking_done:;
7126 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(0, 280, __pyx_L1_error)
7127 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundariesArray", 0))) __PYX_ERR(0, 281, __pyx_L1_error)
7128 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNodesArray", 0))) __PYX_ERR(0, 282, __pyx_L1_error)
7129 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"nodeArray", 0))) __PYX_ERR(0, 283, __pyx_L1_error)
7130 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBarycentersArray", 0))) __PYX_ERR(0, 284, __pyx_L1_error)
7131 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 285, __pyx_L1_error)
7132 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborShapeGradients", 0))) __PYX_ERR(0, 286, __pyx_L1_error)
7133 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"l2g", 0))) __PYX_ERR(0, 287, __pyx_L1_error)
7134 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"grad_v0", 0))) __PYX_ERR(0, 288, __pyx_L1_error)
7135 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementAverages", 0))) __PYX_ERR(0, 289, __pyx_L1_error)
7136 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"tag", 0))) __PYX_ERR(0, 290, __pyx_L1_error)
7137 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uin", 0))) __PYX_ERR(0, 291, __pyx_L1_error)
7138 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uout", 0))) __PYX_ERR(0, 292, __pyx_L1_error)
7139 __pyx_r = __pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
7145 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7146 Py_XDECREF(values[__pyx_temp]);
7148 goto __pyx_L7_cleaned_up;
7150 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7151 Py_XDECREF(values[__pyx_temp]);
7153 __pyx_L7_cleaned_up:;
7161 __Pyx_RefNannyFinishContext();
7165static PyObject *__pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_killExtrema,
int __pyx_v_allowMinWithUndershoot,
int __pyx_v_nElements_global,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nNodes_element,
int __pyx_v_nSpace,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
7166 PyObject *__pyx_r = NULL;
7167 __Pyx_RefNannyDeclarations
7168 __Pyx_RefNannySetupContext(
"applyDurlofskyDGlimiterP1Lagrange2d", 0);
7177 applyDurlofskyDGlimiterP1Lagrange2d(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_v0)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementAverages)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
7188 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7189 __Pyx_XGIVEREF(__pyx_r);
7190 __Pyx_RefNannyFinishContext();
7203static PyObject *__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d(PyObject *__pyx_self,
7204#
if CYTHON_VECTORCALL
7205PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7207PyObject *__pyx_args, PyObject *__pyx_kwds
7210static PyMethodDef __pyx_mdef_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d = {
"applyDurlofskyDGlimiterP1Lagrange3d", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7211static PyObject *__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d(PyObject *__pyx_self,
7212#
if CYTHON_VECTORCALL
7213PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7215PyObject *__pyx_args, PyObject *__pyx_kwds
7218 int __pyx_v_killExtrema;
7219 int __pyx_v_allowMinWithUndershoot;
7220 int __pyx_v_nElements_global;
7221 int __pyx_v_nElementBoundaries_element;
7222 int __pyx_v_nNodes_element;
7224 int __pyx_v_nDOF_element;
7225 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
7226 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
7227 PyArrayObject *__pyx_v_elementNodesArray = 0;
7228 PyArrayObject *__pyx_v_nodeArray = 0;
7229 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
7230 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
7231 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
7232 PyArrayObject *__pyx_v_l2g = 0;
7233 PyArrayObject *__pyx_v_grad_v0 = 0;
7234 PyArrayObject *__pyx_v_elementAverages = 0;
7235 PyArrayObject *__pyx_v_tag = 0;
7236 PyArrayObject *__pyx_v_Uin = 0;
7237 PyArrayObject *__pyx_v_Uout = 0;
7238 #if !CYTHON_VECTORCALL
7239 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7241 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7242 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
7243 int __pyx_lineno = 0;
7244 const char *__pyx_filename = NULL;
7245 int __pyx_clineno = 0;
7246 PyObject *__pyx_r = 0;
7247 __Pyx_RefNannyDeclarations
7248 __Pyx_RefNannySetupContext(
"applyDurlofskyDGlimiterP1Lagrange3d (wrapper)", 0);
7249 #if !CYTHON_VECTORCALL
7250 #if CYTHON_ASSUME_SAFE_SIZE
7251 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7253 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
7256 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7258 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_killExtrema,&__pyx_mstate_global->__pyx_n_u_allowMinWithUndershoot,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nSpace,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_grad_v0,&__pyx_mstate_global->__pyx_n_u_elementAverages,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
7259 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7260 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 314, __pyx_L3_error)
7261 if (__pyx_kwds_len > 0) {
7262 switch (__pyx_nargs) {
7264 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7265 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 314, __pyx_L3_error)
7268 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7269 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 314, __pyx_L3_error)
7272 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7273 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 314, __pyx_L3_error)
7276 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7277 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 314, __pyx_L3_error)
7280 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7281 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 314, __pyx_L3_error)
7284 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7285 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 314, __pyx_L3_error)
7288 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7289 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 314, __pyx_L3_error)
7292 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7293 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 314, __pyx_L3_error)
7296 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7297 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 314, __pyx_L3_error)
7300 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7301 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 314, __pyx_L3_error)
7304 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7305 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 314, __pyx_L3_error)
7308 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7309 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 314, __pyx_L3_error)
7312 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7313 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 314, __pyx_L3_error)
7316 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7317 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 314, __pyx_L3_error)
7320 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7321 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 314, __pyx_L3_error)
7324 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7325 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 314, __pyx_L3_error)
7328 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7329 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 314, __pyx_L3_error)
7332 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7333 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 314, __pyx_L3_error)
7336 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7337 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 314, __pyx_L3_error)
7340 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7341 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 314, __pyx_L3_error)
7344 default:
goto __pyx_L5_argtuple_error;
7346 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7347 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"applyDurlofskyDGlimiterP1Lagrange3d", 0) < (0)) __PYX_ERR(0, 314, __pyx_L3_error)
7348 for (Py_ssize_t i = __pyx_nargs; i < 20; i++) {
7349 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, i); __PYX_ERR(0, 314, __pyx_L3_error) }
7351 }
else if (unlikely(__pyx_nargs != 20)) {
7352 goto __pyx_L5_argtuple_error;
7354 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7355 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 314, __pyx_L3_error)
7356 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7357 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 314, __pyx_L3_error)
7358 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7359 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 314, __pyx_L3_error)
7360 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7361 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 314, __pyx_L3_error)
7362 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7363 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 314, __pyx_L3_error)
7364 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7365 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 314, __pyx_L3_error)
7366 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7367 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 314, __pyx_L3_error)
7368 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7369 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 314, __pyx_L3_error)
7370 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7371 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 314, __pyx_L3_error)
7372 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7373 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 314, __pyx_L3_error)
7374 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7375 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 314, __pyx_L3_error)
7376 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7377 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 314, __pyx_L3_error)
7378 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7379 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 314, __pyx_L3_error)
7380 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7381 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 314, __pyx_L3_error)
7382 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7383 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 314, __pyx_L3_error)
7384 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7385 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 314, __pyx_L3_error)
7386 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7387 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 314, __pyx_L3_error)
7388 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7389 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 314, __pyx_L3_error)
7390 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7391 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 314, __pyx_L3_error)
7392 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7393 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 314, __pyx_L3_error)
7395 __pyx_v_killExtrema = __Pyx_PyLong_As_int(values[0]);
if (unlikely((__pyx_v_killExtrema == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
7396 __pyx_v_allowMinWithUndershoot = __Pyx_PyLong_As_int(values[1]);
if (unlikely((__pyx_v_allowMinWithUndershoot == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 315, __pyx_L3_error)
7397 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[2]);
if (unlikely((__pyx_v_nElements_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L3_error)
7398 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[3]);
if (unlikely((__pyx_v_nElementBoundaries_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L3_error)
7399 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[4]);
if (unlikely((__pyx_v_nNodes_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 318, __pyx_L3_error)
7400 __pyx_v_nSpace = __Pyx_PyLong_As_int(values[5]);
if (unlikely((__pyx_v_nSpace == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L3_error)
7401 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[6]);
if (unlikely((__pyx_v_nDOF_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error)
7402 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
7403 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[8]);
7404 __pyx_v_elementNodesArray = ((PyArrayObject *)values[9]);
7405 __pyx_v_nodeArray = ((PyArrayObject *)values[10]);
7406 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[11]);
7407 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[12]);
7408 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[13]);
7409 __pyx_v_l2g = ((PyArrayObject *)values[14]);
7410 __pyx_v_grad_v0 = ((PyArrayObject *)values[15]);
7411 __pyx_v_elementAverages = ((PyArrayObject *)values[16]);
7412 __pyx_v_tag = ((PyArrayObject *)values[17]);
7413 __pyx_v_Uin = ((PyArrayObject *)values[18]);
7414 __pyx_v_Uout = ((PyArrayObject *)values[19]);
7417 __pyx_L5_argtuple_error:;
7418 __Pyx_RaiseArgtupleInvalid(
"applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, __pyx_nargs); __PYX_ERR(0, 314, __pyx_L3_error)
7420 goto __pyx_L4_argument_unpacking_done;
7422 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7423 Py_XDECREF(values[__pyx_temp]);
7425 __Pyx_AddTraceback(
"ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
7426 __Pyx_RefNannyFinishContext();
7428 __pyx_L4_argument_unpacking_done:;
7429 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(0, 321, __pyx_L1_error)
7430 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundariesArray", 0))) __PYX_ERR(0, 322, __pyx_L1_error)
7431 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNodesArray", 0))) __PYX_ERR(0, 323, __pyx_L1_error)
7432 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"nodeArray", 0))) __PYX_ERR(0, 324, __pyx_L1_error)
7433 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBarycentersArray", 0))) __PYX_ERR(0, 325, __pyx_L1_error)
7434 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 326, __pyx_L1_error)
7435 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborShapeGradients", 0))) __PYX_ERR(0, 327, __pyx_L1_error)
7436 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"l2g", 0))) __PYX_ERR(0, 328, __pyx_L1_error)
7437 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"grad_v0", 0))) __PYX_ERR(0, 329, __pyx_L1_error)
7438 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementAverages", 0))) __PYX_ERR(0, 330, __pyx_L1_error)
7439 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"tag", 0))) __PYX_ERR(0, 331, __pyx_L1_error)
7440 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uin", 0))) __PYX_ERR(0, 332, __pyx_L1_error)
7441 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uout", 0))) __PYX_ERR(0, 333, __pyx_L1_error)
7442 __pyx_r = __pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
7448 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7449 Py_XDECREF(values[__pyx_temp]);
7451 goto __pyx_L7_cleaned_up;
7453 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7454 Py_XDECREF(values[__pyx_temp]);
7456 __pyx_L7_cleaned_up:;
7464 __Pyx_RefNannyFinishContext();
7468static PyObject *__pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_killExtrema,
int __pyx_v_allowMinWithUndershoot,
int __pyx_v_nElements_global,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nNodes_element,
int __pyx_v_nSpace,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
7469 PyObject *__pyx_r = NULL;
7470 __Pyx_RefNannyDeclarations
7471 __Pyx_RefNannySetupContext(
"applyDurlofskyDGlimiterP1Lagrange3d", 0);
7480 applyDurlofskyDGlimiterP1Lagrange3d(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_v0)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementAverages)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
7491 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7492 __Pyx_XGIVEREF(__pyx_r);
7493 __Pyx_RefNannyFinishContext();
7506static PyObject *__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(PyObject *__pyx_self,
7507#
if CYTHON_VECTORCALL
7508PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7510PyObject *__pyx_args, PyObject *__pyx_kwds
7513static PyMethodDef __pyx_mdef_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol = {
"applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7514static PyObject *__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(PyObject *__pyx_self,
7515#
if CYTHON_VECTORCALL
7516PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7518PyObject *__pyx_args, PyObject *__pyx_kwds
7521 int __pyx_v_killExtrema;
7522 int __pyx_v_allowMinWithUndershoot;
7523 int __pyx_v_enforcePositivity;
7524 double __pyx_v_vacuumTol;
7525 int __pyx_v_nElements_global;
7526 int __pyx_v_nElementBoundaries_element;
7527 int __pyx_v_nNodes_element;
7529 int __pyx_v_nDOF_element;
7530 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
7531 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
7532 PyArrayObject *__pyx_v_elementNodesArray = 0;
7533 PyArrayObject *__pyx_v_nodeArray = 0;
7534 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
7535 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
7536 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
7537 PyArrayObject *__pyx_v_l2g = 0;
7538 PyArrayObject *__pyx_v_grad_v0 = 0;
7539 PyArrayObject *__pyx_v_elementAverages = 0;
7540 PyArrayObject *__pyx_v_tag = 0;
7541 PyArrayObject *__pyx_v_Uin = 0;
7542 PyArrayObject *__pyx_v_Uout = 0;
7543 #if !CYTHON_VECTORCALL
7544 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7546 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7547 PyObject* values[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
7548 int __pyx_lineno = 0;
7549 const char *__pyx_filename = NULL;
7550 int __pyx_clineno = 0;
7551 PyObject *__pyx_r = 0;
7552 __Pyx_RefNannyDeclarations
7553 __Pyx_RefNannySetupContext(
"applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol (wrapper)", 0);
7554 #if !CYTHON_VECTORCALL
7555 #if CYTHON_ASSUME_SAFE_SIZE
7556 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7558 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
7561 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7563 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_killExtrema,&__pyx_mstate_global->__pyx_n_u_allowMinWithUndershoot,&__pyx_mstate_global->__pyx_n_u_enforcePositivity,&__pyx_mstate_global->__pyx_n_u_vacuumTol,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nSpace,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_grad_v0,&__pyx_mstate_global->__pyx_n_u_elementAverages,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
7564 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7565 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 355, __pyx_L3_error)
7566 if (__pyx_kwds_len > 0) {
7567 switch (__pyx_nargs) {
7569 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
7570 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 355, __pyx_L3_error)
7573 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
7574 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 355, __pyx_L3_error)
7577 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7578 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 355, __pyx_L3_error)
7581 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7582 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 355, __pyx_L3_error)
7585 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7586 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 355, __pyx_L3_error)
7589 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7590 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 355, __pyx_L3_error)
7593 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7594 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 355, __pyx_L3_error)
7597 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7598 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 355, __pyx_L3_error)
7601 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7602 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 355, __pyx_L3_error)
7605 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7606 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 355, __pyx_L3_error)
7609 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7610 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 355, __pyx_L3_error)
7613 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7614 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 355, __pyx_L3_error)
7617 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7618 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 355, __pyx_L3_error)
7621 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7622 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 355, __pyx_L3_error)
7625 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7626 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 355, __pyx_L3_error)
7629 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7630 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 355, __pyx_L3_error)
7633 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7634 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 355, __pyx_L3_error)
7637 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7638 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 355, __pyx_L3_error)
7641 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7642 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 355, __pyx_L3_error)
7645 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7646 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 355, __pyx_L3_error)
7649 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7650 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 355, __pyx_L3_error)
7653 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7654 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error)
7657 default:
goto __pyx_L5_argtuple_error;
7659 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7660 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 0) < (0)) __PYX_ERR(0, 355, __pyx_L3_error)
7661 for (Py_ssize_t i = __pyx_nargs; i < 22; i++) {
7662 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, i); __PYX_ERR(0, 355, __pyx_L3_error) }
7664 }
else if (unlikely(__pyx_nargs != 22)) {
7665 goto __pyx_L5_argtuple_error;
7667 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7668 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error)
7669 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7670 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 355, __pyx_L3_error)
7671 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7672 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 355, __pyx_L3_error)
7673 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7674 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 355, __pyx_L3_error)
7675 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7676 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 355, __pyx_L3_error)
7677 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7678 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 355, __pyx_L3_error)
7679 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7680 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 355, __pyx_L3_error)
7681 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7682 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 355, __pyx_L3_error)
7683 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7684 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 355, __pyx_L3_error)
7685 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7686 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 355, __pyx_L3_error)
7687 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7688 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 355, __pyx_L3_error)
7689 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7690 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 355, __pyx_L3_error)
7691 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7692 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 355, __pyx_L3_error)
7693 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7694 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 355, __pyx_L3_error)
7695 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7696 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 355, __pyx_L3_error)
7697 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7698 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 355, __pyx_L3_error)
7699 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7700 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 355, __pyx_L3_error)
7701 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7702 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 355, __pyx_L3_error)
7703 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7704 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 355, __pyx_L3_error)
7705 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7706 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 355, __pyx_L3_error)
7707 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
7708 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 355, __pyx_L3_error)
7709 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
7710 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 355, __pyx_L3_error)
7712 __pyx_v_killExtrema = __Pyx_PyLong_As_int(values[0]);
if (unlikely((__pyx_v_killExtrema == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error)
7713 __pyx_v_allowMinWithUndershoot = __Pyx_PyLong_As_int(values[1]);
if (unlikely((__pyx_v_allowMinWithUndershoot == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L3_error)
7714 __pyx_v_enforcePositivity = __Pyx_PyLong_As_int(values[2]);
if (unlikely((__pyx_v_enforcePositivity == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 357, __pyx_L3_error)
7715 __pyx_v_vacuumTol = __Pyx_PyFloat_AsDouble(values[3]);
if (unlikely((__pyx_v_vacuumTol == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 358, __pyx_L3_error)
7716 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[4]);
if (unlikely((__pyx_v_nElements_global == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L3_error)
7717 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[5]);
if (unlikely((__pyx_v_nElementBoundaries_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L3_error)
7718 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[6]);
if (unlikely((__pyx_v_nNodes_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L3_error)
7719 __pyx_v_nSpace = __Pyx_PyLong_As_int(values[7]);
if (unlikely((__pyx_v_nSpace == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
7720 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[8]);
if (unlikely((__pyx_v_nDOF_element == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
7721 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[9]);
7722 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[10]);
7723 __pyx_v_elementNodesArray = ((PyArrayObject *)values[11]);
7724 __pyx_v_nodeArray = ((PyArrayObject *)values[12]);
7725 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[13]);
7726 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[14]);
7727 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[15]);
7728 __pyx_v_l2g = ((PyArrayObject *)values[16]);
7729 __pyx_v_grad_v0 = ((PyArrayObject *)values[17]);
7730 __pyx_v_elementAverages = ((PyArrayObject *)values[18]);
7731 __pyx_v_tag = ((PyArrayObject *)values[19]);
7732 __pyx_v_Uin = ((PyArrayObject *)values[20]);
7733 __pyx_v_Uout = ((PyArrayObject *)values[21]);
7736 __pyx_L5_argtuple_error:;
7737 __Pyx_RaiseArgtupleInvalid(
"applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, __pyx_nargs); __PYX_ERR(0, 355, __pyx_L3_error)
7739 goto __pyx_L4_argument_unpacking_done;
7741 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7742 Py_XDECREF(values[__pyx_temp]);
7744 __Pyx_AddTraceback(
"ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", __pyx_clineno, __pyx_lineno, __pyx_filename);
7745 __Pyx_RefNannyFinishContext();
7747 __pyx_L4_argument_unpacking_done:;
7748 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborsArray", 0))) __PYX_ERR(0, 364, __pyx_L1_error)
7749 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundariesArray", 0))) __PYX_ERR(0, 365, __pyx_L1_error)
7750 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNodesArray", 0))) __PYX_ERR(0, 366, __pyx_L1_error)
7751 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"nodeArray", 0))) __PYX_ERR(0, 367, __pyx_L1_error)
7752 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBarycentersArray", 0))) __PYX_ERR(0, 368, __pyx_L1_error)
7753 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 369, __pyx_L1_error)
7754 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementNeighborShapeGradients", 0))) __PYX_ERR(0, 370, __pyx_L1_error)
7755 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"l2g", 0))) __PYX_ERR(0, 371, __pyx_L1_error)
7756 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"grad_v0", 0))) __PYX_ERR(0, 372, __pyx_L1_error)
7757 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"elementAverages", 0))) __PYX_ERR(0, 373, __pyx_L1_error)
7758 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"tag", 0))) __PYX_ERR(0, 374, __pyx_L1_error)
7759 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uin", 0))) __PYX_ERR(0, 375, __pyx_L1_error)
7760 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1,
"Uout", 0))) __PYX_ERR(0, 376, __pyx_L1_error)
7761 __pyx_r = __pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
7767 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7768 Py_XDECREF(values[__pyx_temp]);
7770 goto __pyx_L7_cleaned_up;
7772 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7773 Py_XDECREF(values[__pyx_temp]);
7775 __pyx_L7_cleaned_up:;
7785 __Pyx_RefNannyFinishContext();
7789static PyObject *__pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_v_killExtrema,
int __pyx_v_allowMinWithUndershoot,
int __pyx_v_enforcePositivity,
double __pyx_v_vacuumTol,
int __pyx_v_nElements_global,
int __pyx_v_nElementBoundaries_element,
int __pyx_v_nNodes_element,
int __pyx_v_nSpace,
int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
7790 PyObject *__pyx_r = NULL;
7791 __Pyx_RefNannyDeclarations
7792 __Pyx_RefNannySetupContext(
"applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 0);
7801 applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_v0)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementAverages)), ((
int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((
double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
7812 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7813 __Pyx_XGIVEREF(__pyx_r);
7814 __Pyx_RefNannyFinishContext();
7819static PyMethodDef __pyx_methods[] = {
7823static CYTHON_SMALL_CODE
int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate);
7824static CYTHON_SMALL_CODE
int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate);
7825static CYTHON_SMALL_CODE
int __Pyx_InitGlobals(
void);
7826static CYTHON_SMALL_CODE
int __Pyx_InitAfterSharedUtility(
void);
7827static CYTHON_SMALL_CODE
int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate);
7828static CYTHON_SMALL_CODE
int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate);
7829static CYTHON_SMALL_CODE
int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate);
7830static CYTHON_SMALL_CODE
int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate);
7831static CYTHON_SMALL_CODE
int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate);
7832static CYTHON_SMALL_CODE
int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate);
7833static CYTHON_SMALL_CODE
int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate);
7834static CYTHON_SMALL_CODE
int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate);
7837static int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate) {
7838 __Pyx_RefNannyDeclarations
7839 CYTHON_UNUSED_VAR(__pyx_mstate);
7840 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Global_init_code", 0);
7842 __Pyx_RefNannyFinishContext();
7846static int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate) {
7847 __Pyx_RefNannyDeclarations
7848 CYTHON_UNUSED_VAR(__pyx_mstate);
7849 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Variable_export_code", 0);
7851 __Pyx_RefNannyFinishContext();
7855static int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate) {
7856 __Pyx_RefNannyDeclarations
7857 CYTHON_UNUSED_VAR(__pyx_mstate);
7858 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Function_export_code", 0);
7860 __Pyx_RefNannyFinishContext();
7864static int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate) {
7865 __Pyx_RefNannyDeclarations
7866 PyObject *__pyx_t_1 = NULL;
7867 int __pyx_lineno = 0;
7868 const char *__pyx_filename = NULL;
7869 int __pyx_clineno = 0;
7870 CYTHON_UNUSED_VAR(__pyx_mstate);
7871 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Type_import_code", 0);
7873 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
7874 __Pyx_GOTREF(__pyx_t_1);
7875 __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_3_0(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME,
"type",
7876 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7877 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyTypeObject),
7878 #elif CYTHON_COMPILING_IN_LIMITED_API
7881 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyHeapTypeObject),
7883 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
7884 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7885 __pyx_t_1 = PyImport_ImportModule(
"numpy");
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
7886 __Pyx_GOTREF(__pyx_t_1);
7887 __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"dtype",
7888 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7889 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
7890 #elif CYTHON_COMPILING_IN_LIMITED_API
7891 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
7893 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
7895 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 229, __pyx_L1_error)
7896 __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"flatiter",
7897 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7898 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
7899 #elif CYTHON_COMPILING_IN_LIMITED_API
7900 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
7902 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
7904 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 286, __pyx_L1_error)
7905 __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"broadcast",
7906 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7907 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
7908 #elif CYTHON_COMPILING_IN_LIMITED_API
7909 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
7911 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
7913 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 290, __pyx_L1_error)
7914 __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"ndarray",
7915 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7916 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
7917 #elif CYTHON_COMPILING_IN_LIMITED_API
7918 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
7920 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
7922 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 329, __pyx_L1_error)
7923 __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"generic",
7924 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7925 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7926 #elif CYTHON_COMPILING_IN_LIMITED_API
7927 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7929 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7931 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(1, 847, __pyx_L1_error)
7932 __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"number",
7933 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7934 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7935 #elif CYTHON_COMPILING_IN_LIMITED_API
7936 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7938 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7940 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(1, 849, __pyx_L1_error)
7941 __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"integer",
7942 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7943 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7944 #elif CYTHON_COMPILING_IN_LIMITED_API
7945 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7947 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7949 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(1, 851, __pyx_L1_error)
7950 __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"signedinteger",
7951 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7952 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7953 #elif CYTHON_COMPILING_IN_LIMITED_API
7954 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7956 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7958 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 853, __pyx_L1_error)
7959 __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"unsignedinteger",
7960 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7961 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7962 #elif CYTHON_COMPILING_IN_LIMITED_API
7963 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7965 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7967 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 855, __pyx_L1_error)
7968 __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"inexact",
7969 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7970 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7971 #elif CYTHON_COMPILING_IN_LIMITED_API
7972 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7974 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7976 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 857, __pyx_L1_error)
7977 __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"floating",
7978 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7979 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7980 #elif CYTHON_COMPILING_IN_LIMITED_API
7981 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7983 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7985 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(1, 859, __pyx_L1_error)
7986 __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"complexfloating",
7987 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7988 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7989 #elif CYTHON_COMPILING_IN_LIMITED_API
7990 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7992 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7994 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 861, __pyx_L1_error)
7995 __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"flexible",
7996 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7997 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7998 #elif CYTHON_COMPILING_IN_LIMITED_API
7999 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8001 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8003 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 863, __pyx_L1_error)
8004 __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"character",
8005 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
8006 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8007 #elif CYTHON_COMPILING_IN_LIMITED_API
8008 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8010 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8012 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(1, 865, __pyx_L1_error)
8013 __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"ufunc",
8014 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
8015 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
8016 #elif CYTHON_COMPILING_IN_LIMITED_API
8017 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
8019 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
8021 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 946, __pyx_L1_error)
8022 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8023 __Pyx_RefNannyFinishContext();
8026 __Pyx_XDECREF(__pyx_t_1);
8027 __Pyx_RefNannyFinishContext();
8031static int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate) {
8032 __Pyx_RefNannyDeclarations
8033 CYTHON_UNUSED_VAR(__pyx_mstate);
8034 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Variable_import_code", 0);
8036 __Pyx_RefNannyFinishContext();
8040static int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate) {
8041 __Pyx_RefNannyDeclarations
8042 CYTHON_UNUSED_VAR(__pyx_mstate);
8043 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Function_import_code", 0);
8045 __Pyx_RefNannyFinishContext();
8049#if CYTHON_PEP489_MULTI_PHASE_INIT
8050static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def);
8051static int __pyx_pymod_exec_ctimeIntegration(PyObject* module);
8052static PyModuleDef_Slot __pyx_moduledef_slots[] = {
8053 {Py_mod_create, (
void*)__pyx_pymod_create},
8054 {Py_mod_exec, (
void*)__pyx_pymod_exec_ctimeIntegration},
8055 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
8056 {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
8058 #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
8059 {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
8067 struct PyModuleDef __pyx_moduledef =
8069 static struct PyModuleDef __pyx_moduledef =
8072 PyModuleDef_HEAD_INIT,
8075 #if CYTHON_USE_MODULE_STATE
8076 sizeof(__pyx_mstatetype),
8078 (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1,
8081 #if CYTHON_PEP489_MULTI_PHASE_INIT
8082 __pyx_moduledef_slots,
8086 #if CYTHON_USE_MODULE_STATE
8101#ifndef CYTHON_NO_PYINIT_EXPORT
8102 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
8105 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
8107 #define __Pyx_PyMODINIT_FUNC PyObject *
8111__Pyx_PyMODINIT_FUNC PyInit_ctimeIntegration(
void) CYTHON_SMALL_CODE;
8112__Pyx_PyMODINIT_FUNC PyInit_ctimeIntegration(
void)
8113#if CYTHON_PEP489_MULTI_PHASE_INIT
8115 return PyModuleDef_Init(&__pyx_moduledef);
8118#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
8119 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
8120static PY_INT64_T __Pyx_GetCurrentInterpreterId(
void) {
8122 PyObject *module = PyImport_ImportModule(
"_interpreters");
8124 if (!PyErr_ExceptionMatches(PyExc_Exception)) {
8128 module = PyImport_ImportModule("_xxsubinterpreters");
8129 if (!module)
goto bad;
8131 PyObject *current = PyObject_CallMethod(module,
"get_current", NULL);
8133 if (!current)
goto bad;
8134 if (PyTuple_Check(current)) {
8135 PyObject *new_current = PySequence_GetItem(current, 0);
8137 current = new_current;
8138 if (!new_current)
goto bad;
8140 long long as_c_int = PyLong_AsLongLong(current);
8145 PySys_WriteStderr(
"__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
8149#if !CYTHON_USE_MODULE_STATE
8150static CYTHON_SMALL_CODE
int __Pyx_check_single_interpreter(
void) {
8151 static PY_INT64_T main_interpreter_id = -1;
8152#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
8153 PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
8154#elif CYTHON_COMPILING_IN_GRAAL
8155 PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
8156#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
8157 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
8158 PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
8159#elif CYTHON_COMPILING_IN_LIMITED_API
8160 PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
8162 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
8164 if (unlikely(current_id == -1)) {
8167 if (main_interpreter_id == -1) {
8168 main_interpreter_id = current_id;
8170 }
else if (unlikely(main_interpreter_id != current_id)) {
8173 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
8179static CYTHON_SMALL_CODE
int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict,
const char* from_name,
const char* to_name,
int allow_none)
8181 PyObject *value = PyObject_GetAttrString(spec, from_name);
8183 if (likely(value)) {
8184 if (allow_none || value != Py_None) {
8185 result = PyDict_SetItemString(moddict, to_name, value);
8188 }
else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
8195static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
8196 PyObject *module = NULL, *moddict, *modname;
8197 CYTHON_UNUSED_VAR(def);
8198 #if !CYTHON_USE_MODULE_STATE
8199 if (__Pyx_check_single_interpreter())
8203 return __Pyx_NewRef(__pyx_m);
8204 modname = PyObject_GetAttrString(spec,
"name");
8205 if (unlikely(!modname))
goto bad;
8206 module = PyModule_NewObject(modname);
8208 if (unlikely(!module))
goto bad;
8209 moddict = PyModule_GetDict(module);
8210 if (unlikely(!moddict))
goto bad;
8211 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"loader",
"__loader__", 1) < 0))
goto bad;
8212 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"origin",
"__file__", 1) < 0))
goto bad;
8213 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"parent",
"__package__", 1) < 0))
goto bad;
8214 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"submodule_search_locations",
"__path__", 0) < 0))
goto bad;
8222static CYTHON_SMALL_CODE
int __pyx_pymod_exec_ctimeIntegration(PyObject *__pyx_pyinit_module)
8225 int stringtab_initialized = 0;
8226 #if CYTHON_USE_MODULE_STATE
8227 int pystate_addmodule_run = 0;
8229 __pyx_mstatetype *__pyx_mstate = NULL;
8230 PyObject *__pyx_t_1 = NULL;
8231 PyObject *__pyx_t_2 = NULL;
8232 int __pyx_lineno = 0;
8233 const char *__pyx_filename = NULL;
8234 int __pyx_clineno = 0;
8235 __Pyx_RefNannyDeclarations
8236 #if CYTHON_PEP489_MULTI_PHASE_INIT
8238 if (__pyx_m == __pyx_pyinit_module)
return 0;
8239 PyErr_SetString(PyExc_RuntimeError,
"Module 'ctimeIntegration' has already been imported. Re-initialisation is not supported.");
8243 if (__pyx_m)
return __Pyx_NewRef(__pyx_m);
8246 #if CYTHON_PEP489_MULTI_PHASE_INIT
8247 __pyx_t_1 = __pyx_pyinit_module;
8248 Py_INCREF(__pyx_t_1);
8250 __pyx_t_1 = PyModule_Create(&__pyx_moduledef);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
8252 #if CYTHON_USE_MODULE_STATE
8254 int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
8256 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
8257 pystate_addmodule_run = 1;
8260 __pyx_m = __pyx_t_1;
8262 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
8263 PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
8265 __pyx_mstate = __pyx_mstate_global;
8266 CYTHON_UNUSED_VAR(__pyx_t_1);
8267 __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m);
if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
8268 Py_INCREF(__pyx_mstate->__pyx_d);
8269 __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
8270 __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef(
"cython_runtime");
if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
8271 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
8274 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
8275 if (!__Pyx_RefNanny) {
8276 if (PyErr_ExceptionMatches(PyExc_Exception)) {
8278 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
8280 if (!__Pyx_RefNanny)
8281 Py_FatalError(
"failed to import 'refnanny' module");
8285__Pyx_RefNannySetupContext(
"PyInit_ctimeIntegration", 0);
8286 __Pyx_init_runtime_version();
8287 if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8288 __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0);
if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
8289 __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
8290 __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
8293 if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8294 stringtab_initialized = 1;
8295 if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8296 if (__pyx_module_is_main_ctimeIntegration) {
8297 if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8300 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
8301 if (!PyDict_GetItemString(modules,
"ctimeIntegration")) {
8302 if (unlikely((PyDict_SetItemString(modules,
"ctimeIntegration", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
8306 if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8308 if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8309 if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8311 (void)__Pyx_modinit_Global_init_code(__pyx_mstate);
8312 (void)__Pyx_modinit_Variable_export_code(__pyx_mstate);
8313 (void)__Pyx_modinit_Function_export_code(__pyx_mstate);
8315 if (unlikely((__Pyx_modinit_Type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
8316 (void)__Pyx_modinit_Variable_import_code(__pyx_mstate);
8317 (void)__Pyx_modinit_Function_import_code(__pyx_mstate);
8318 if (__Pyx_InitAfterSharedUtility() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8328 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
8329 __pyx_t_2 = __pyx_t_1;
8330 __Pyx_GOTREF(__pyx_t_2);
8331 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 3, __pyx_L1_error)
8332 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8341 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_1psiTCtteDT, 0, __pyx_mstate_global->__pyx_n_u_psiTCtteDT, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
8342 __Pyx_GOTREF(__pyx_t_2);
8343 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8344 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8346 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_psiTCtteDT, __pyx_t_2) < (0)) __PYX_ERR(0, 144, __pyx_L1_error)
8347 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8356 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_3applyDGlimitingP1Lagrange1d, 0, __pyx_mstate_global->__pyx_n_u_applyDGlimitingP1Lagrange1d, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
8357 __Pyx_GOTREF(__pyx_t_2);
8358 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8359 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8361 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDGlimitingP1Lagrange1d, __pyx_t_2) < (0)) __PYX_ERR(0, 161, __pyx_L1_error)
8362 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8371 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol, 0, __pyx_mstate_global->__pyx_n_u_applyDGlimitingP1Lagrange1d_with, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
8372 __Pyx_GOTREF(__pyx_t_2);
8373 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8374 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8376 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDGlimitingP1Lagrange1d_with, __pyx_t_2) < (0)) __PYX_ERR(0, 188, __pyx_L1_error)
8377 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8386 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_7computeElementNeighborShapeGradients, 0, __pyx_mstate_global->__pyx_n_u_computeElementNeighborShapeGradi, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
8387 __Pyx_GOTREF(__pyx_t_2);
8388 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8389 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8391 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_computeElementNeighborShapeGradi, __pyx_t_2) < (0)) __PYX_ERR(0, 218, __pyx_L1_error)
8392 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8401 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_9computeCockburnDGlimiterArrays2d, 0, __pyx_mstate_global->__pyx_n_u_computeCockburnDGlimiterArrays2d, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
8402 __Pyx_GOTREF(__pyx_t_2);
8403 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8404 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8406 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_computeCockburnDGlimiterArrays2d, __pyx_t_2) < (0)) __PYX_ERR(0, 232, __pyx_L1_error)
8407 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8416 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d, 0, __pyx_mstate_global->__pyx_n_u_applyCockburnDGlimiterP1Lagrange, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
8417 __Pyx_GOTREF(__pyx_t_2);
8418 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8419 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8421 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyCockburnDGlimiterP1Lagrange, __pyx_t_2) < (0)) __PYX_ERR(0, 250, __pyx_L1_error)
8422 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8431 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d, 0, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
8432 __Pyx_GOTREF(__pyx_t_2);
8433 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8434 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8436 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang, __pyx_t_2) < (0)) __PYX_ERR(0, 273, __pyx_L1_error)
8437 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8446 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d, 0, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_2, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error)
8447 __Pyx_GOTREF(__pyx_t_2);
8448 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8449 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8451 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_2, __pyx_t_2) < (0)) __PYX_ERR(0, 314, __pyx_L1_error)
8452 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8461 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol, 0, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_3, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
8462 __Pyx_GOTREF(__pyx_t_2);
8463 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8464 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8466 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_3, __pyx_t_2) < (0)) __PYX_ERR(0, 355, __pyx_L1_error)
8467 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8474 __pyx_t_2 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
8475 __Pyx_GOTREF(__pyx_t_2);
8476 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8477 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8483 __Pyx_XDECREF(__pyx_t_2);
8485 if (__pyx_mstate->__pyx_d && stringtab_initialized) {
8486 __Pyx_AddTraceback(
"init ctimeIntegration", __pyx_clineno, __pyx_lineno, __pyx_filename);
8488 #if !CYTHON_USE_MODULE_STATE
8492 if (pystate_addmodule_run) {
8493 PyObject *tp, *value, *tb;
8494 __Pyx_PyErr_FetchException(&tp, &value, &tb);
8495 __Pyx_State_RemoveModule(&__pyx_moduledef);
8496 __Pyx_PyErr_RestoreException(tp, value, tb);
8499 }
else if (!PyErr_Occurred()) {
8500 PyErr_SetString(PyExc_ImportError,
"init ctimeIntegration");
8503 __Pyx_RefNannyFinishContext();
8504 #if CYTHON_PEP489_MULTI_PHASE_INIT
8505 return (__pyx_m != NULL) ? 0 : -1;
8513static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
8514 CYTHON_UNUSED_VAR(__pyx_mstate);
8517 __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
8518 __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
8519 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
8520 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
8521 __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
8522 __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
8527static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
8528 __Pyx_RefNannyDeclarations
8529 CYTHON_UNUSED_VAR(__pyx_mstate);
8530 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
8531 __Pyx_RefNannyFinishContext();
8536static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
8537 int __pyx_lineno = 0;
8538 const char *__pyx_filename = NULL;
8539 int __pyx_clineno = 0;
8540 CYTHON_UNUSED_VAR(__pyx_mstate);
8542 const struct {
const unsigned int length: 8; } str_length_index[] = {{1},{179},{8},{39},{34},{28},{3},{3},{4},{20},{12},{8},{8},{10},{8},{12},{8},{13},{22},{14},{6},{34},{27},{41},{35},{49},{35},{18},{18},{32},{36},{16},{3},{5},{5},{15},{23},{22},{31},{29},{21},{17},{17},{7},{5},{11},{3},{11},{12},{26},{16},{14},{7},{6},{9},{2},{2},{5},{3},{10},{10},{3},{3},{9},{6},{2},{3},{5}};
8543 const struct {
const unsigned int length: 8; } bytes_length_index[] = {{80},{94},{48},{104},{82},{85},{126},{126},{132}};
8544 #ifndef CYTHON_COMPRESS_STRINGS
8545 #define CYTHON_COMPRESS_STRINGS 90
8547 #if (CYTHON_COMPRESS_STRINGS) == 1
8548static const char cstring[] =
"x\332\225SKo\333F\020\226\222(E\003\303\256\034 \250\033\333\241,?\024\243\225J\333u\232\246\255\253X\266a q\244\332N\321K\211\025\271\222\266&w)\356R6/m\217>\372\250#\217<\362\250\243~\002\217\374\031\375\t\235\245\036~\305\006*\214\370\355\316\314\316\314~3\273u\300\004VD\013\te\333\023-F\025\302\025\003\233\244\216\035$\260\351)\\8D\027\330\221NT\251\356T\277\331\370~CA\324P\034\374\047\326\005W\270[\327M\3049\346\nk(u\227\230\202PEx6\346Ee\277\241x\314U(\306\206\"\230b\203\337\325\003\242\205\251\302\261\220\013e\005Q\312\004\022\204Q\r\216\023\332\\Q\014\342@\022\322\301\362\364.29.\"\303\320\300\017S\327\262\275\242\2463\007\027-\027\222\"\307A\236\322@\304\034$#\226\315\034q\325\315\265\220h\335\362\260\035\210\346\362\022\344\261\360>\025\270\351$E\024m\357\354}k\355\230\320c\346\nM\253zg\360\257\000\035\332\001>\023\277\342\206\246\rK\306\032\374\032.\325%Z\210\320\004\231\341\232\211\205\"+\301\266\213\314\321Z`\01615\302ei\020\237P\214L\223\235\276\047\3647\"Z\307\324\300\016o1\210n\332-t\200I\263Ug\016Ov\034\331\266\351m3\375\244\356:\264\262g\022\213@\217\252\352;\004\265\323&^3\022\217\241\005\230\2744\251\367\231\264SH\375\021\351\256k\0351s\340\350:&k\360\023\357\2364\367\272\374\317\230\353\006\342\036\325\t+\216y\341\272\t_\rX\025\016\322q\035\351\047:\263lW\340[\024\224\345\014\3605ch\3371\261\205\251\030\261w\330B6\336s\220A@\311o\366\333\020R,\025>\266\212\007\047\313\035x\010M\314\207\333\267\310\361t@hM\222i\244f.5\220C\360\247\264\336\035\207>]\324\r\343\365\023\314\030e\240\r\346\350\270\3128\264\260C\204\007W0\264\316\267@\201\305O\210i\356\234\t\007[\310\\k\016\211\3315Q\223V>\354j\303Xt\347f\3517-\\k\232\254\016\003\233\244\035[\253\214\200\215\036\332\320\t\n\226\244\036jS7yh6\263mN\216\266\205\300\225#x\330\006n x\233\0025\005r;\243!\350 \323\305\320e\317\226b\251\377\244\377}\222\312\254\006\331hu\253\327\351\327\372(\236\314\373\233A6\310\215\026\013A9\250\3053J\244l\206(\301\357B\330\347\243\374\017\275\\\202o\373\003\374\245\237""\206x\223\251\314\262_\213\226\337\3646\373Y\260<y\321\355\3705\037\215\026\365 \035d\343\371\245h\351MOMP\306\231/D\205\255^;\301\275\376\000w\3725\300\340q\200\300\315\377#\224\325~\221z4u\216\316\333\361\344\324H\276\354>\350\346\342\211g\027z7+\001wU\251\314tk\340?\235\312\024\374v\220\216\013/\343\302O\275\217}\265_\216\047r\376\263D9\\<\010r\201\032OL\235w.j\027(.\224\242R\005\334\n\245\200\207\2711\254\205\313\275\264\334\375\325\253\311]>L`1D\220\347\253T&\347\247\375l<7\177E\026\243\305\204\2541i\376\353\240|\311\235\342?\364\3251\344\375u`\t`\303oC\304\331T\246\024\240\240\035?\237\275.\013\321\302z\250&\370*\004\363\222\377;0\364\034\210\374\261W\006\265\237\367kcX\362\017\341\236\000GA\026\202\026R\231\227\t\377\327\312\034\027\373\272\227MPV7*~n\305\367\3024@\264\362s\017%\270\333\037\240$in\321\337\366\333\322\3534\220Z\377o\230\222K%\207A\002\020\201\232d\177\274\232\214\326\374\213[2\232\203+s!\347\r\372\377y\230\275{<\006\367\003\257\317\002\251\r\246\200\221K\345Ch+\300\243\240\014\331\277Ne^\205\010\354\323O\357\220\231h\246\010\227\220X\202p\022W\241\332\351\331\356>p9=\033\315J\342%\312\022%J\302\246g\272O\273e\351\265\347Km\367\003d\275Tnw\333\022*~\372?L\217\036\365";
8549 PyObject *data = __Pyx_DecompressString(cstring, 1106, 1);
8550 #define __Pyx_DecompressString_LZSS_UNUSED
8551 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
8552 const char*
const bytes = __Pyx_PyBytes_AsString(data);
8553 #if !CYTHON_ASSUME_SAFE_MACROS
8554 if (likely(bytes));
else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
8556 #elif (CYTHON_COMPRESS_STRINGS) > 0 && (CYTHON_COMPRESS_STRINGS) <= 90
8557static const char cstring[] =
"\377?Note th\377at Cytho\377n is del\377iberatel\377y strict\373er!\001n PEP\377-484 and\377 rejects\377 subclas\377ses of b\377uiltin t\377ypes. If\377 you nee?d to p%\000%\t\377then set\376\200\000e \047anno\177tation_<\000\377ing\047 dir\366b\000iv\242\000o Fa\377lse.add_\376%\000enumpy.\377_core.mu\376r\000array f\367ailg\003impo\373rt\033\tumath\366\021\016pr\202 us/c\377timeInte\373gr\200\002.pyxM\377h2UinUou\277t__Pyx\001\000D\376\214 _NextRe\367f__\254\004e___\337_func\004\001ma{in\003\002odul\025\002\367nam\035\002qual\356\004\005tesQ\000_is\374\276\001]\000ineall\377owMinWit\377hUndersh\375o\216 lphaNe\377ighborsa\376\n\001sapplyC\377ockburnD\337Glimi\241@P1\373La\271\000nge2d\320\035\002\023\004\307 \021\0071\000\030d_\375wx\000Vacuum\367Tol>\003urlo\217fskyL\030\006\032%,3\377dasyncio\271.\327@\222#scl\233 _\376\323 traceba\377ckcomputue\362\016A\200as2d\031\004\177Element\266%\377ShapeGra\353di\022\000s\340Mdtnv\000\000m1\005\000p1e4\003\377Averages>\010\004BarycN\000\230@\374e\002\017\005oundar\227ies\003\020y\036\024\177\023e\334\244\013D\nNodZ\005nf\377orcePosi\177tivityg\322\000\367_v0\203`mski\377llExtrem\357al2g\225dFla\277gnDOF_\322\004n\362\224$B\262\006\n\rs_gl\237obalnr\002/\006P\377ointsnSp\362\207@n\216\000\355\"npnu\376\213\206\002poppsiT\377CtteDTse\377tdefault\177tagtauv\321e\337value\343@yp\375n\000\000m1\200\001\360\n\377\000\005*\250\021\320*?\377\270v\300Q\300a\330\016\177#\2406\250\021\250!\001\005\377\"\250A\250Q\330\031 \337\320 6\260a\003\0025\260\376\r\000#\320#:\270!\330\355\031\005\000B\300\002\003@\300\001\376M\000\016\000\005&\240Q\320\277&;\2706\300\021\027\000\n\377\037\230v\240Q\240a\330\376\002\004b\250\001\250\021\330\036?%\320%;\2701\003\002D\001\377\036(\320(?\270q\330v\004\001G\300\002\003E\300Q\r\000\357\250\006\250a,\000\240^\260\376\252\001\020\000\004\017\210a\210\317q\330\016\017\000\000\001\002\030\230\377\002\230!\330\014\026\220c\373\230\021\003\001e\2301\330\016\337\030\230\005\230Q\333\000\022\000\377\005(""\240q\250\001\330(\377)\330(=\270V\3001\177\300A\330\014!\240\026\020\002\376\002\004\002\250!\2501\330\014\377\017\210v\220Q\220a\330\337(/\320/D$\000(/\337\250s\260!\330\000\004(2\367\260&\270E\000/\250~\270\333Q\330\013\000#\260\002\002$\260\375a\303 \032\000\005!\240\001\237\240\021\330\035\036\000\000\000\003\330\217\035$\320$\250\"\272 \257#\240\3479\250A\257\"\267\" \240\003s\2401\330 \001\003#\2403\243 \277\031#\2404\240q\225@\034\377\000\005/\250a\250q\330\343\033\034\000\000\000\003\007\002\"\320\"\3373\2601\330\033\005\0007\260\256\034\000%\240Y\237 \033\316 <{\270A\024\000\240#\240Q\000\004\237\330\033%\240S\372\000\004\000T{\250\021\352@(\000\005)\373\"8\232\n\255\003\252\0009\270\021\260\002\326A\376\265\005\035\047\240y\260\001\330\177\035\047\320\047>\270a\003\002\363F\300\002\003\241!\035$\240C\233\240q\034\000\240w\245@*\000\177d\243`\013\007s\306`?\000t\250\347a\357(\000\006*\326b\036\037\330\200\000\000\000\003\005\004\215`\203b\215h\354a\036?(\250\t\260\021\330\206v\332\003R#\000\007\247 *\000\017\217 \036\014\006\371\003\324@?\000\004\250A\200\001\177\360,\000\0057\260a\257 \307\022\023\330\000\000\000\003\000\t\022\031\047\320\031.\352`\004\001/\366 \014\001\377*\250!\330\022\034\230I\036\320 \022\034\320\034\365!\004\001\267\204\001\374\014\001\255!\022\031\230\023\230A\222\"\001G\313@*\000O\312`\013\007C;\230q>\001D\240\001";
8558 PyObject *data = __Pyx_DecompressString_LZSS(cstring, 1444, 2036);
8559 #define __Pyx_DecompressString_UNUSED
8560 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
8561 const char*
const bytes = __Pyx_PyBytes_AsString(data);
8562 #if !CYTHON_ASSUME_SAFE_MACROS
8563 if (likely(bytes));
else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
8566static const char bytes[] =
"?Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the \047annotation_typing\047 directive to False.add_notenumpy._core.multiarray failed to importnumpy._core.umath failed to importproteus/ctimeIntegration.pyxMh2UinUout__Pyx_PyDict_NextRef__annotate____func____main____module____name____qualname____test___is_coroutineallowMinWithUndershootalphaNeighborsalphasapplyCockburnDGlimiterP1Lagrange2dapplyDGlimitingP1Lagrange1dapplyDGlimitingP1Lagrange1d_withVacuumTolapplyDurlofskyDGlimiterP1Lagrange2dapplyDurlofskyDGlimiterP1Lagrange2d_withVacuumTolapplyDurlofskyDGlimiterP1Lagrange3dasyncio.coroutinescline_in_tracebackcomputeCockburnDGlimiterArrays2dcomputeElementNeighborShapeGradientsctimeIntegrationdtndtnm1dtnp1elementAverageselementBarycentersArrayelementBoundariesArrayelementBoundaryBarycentersArrayelementNeighborShapeGradientselementNeighborsArrayelementNodesArrayenforcePositivitygrad_v0itemskillExtremal2glimiterFlagnDOF_elementnElementBoundaries_elementnElements_globalnNodes_elementnPointsnSpacenodeArraynpnunumpypoppsiTCtteDTsetdefaulttagtauvacuumTolvaluesynypnypnm1\200\001\360\n\000\005*\250\021\320*?\270v\300Q\300a\330\016#\2406\250\021\250!\330\016#\2406\250\021\250\"\250A\250Q\330\031 \320 6\260a\330\031 \320 5\260Q\330\031#\320#:\270!\330\031#\320#B\300!\330\031#\320#@\300\001\200\001\360\016\000\005&\240Q\320&;\2706\300\021\300!\330\n\037\230v\240Q\240a\330\n\037\230v\240Q\240b\250\001\250\021\330\036%\320%;\2701\330\036%\320%:\270!\330\036(\320(?\270q\330\036(\320(G\300q\330\036(\320(E\300Q\330\036(\250\006\250a\330\036%\240^\2601\200\001\360\020\000\004\017\210a\210q\330\016\017\330\016\017\330\016\017\330\016\030\230\002\230!\330\014\026\220c\230\021\330\014\026\220e\2301\330\016\030\230\005\230Q\200\001\360\022\000\005(\240q\250\001\330()\330(=\270V\3001\300A\330\014!\240\026\240q\250\001\330\014!\240\026\240q\250\002\250!\2501\330\014\017\210v\220Q\220a\330(/\320/D\300A""\330(/\250s\260!\330(/\250s\260!\330(2\260&\270\001\330(/\250~\270Q\330(2\260#\260Q\330(2\260$\260a\200\001\360\032\000\005!\240\001\240\021\330\035\036\330\035\036\330\035\036\330\035\036\330\035$\320$5\260Q\330\031 \320 5\260Q\330\031#\2409\250A\330\031#\320#:\270!\330\031 \240\003\2401\330\031 \240\003\2401\330\031#\2403\240a\330\031#\2404\240q\200\001\360\034\000\005/\250a\250q\330\033\034\330\033\034\330\033\034\330\033\034\330\033\034\330\033\"\320\"3\2601\330\033\"\320\"7\260q\330\033%\240Y\250a\330\033%\320%<\270A\330\033\"\240#\240Q\330\033\"\240#\240Q\330\033%\240S\250\001\330\033%\240T\250\021\200\001\360(\000\005)\250\001\250\021\330\035\036\330\035\036\330\035\036\330\035\036\330\035\036\330\035\036\330\035$\320$9\270\021\330\035$\320$:\270!\330\035$\320$5\260Q\330\035\047\240y\260\001\330\035\047\320\047>\270a\330\035\047\320\047F\300a\330\035\047\320\047D\300A\330\035$\240C\240q\330\035\047\240w\250a\330\035\047\240\177\260a\330\035$\240C\240q\330\035\047\240s\250!\330\035\047\240t\2501\200\001\360(\000\006*\250\021\250!\330\036\037\330\036\037\330\036\037\330\036\037\330\036\037\330\036\037\330\036%\320%:\270!\330\036%\320%;\2701\330\036%\320%6\260a\330\036(\250\t\260\021\330\036(\320(?\270q\330\036(\320(G\300q\330\036(\320(E\300Q\330\036%\240S\250\001\330\036(\250\007\250q\330\036(\250\017\260q\330\036%\240S\250\001\330\036(\250\003\2501\330\036(\250\004\250A\200\001\360,\000\0057\260a\260q\330\022\023\330\022\023\330\022\023\330\022\023\330\022\023\330\022\023\330\022\023\330\022\023\330\022\031\320\031.\250a\330\022\031\320\031/\250q\330\022\031\320\031*\250!\330\022\034\230I\240Q\330\022\034\320\0343\2601\330\022\034\320\034;\2701\330\022\034\320\0349\270\021\330\022\031\230\023\230A\330\022\034\230G\2401\330\022\034\230O\2501\330\022\031\230\023\230A\330\022\034\230C\230q\330\022\034\230D\240\001";
8567 PyObject *data = NULL;
8568 #define __Pyx_DecompressString_UNUSED
8569 #define __Pyx_DecompressString_LZSS_UNUSED
8571 PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
8573 for (
int i = 0; i < 68; i++) {
8574 Py_ssize_t bytes_length = str_length_index[i].length;
8575 PyObject *
string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
8576 if (likely(
string) && i >= 6) PyUnicode_InternInPlace(&
string);
8577 if (unlikely(!
string)) {
8579 __PYX_ERR(0, 1, __pyx_L1_error)
8581 stringtab[i] = string;
8582 pos += bytes_length;
8584 for (
int i = 68; i < 77; i++) {
8585 Py_ssize_t bytes_length = bytes_length_index[i-68].length;
8586 PyObject *
string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
8587 stringtab[i] = string;
8588 pos += bytes_length;
8589 if (unlikely(!
string)) {
8591 __PYX_ERR(0, 1, __pyx_L1_error)
8595 for (Py_ssize_t i = 0; i < 77; i++) {
8596 if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
8597 __PYX_ERR(0, 1, __pyx_L1_error)
8600 #if CYTHON_IMMORTAL_CONSTANTS
8602 PyObject **table = stringtab + 68;
8603 for (Py_ssize_t i=0; i<9; ++i) {
8604 #if PY_VERSION_HEX >= 0x030F0000
8605 PyUnstable_SetImmortal(table[i]);
8606 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
8607 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL))
break;
8608 #if PY_VERSION_HEX < 0x030E0000
8609 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
8611 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
8614 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
8617 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
8618 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
8633 unsigned int argcount : 5;
8634 unsigned int num_posonly_args : 1;
8635 unsigned int num_kwonly_args : 1;
8636 unsigned int nlocals : 5;
8637 unsigned int flags : 10;
8638 unsigned int first_line : 9;
8639} __Pyx_PyCode_New_function_description;
8644static PyObject* __Pyx_PyCode_New(
8645 const __Pyx_PyCode_New_function_description descr,
8646 PyObject *
const *varnames,
8649 PyObject *line_table,
8650 PyObject *tuple_dedup_map
8654static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
8655 PyObject* tuple_dedup_map = PyDict_New();
8656 if (unlikely(!tuple_dedup_map))
return -1;
8658 const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 8, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 144};
8659 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_nPoints, __pyx_mstate->__pyx_n_u_tau, __pyx_mstate->__pyx_n_u_dtn, __pyx_mstate->__pyx_n_u_dtnm1, __pyx_mstate->__pyx_n_u_yn, __pyx_mstate->__pyx_n_u_ypn, __pyx_mstate->__pyx_n_u_ypnm1, __pyx_mstate->__pyx_n_u_dtnp1};
8660 __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_psiTCtteDT, __pyx_mstate->__pyx_kp_b_iso88591_aq_c_e1_Q, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0]))
goto bad;
8663 const __Pyx_PyCode_New_function_description descr = {13, 0, 0, 13, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 161};
8664 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_limiterFlag, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8665 __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDGlimitingP1Lagrange1d, __pyx_mstate->__pyx_kp_b_iso88591_5Q_5Q_9A_1_1_3a_4q, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1]))
goto bad;
8668 const __Pyx_PyCode_New_function_description descr = {14, 0, 0, 14, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 188};
8669 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_enforcePositivity, __pyx_mstate->__pyx_n_u_vacuumTol, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8670 __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDGlimitingP1Lagrange1d_with, __pyx_mstate->__pyx_kp_b_iso88591_aq_31_7q_Ya_A_Q_Q_S_T, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2]))
goto bad;
8673 const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 218};
8674 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients};
8675 __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_computeElementNeighborShapeGradi, __pyx_mstate->__pyx_kp_b_iso88591_vQa_6_6_AQ_6a_5Q_B, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3]))
goto bad;
8678 const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 7, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 232};
8679 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients, __pyx_mstate->__pyx_n_u_alphas, __pyx_mstate->__pyx_n_u_alphaNeighbors};
8680 __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_computeCockburnDGlimiterArrays2d, __pyx_mstate->__pyx_kp_b_iso88591_Q_6_vQa_vQb_1_q_Gq_EQ_a_1, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4]))
goto bad;
8683 const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 9, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 250};
8684 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_nu, __pyx_mstate->__pyx_n_u_Mh2, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_alphas, __pyx_mstate->__pyx_n_u_alphaNeighbors, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8685 __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyCockburnDGlimiterP1Lagrange, __pyx_mstate->__pyx_kp_b_iso88591_q_V1A_q_q_1_vQa_DA_s_s_2_Q_2_Q, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5]))
goto bad;
8688 const __Pyx_PyCode_New_function_description descr = {20, 0, 0, 20, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 273};
8689 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_killExtrema, __pyx_mstate->__pyx_n_u_allowMinWithUndershoot, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nSpace, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_grad_v0, __pyx_mstate->__pyx_n_u_elementAverages, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8690 __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang, __pyx_mstate->__pyx_kp_b_iso88591_9_5Q_y_a_Fa_DA_Cq_wa_a_Cq_s_t1, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6]))
goto bad;
8693 const __Pyx_PyCode_New_function_description descr = {20, 0, 0, 20, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 314};
8694 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_killExtrema, __pyx_mstate->__pyx_n_u_allowMinWithUndershoot, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nSpace, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_grad_v0, __pyx_mstate->__pyx_n_u_elementAverages, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8695 __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_2, __pyx_mstate->__pyx_kp_b_iso88591_1_6a_q_Gq_EQ_S_q_q_S_1_A, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7]))
goto bad;
8698 const __Pyx_PyCode_New_function_description descr = {22, 0, 0, 22, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 355};
8699 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_killExtrema, __pyx_mstate->__pyx_n_u_allowMinWithUndershoot, __pyx_mstate->__pyx_n_u_enforcePositivity, __pyx_mstate->__pyx_n_u_vacuumTol, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nSpace, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_grad_v0, __pyx_mstate->__pyx_n_u_elementAverages, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8700 __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_3, __pyx_mstate->__pyx_kp_b_iso88591_7aq_a_q_IQ_31_1_9_A_G1_O1_A_Cq, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8]))
goto bad;
8702 Py_DECREF(tuple_dedup_map);
8705 Py_DECREF(tuple_dedup_map);
8710static int __Pyx_InitGlobals(
void) {
8711 int __pyx_lineno = 0;
8712 const char *__pyx_filename = NULL;
8713 int __pyx_clineno = 0;
8715 if (likely(__Pyx_init_co_variables() == 0 && __Pyx_init_tpflags_variables() == 0));
else
8717 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8726 #ifdef NPY_FEATURE_VERSION
8727 #ifndef NO_IMPORT_ARRAY
8728 if (unlikely(_import_array() == -1)) {
8729 PyErr_SetString(PyExc_ImportError,
"numpy.core.multiarray failed to import "
8730 "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; "
8731 "use '<void>numpy._import_array' to disable if you are certain you don't need it).");
8736 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8739 if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0));
else
8741 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8744 #if CYTHON_COMPILING_IN_LIMITED_API
8746 PyObject *typesModule=NULL;
8747 typesModule = PyImport_ImportModule(
"types");
8749 __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule,
"MethodType");
8750 Py_DECREF(typesModule);
8755 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8763static int __Pyx_InitAfterSharedUtility(
void) {
8764 int __pyx_lineno = 0;
8765 const char *__pyx_filename = NULL;
8766 int __pyx_clineno = 0;
8768 if (likely(__pyx_CyFunction_init(__pyx_m) == 0));
else
8770 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8781#pragma warning( push )
8786#pragma warning( disable : 4127 )
8796static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
8797 PyObject *m = NULL, *p = NULL;
8799 m = PyImport_ImportModule(modname);
8801 p = PyObject_GetAttrString(m,
"RefNannyAPI");
8803 r = PyLong_AsVoidPtr(p);
8807 return (__Pyx_RefNannyAPIStruct *)
r;
8812#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
8813static _PyErr_StackItem *
8814__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
8816 _PyErr_StackItem *exc_info = tstate->exc_info;
8817 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
8818 exc_info->previous_item != NULL)
8820 exc_info = exc_info->previous_item;
8827#if CYTHON_FAST_THREAD_STATE
8828static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
8829 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
8830 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
8831 PyObject *exc_value = exc_info->exc_value;
8832 if (exc_value == NULL || exc_value == Py_None) {
8839 *type = (PyObject*) Py_TYPE(exc_value);
8841 *tb = PyException_GetTraceback(exc_value);
8843 #elif CYTHON_USE_EXC_INFO_STACK
8844 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
8845 *type = exc_info->exc_type;
8846 *value = exc_info->exc_value;
8847 *tb = exc_info->exc_traceback;
8852 *type = tstate->exc_type;
8853 *value = tstate->exc_value;
8854 *tb = tstate->exc_traceback;
8860static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
8861 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
8862 _PyErr_StackItem *exc_info = tstate->exc_info;
8863 PyObject *tmp_value = exc_info->exc_value;
8864 exc_info->exc_value = value;
8865 Py_XDECREF(tmp_value);
8869 PyObject *tmp_type, *tmp_value, *tmp_tb;
8870 #if CYTHON_USE_EXC_INFO_STACK
8871 _PyErr_StackItem *exc_info = tstate->exc_info;
8872 tmp_type = exc_info->exc_type;
8873 tmp_value = exc_info->exc_value;
8874 tmp_tb = exc_info->exc_traceback;
8875 exc_info->exc_type = type;
8876 exc_info->exc_value = value;
8877 exc_info->exc_traceback = tb;
8879 tmp_type = tstate->exc_type;
8880 tmp_value = tstate->exc_value;
8881 tmp_tb = tstate->exc_traceback;
8882 tstate->exc_type = type;
8883 tstate->exc_value = value;
8884 tstate->exc_traceback = tb;
8886 Py_XDECREF(tmp_type);
8887 Py_XDECREF(tmp_value);
8894#if CYTHON_COMPILING_IN_CPYTHON
8895static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
8897 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
8901 return b == &PyBaseObject_Type;
8903static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
8905 if (a == b)
return 1;
8909 n = PyTuple_GET_SIZE(mro);
8910 for (i = 0; i <
n; i++) {
8911 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
8916 return __Pyx_InBases(a, b);
8918static CYTHON_INLINE
int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
8920 if (cls == a || cls == b)
return 1;
8924 n = PyTuple_GET_SIZE(mro);
8925 for (i = 0; i <
n; i++) {
8926 PyObject *base = PyTuple_GET_ITEM(mro, i);
8927 if (base == (PyObject *)a || base == (PyObject *)b)
8932 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
8937#if CYTHON_FAST_THREAD_STATE
8938static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
8939#if PY_VERSION_HEX >= 0x030C00A6
8940 PyObject *tmp_value;
8941 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
8943 #if CYTHON_COMPILING_IN_CPYTHON
8944 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
8946 PyException_SetTraceback(value, tb);
8948 tmp_value = tstate->current_exception;
8949 tstate->current_exception = value;
8950 Py_XDECREF(tmp_value);
8954 PyObject *tmp_type, *tmp_value, *tmp_tb;
8955 tmp_type = tstate->curexc_type;
8956 tmp_value = tstate->curexc_value;
8957 tmp_tb = tstate->curexc_traceback;
8958 tstate->curexc_type = type;
8959 tstate->curexc_value = value;
8960 tstate->curexc_traceback = tb;
8961 Py_XDECREF(tmp_type);
8962 Py_XDECREF(tmp_value);
8966static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
8967#if PY_VERSION_HEX >= 0x030C00A6
8968 PyObject* exc_value;
8969 exc_value = tstate->current_exception;
8970 tstate->current_exception = 0;
8975 *type = (PyObject*) Py_TYPE(exc_value);
8977 #if CYTHON_COMPILING_IN_CPYTHON
8978 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
8981 *tb = PyException_GetTraceback(exc_value);
8985 *type = tstate->curexc_type;
8986 *value = tstate->curexc_value;
8987 *tb = tstate->curexc_traceback;
8988 tstate->curexc_type = 0;
8989 tstate->curexc_value = 0;
8990 tstate->curexc_traceback = 0;
8996#if CYTHON_COMPILING_IN_CPYTHON
8997static CYTHON_INLINE
int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
8999 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
9001 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
9004static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
9006 assert(PyExceptionClass_Check(exc_type));
9007 n = PyTuple_GET_SIZE(tuple);
9008 for (i=0; i<
n; i++) {
9009 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
9011 for (i=0; i<
n; i++) {
9012 PyObject *t = PyTuple_GET_ITEM(tuple, i);
9013 if (likely(PyExceptionClass_Check(t))) {
9014 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t))
return 1;
9020static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
9021 if (likely(err == exc_type))
return 1;
9022 if (likely(PyExceptionClass_Check(err))) {
9023 if (likely(PyExceptionClass_Check(exc_type))) {
9024 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
9025 }
else if (likely(PyTuple_Check(exc_type))) {
9026 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
9030 return PyErr_GivenExceptionMatches(err, exc_type);
9032static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
9033 assert(PyExceptionClass_Check(exc_type1));
9034 assert(PyExceptionClass_Check(exc_type2));
9035 if (likely(err == exc_type1 || err == exc_type2))
return 1;
9036 if (likely(PyExceptionClass_Check(err))) {
9037 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
9039 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
9044#if CYTHON_FAST_THREAD_STATE
9045static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
9047 n = PyTuple_GET_SIZE(tuple);
9048 for (i=0; i<
n; i++) {
9049 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
9051 for (i=0; i<
n; i++) {
9052 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i)))
return 1;
9056static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
9059#if PY_VERSION_HEX >= 0x030C00A6
9060 PyObject *current_exception = tstate->current_exception;
9061 if (unlikely(!current_exception))
return 0;
9062 exc_type = (PyObject*) Py_TYPE(current_exception);
9063 if (exc_type == err)
return 1;
9065 exc_type = tstate->curexc_type;
9066 if (exc_type == err)
return 1;
9067 if (unlikely(!exc_type))
return 0;
9069 #if CYTHON_AVOID_BORROWED_REFS
9070 Py_INCREF(exc_type);
9072 if (unlikely(PyTuple_Check(err))) {
9073 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
9075 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
9077 #if CYTHON_AVOID_BORROWED_REFS
9078 Py_DECREF(exc_type);
9085#if CYTHON_FAST_THREAD_STATE
9086static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
9088static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
9091 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
9092#if CYTHON_FAST_THREAD_STATE
9093 PyObject *tmp_type, *tmp_value, *tmp_tb;
9094 #if PY_VERSION_HEX >= 0x030C0000
9095 local_value = tstate->current_exception;
9096 tstate->current_exception = 0;
9098 local_type = tstate->curexc_type;
9099 local_value = tstate->curexc_value;
9100 local_tb = tstate->curexc_traceback;
9101 tstate->curexc_type = 0;
9102 tstate->curexc_value = 0;
9103 tstate->curexc_traceback = 0;
9105#elif __PYX_LIMITED_VERSION_HEX >= 0x030C0000
9106 local_value = PyErr_GetRaisedException();
9108 PyErr_Fetch(&local_type, &local_value, &local_tb);
9110#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
9111 if (likely(local_value)) {
9112 local_type = (PyObject*) Py_TYPE(local_value);
9113 Py_INCREF(local_type);
9114 local_tb = PyException_GetTraceback(local_value);
9117 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
9118#if CYTHON_FAST_THREAD_STATE
9119 if (unlikely(tstate->curexc_type))
9121 if (unlikely(PyErr_Occurred()))
9125 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
9129 Py_XINCREF(local_tb);
9130 Py_XINCREF(local_type);
9131 Py_XINCREF(local_value);
9133 *value = local_value;
9135#if CYTHON_FAST_THREAD_STATE
9136 #if CYTHON_USE_EXC_INFO_STACK
9138 _PyErr_StackItem *exc_info = tstate->exc_info;
9139 #if PY_VERSION_HEX >= 0x030B00a4
9140 tmp_value = exc_info->exc_value;
9141 exc_info->exc_value = local_value;
9144 Py_XDECREF(local_type);
9145 Py_XDECREF(local_tb);
9147 tmp_type = exc_info->exc_type;
9148 tmp_value = exc_info->exc_value;
9149 tmp_tb = exc_info->exc_traceback;
9150 exc_info->exc_type = local_type;
9151 exc_info->exc_value = local_value;
9152 exc_info->exc_traceback = local_tb;
9156 tmp_type = tstate->exc_type;
9157 tmp_value = tstate->exc_value;
9158 tmp_tb = tstate->exc_traceback;
9159 tstate->exc_type = local_type;
9160 tstate->exc_value = local_value;
9161 tstate->exc_traceback = local_tb;
9163 Py_XDECREF(tmp_type);
9164 Py_XDECREF(tmp_value);
9166#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
9167 PyErr_SetHandledException(local_value);
9168 Py_XDECREF(local_value);
9169 Py_XDECREF(local_type);
9170 Py_XDECREF(local_tb);
9172 PyErr_SetExcInfo(local_type, local_value, local_tb);
9175#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
9180 Py_XDECREF(local_type);
9181 Py_XDECREF(local_value);
9182 Py_XDECREF(local_tb);
9188#if CYTHON_COMPILING_IN_CPYTHON
9189static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
9191 ternaryfunc call = Py_TYPE(func)->tp_call;
9192 if (unlikely(!call))
9193 return PyObject_Call(func, arg, kw);
9194 if (unlikely(Py_EnterRecursiveCall(
" while calling a Python object")))
9196 result = (*call)(func, arg, kw);
9197 Py_LeaveRecursiveCall();
9198 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
9201 "NULL result without error in PyObject_Call");
9208#if CYTHON_COMPILING_IN_CPYTHON
9209static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
9210 PyObject *self, *result;
9212 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
9213 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
9214 if (unlikely(Py_EnterRecursiveCall(
" while calling a Python object")))
9216 result = cfunc(self, arg);
9217 Py_LeaveRecursiveCall();
9218 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
9221 "NULL result without error in PyObject_Call");
9228#if CYTHON_COMPILING_IN_LIMITED_API
9229static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject *
const*args,
size_t nargs, PyObject *kwargs) {
9230 PyObject *argstuple;
9231 PyObject *result = 0;
9233 argstuple = PyTuple_New((Py_ssize_t)nargs);
9234 if (unlikely(!argstuple))
return NULL;
9235 for (i = 0; i < nargs; i++) {
9237 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0))
goto bad;
9239 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
9241 Py_DECREF(argstuple);
9245#if CYTHON_VECTORCALL && !(CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY)
9246 #if CYTHON_COMPILING_IN_CPYTHON
9247static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
9248 PyTypeObject *tp = Py_TYPE(callable);
9249 #if defined(__Pyx_CyFunction_USED)
9250 if (__Pyx_CyFunction_CheckExact(callable)) {
9251 return __Pyx_CyFunction_func_vectorcall(callable);
9254 if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
9257 assert(PyCallable_Check(callable));
9258 Py_ssize_t offset = tp->tp_vectorcall_offset;
9261 memcpy(&ptr, (
char *) callable + offset,
sizeof(ptr));
9265 #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
9268static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwargs) {
9269 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(nargsf);
9270#if CYTHON_COMPILING_IN_CPYTHON
9271 if (nargs == 0 && kwargs == NULL) {
9272 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
9273 return __Pyx_PyObject_CallMethO(func, NULL);
9275 else if (nargs == 1 && kwargs == NULL) {
9276 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
9277 return __Pyx_PyObject_CallMethO(func, args[0]);
9280 if (kwargs == NULL) {
9281 #if CYTHON_VECTORCALL
9282 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
9283 return PyObject_Vectorcall(func, args, nargsf, NULL);
9285 vectorcallfunc
f = __Pyx_PyVectorcall_Function(func);
9287 return f(func, args, nargsf, NULL);
9293 return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
9295 #if CYTHON_COMPILING_IN_LIMITED_API
9296 return __Pyx_PyObject_FastCall_fallback(func, args, (
size_t)nargs, kwargs);
9297 #elif CYTHON_COMPILING_IN_PYPY
9298 return PyObject_VectorcallDict(func, args, (
size_t) nargs, kwargs);
9300 return PyObject_VectorcallDict(func, args, nargsf, kwargs);
9305static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
9306 PyObject* owned_instance = NULL;
9307 if (tb == Py_None) {
9309 }
else if (tb && !PyTraceBack_Check(tb)) {
9310 PyErr_SetString(PyExc_TypeError,
9311 "raise: arg 3 must be a traceback or None");
9314 if (value == Py_None)
9316 if (PyExceptionInstance_Check(type)) {
9318 PyErr_SetString(PyExc_TypeError,
9319 "instance exception may not have a separate value");
9323 type = (PyObject*) Py_TYPE(value);
9324 }
else if (PyExceptionClass_Check(type)) {
9325 PyObject *instance_class = NULL;
9326 if (value && PyExceptionInstance_Check(value)) {
9327 instance_class = (PyObject*) Py_TYPE(value);
9328 if (instance_class != type) {
9329 int is_subclass = PyObject_IsSubclass(instance_class, type);
9331 instance_class = NULL;
9332 }
else if (unlikely(is_subclass == -1)) {
9335 type = instance_class;
9339 if (!instance_class) {
9342 args = PyTuple_New(0);
9343 else if (PyTuple_Check(value)) {
9347 args = PyTuple_Pack(1, value);
9350 owned_instance = PyObject_Call(type, args, NULL);
9352 if (!owned_instance)
9354 value = owned_instance;
9355 if (!PyExceptionInstance_Check(value)) {
9356 PyErr_Format(PyExc_TypeError,
9357 "calling %R should have returned an instance of "
9358 "BaseException, not %R",
9359 type, Py_TYPE(value));
9364 PyErr_SetString(PyExc_TypeError,
9365 "raise: exception class must be a subclass of BaseException");
9369 PyObject *fixed_cause;
9370 if (cause == Py_None) {
9372 }
else if (PyExceptionClass_Check(cause)) {
9373 fixed_cause = PyObject_CallObject(cause, NULL);
9374 if (fixed_cause == NULL)
9376 }
else if (PyExceptionInstance_Check(cause)) {
9377 fixed_cause = cause;
9378 Py_INCREF(fixed_cause);
9380 PyErr_SetString(PyExc_TypeError,
9381 "exception causes must derive from "
9385 PyException_SetCause(value, fixed_cause);
9387 PyErr_SetObject(type, value);
9389#if PY_VERSION_HEX >= 0x030C00A6
9390 PyException_SetTraceback(value, tb);
9391#elif CYTHON_FAST_THREAD_STATE
9392 PyThreadState *tstate = __Pyx_PyThreadState_Current;
9393 PyObject* tmp_tb = tstate->curexc_traceback;
9396 tstate->curexc_traceback = tb;
9400 PyObject *tmp_type, *tmp_value, *tmp_tb;
9401 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
9403 PyErr_Restore(tmp_type, tmp_value, tb);
9408 Py_XDECREF(owned_instance);
9413#if CYTHON_COMPILING_IN_CPYTHON
9414static CYTHON_INLINE
void __Pyx_copy_object_array(PyObject *
const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
9417 for (i = 0; i < length; i++) {
9418 v = dest[i] = src[i];
9425#if !(PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API)
9426CYTHON_UNUSED
static PyObject *
9427__Pyx_PyTuple_FromArray(PyObject *
const *src, Py_ssize_t
n) {
9429 return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
9431 PyObject *res = PyTuple_New(
n);
9432 if (unlikely(res == NULL))
return NULL;
9433 #if CYTHON_COMPILING_IN_CPYTHON
9434 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item,
n);
9437 for (i = 0; i <
n; i++) {
9439 if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
9450#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
9451#define __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
9452static CYTHON_INLINE
int __Pyx_PyObject_CompareStrStrBoolEq(PyObject* s1, PyObject* s2) {
9453 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
9454 int result = PyUnicode_Equal(s1, s2);
9455 #if !CYTHON_COMPILING_IN_CPYTHON
9456 if (unlikely(result == -1))
return -1;
9458 if (result == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
9460 int result = PyUnicode_Compare(s1, s2);
9461 if (unlikely((result == -1) && PyErr_Occurred()))
return -1;
9462 if (result == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
9470static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2,
int pyop) {
9471 CYTHON_UNUSED_VAR(pyop);
9472 if (unlikely(op1 == Py_None)) {
9473 if (op2 == Py_None)
goto __pyx_return_true;
else goto __pyx_return_false;
9475 if (unlikely(op2 == Py_None)) {
9476 if (op1 == Py_None)
goto __pyx_return_true;
else goto __pyx_return_false;
9479 if (likely(op1 != Py_None)) {
9480 if (op1 == op2)
goto __pyx_return_true;
9481 if (likely(op2 != Py_None)) {
9482 return __Pyx_PyObject_CompareStrStrBoolEq(op1, op2);
9487 if ((0))
goto __pyx_richcmp;
9488 if ((0))
goto __pyx_return_true;
9489 if ((0))
goto __pyx_return_false;
9491 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
9499#if CYTHON_VECTORCALL
9500static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues, PyObject *
s)
9502 Py_ssize_t i,
n = __Pyx_PyTuple_GET_SIZE(kwnames);
9503 #if !CYTHON_ASSUME_SAFE_SIZE
9504 if (unlikely(
n == -1))
return NULL;
9506 for (i = 0; i <
n; i++)
9508 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
9509 #if !CYTHON_ASSUME_SAFE_MACROS
9510 if (unlikely(!namei))
return NULL;
9512 if (
s == namei)
return kwvalues[i];
9514 for (i = 0; i <
n; i++)
9516 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
9517 #if !CYTHON_ASSUME_SAFE_MACROS
9518 if (unlikely(!namei))
return NULL;
9520 int eq = __Pyx_PyUnicode_Equals(
s, namei);
9521 if (unlikely(eq != 0)) {
9522 if (unlikely(eq < 0))
return NULL;
9528#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
9529CYTHON_UNUSED
static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues) {
9530 Py_ssize_t i, nkwargs;
9532#if !CYTHON_ASSUME_SAFE_SIZE
9533 nkwargs = PyTuple_Size(kwnames);
9534 if (unlikely(nkwargs < 0))
return NULL;
9536 nkwargs = PyTuple_GET_SIZE(kwnames);
9538 dict = PyDict_New();
9539 if (unlikely(!dict))
9541 for (i=0; i<nkwargs; i++) {
9542#if !CYTHON_ASSUME_SAFE_MACROS
9543 PyObject *key = PyTuple_GetItem(kwnames, i);
9546 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
9548 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
9560static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
9561 PyObject *args[2] = {NULL, arg};
9562 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
9566static CYTHON_INLINE
int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception) {
9567 if (PyErr_GivenExceptionMatches(given_exception ? given_exception : PyErr_Occurred(), ignorable_exception)) {
9575#if CYTHON_USE_TYPE_SLOTS
9576static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
9577 PyTypeObject* tp = Py_TYPE(obj);
9578 if (likely(tp->tp_getattro))
9579 return tp->tp_getattro(obj, attr_name);
9580 return PyObject_GetAttr(obj, attr_name);
9585#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
9586static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
9588 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
9589 if (unlikely(!selfless_args))
return NULL;
9590 result = PyObject_Call(method, selfless_args, kwargs);
9591 Py_DECREF(selfless_args);
9595static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames) {
9596 return PyObject_Vectorcall(method, args ? args+1 : NULL, nargs ? (
size_t) nargs-1 : 0, kwnames);
9599static PyMethodDef __Pyx_UnboundCMethod_Def = {
9600 "CythonUnboundCMethod",
9601 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
9602#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
9603 METH_VARARGS | METH_KEYWORDS,
9605 METH_FASTCALL | METH_KEYWORDS,
9609static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
9610 PyObject *method, *result=NULL;
9611 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
9612 if (unlikely(!method))
9615#if CYTHON_COMPILING_IN_CPYTHON
9616 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
9618 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
9619 target->func = descr->d_method->ml_meth;
9620 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
9623#if CYTHON_COMPILING_IN_PYPY
9625 if (PyCFunction_Check(method))
9630#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
9631 self = PyObject_GetAttrString(method,
"__self__");
9632 if (!self && !__Pyx_IgnoreException(PyExc_AttributeError)) {
9636 self = PyCFunction_GET_SELF(method);
9638 self_found = (self && self != Py_None);
9639#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
9643 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
9644 if (unlikely(!unbound_method))
return -1;
9646 result = unbound_method;
9649#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
9650 if (unlikely(target->method)) {
9654 target->method = result;
9659#if CYTHON_COMPILING_IN_CPYTHON
9660static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
9661 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
9662 if (likely(was_initialized == 2 && cfunc->func)) {
9663 if (likely(cfunc->flag == METH_NOARGS))
9664 return __Pyx_CallCFunction(cfunc, self, NULL);
9665 if (likely(cfunc->flag == METH_FASTCALL))
9666 return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
9667 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
9668 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
9669 if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
9670 return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
9671 if (cfunc->flag == METH_VARARGS)
9672 return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
9673 return __Pyx__CallUnboundCMethod0(cfunc, self);
9675#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
9676 else if (unlikely(was_initialized == 1)) {
9677 __Pyx_CachedCFunction tmp_cfunc = {
9682 tmp_cfunc.type = cfunc->type;
9683 tmp_cfunc.method_name = cfunc->method_name;
9684 return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
9687 PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
9688 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
9692static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
9694 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0))
return NULL;
9695 result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
9700static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
9701 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
9705static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
9706 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
9710#if CYTHON_AVOID_BORROWED_REFS
9711static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
9712 PyObject *next = NULL;
9715 PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
9716 if (unlikely(!dictview))
goto bad;
9717 *ppos = PyObject_GetIter(dictview);
9718 Py_DECREF(dictview);
9720 *ppos = PyObject_GetIter(p);
9722 if (unlikely(!*ppos))
goto bad;
9724 next = PyIter_Next(*ppos);
9726 if (PyErr_Occurred())
goto bad;
9729 if (pkey && pvalue) {
9730 *pkey = __Pyx_PySequence_ITEM(next, 0);
9731 if (unlikely(*pkey))
goto bad;
9732 *pvalue = __Pyx_PySequence_ITEM(next, 1);
9733 if (unlikely(*pvalue))
goto bad;
9744#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
9745 PyErr_FormatUnraisable(
"Exception ignored in __Pyx_PyDict_NextRef");
9747 PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
9749 if (pkey) *pkey = NULL;
9750 if (pvalue) *pvalue = NULL;
9754static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
9755 int result = PyDict_Next(p, ppos, pkey, pvalue);
9756 if (likely(result == 1)) {
9757 if (pkey) Py_INCREF(*pkey);
9758 if (pvalue) Py_INCREF(*pvalue);
9765static void __Pyx_RaiseDoubleKeywordsError(
9766 const char* func_name,
9769 PyErr_Format(PyExc_TypeError,
9770 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
9774#if CYTHON_COMPILING_IN_CPYTHON
9775static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
9776 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
9777 if (likely(was_initialized == 2 && cfunc->func)) {
9778 PyObject *args[2] = {arg1, arg2};
9779 if (cfunc->flag == METH_FASTCALL) {
9780 return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
9782 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
9783 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
9785#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
9786 else if (unlikely(was_initialized == 1)) {
9787 __Pyx_CachedCFunction tmp_cfunc = {
9792 tmp_cfunc.type = cfunc->type;
9793 tmp_cfunc.method_name = cfunc->method_name;
9794 return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
9797 PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
9798 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
9802static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
9803 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0))
return NULL;
9804#if CYTHON_COMPILING_IN_CPYTHON
9805 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
9806 PyObject *result = NULL;
9807 PyObject *args = PyTuple_New(2);
9808 if (unlikely(!args))
return NULL;
9810 PyTuple_SET_ITEM(args, 0, arg1);
9812 PyTuple_SET_ITEM(args, 1, arg2);
9813 if (cfunc->flag & METH_KEYWORDS)
9814 result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
9816 result = __Pyx_CallCFunction(cfunc, self, args);
9822 PyObject *args[4] = {NULL, self, arg1, arg2};
9823 return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
9828static int __Pyx_ValidateDuplicatePosArgs(
9830 PyObject **
const argnames[],
9831 PyObject **
const *first_kw_arg,
9832 const char* function_name)
9834 PyObject **
const *name = argnames;
9835 while (name != first_kw_arg) {
9836 PyObject *key = **name;
9837 int found = PyDict_Contains(kwds, key);
9838 if (unlikely(found)) {
9839 if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
9848#if CYTHON_USE_UNICODE_INTERNALS
9849static CYTHON_INLINE
int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
9851 Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
9852 if (len != PyUnicode_GET_LENGTH(s2))
return 0;
9853 kind = PyUnicode_KIND(s1);
9854 if (kind != PyUnicode_KIND(s2))
return 0;
9855 const void *data1 = PyUnicode_DATA(s1);
9856 const void *data2 = PyUnicode_DATA(s2);
9857 return (memcmp(data1, data2, (
size_t) len * (
size_t) kind) == 0);
9860static int __Pyx_MatchKeywordArg_str(
9862 PyObject **
const argnames[],
9863 PyObject **
const *first_kw_arg,
9864 size_t *index_found,
9865 const char *function_name)
9867 PyObject **
const *name;
9868 #if CYTHON_USE_UNICODE_INTERNALS
9869 Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
9870 if (unlikely(key_hash == -1)) {
9871 key_hash = PyObject_Hash(key);
9872 if (unlikely(key_hash == -1))
9876 name = first_kw_arg;
9878 PyObject *name_str = **name;
9879 #if CYTHON_USE_UNICODE_INTERNALS
9880 if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
9881 *index_found = (size_t) (name - argnames);
9885 #if CYTHON_ASSUME_SAFE_SIZE
9886 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
9889 int cmp = PyUnicode_Compare(name_str, key);
9890 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
9892 *index_found = (size_t) (name - argnames);
9900 while (name != first_kw_arg) {
9901 PyObject *name_str = **name;
9902 #if CYTHON_USE_UNICODE_INTERNALS
9903 if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
9904 if (__Pyx_UnicodeKeywordsEqual(name_str, key))
9905 goto arg_passed_twice;
9908 #if CYTHON_ASSUME_SAFE_SIZE
9909 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
9912 if (unlikely(name_str == key))
goto arg_passed_twice;
9913 int cmp = PyUnicode_Compare(name_str, key);
9914 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
9915 if (cmp == 0)
goto arg_passed_twice;
9922 __Pyx_RaiseDoubleKeywordsError(function_name, key);
9927static int __Pyx_MatchKeywordArg_nostr(
9929 PyObject **
const argnames[],
9930 PyObject **
const *first_kw_arg,
9931 size_t *index_found,
9932 const char *function_name)
9934 PyObject **
const *name;
9935 if (unlikely(!PyUnicode_Check(key)))
goto invalid_keyword_type;
9936 name = first_kw_arg;
9938 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
9940 *index_found = (size_t) (name - argnames);
9943 if (unlikely(cmp == -1))
goto bad;
9947 while (name != first_kw_arg) {
9948 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
9949 if (unlikely(cmp != 0)) {
9950 if (cmp == 1)
goto arg_passed_twice;
9957 __Pyx_RaiseDoubleKeywordsError(function_name, key);
9959invalid_keyword_type:
9960 PyErr_Format(PyExc_TypeError,
9961 "%.200s() keywords must be strings", function_name);
9966static CYTHON_INLINE
int __Pyx_MatchKeywordArg(
9968 PyObject **
const argnames[],
9969 PyObject **
const *first_kw_arg,
9970 size_t *index_found,
9971 const char *function_name)
9973 return likely(PyUnicode_CheckExact(key)) ?
9974 __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
9975 __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
9977static void __Pyx_RejectUnknownKeyword(
9979 PyObject **
const argnames[],
9980 PyObject **
const *first_kw_arg,
9981 const char *function_name)
9983 #if CYTHON_AVOID_BORROWED_REFS
9984 PyObject *pos = NULL;
9988 PyObject *key = NULL;
9989 __Pyx_BEGIN_CRITICAL_SECTION(kwds);
9990 #if CYTHON_AVOID_BORROWED_REFS
9991 while (__Pyx_PyDict_NextRef(kwds, &pos, &key, NULL))
9993 (void) __Pyx_PyDict_NextRef;
9994 while (PyDict_Next(kwds, &pos, &key, NULL))
9997 PyObject**
const *name = first_kw_arg;
9998 while (*name && (**name != key)) name++;
10000 size_t index_found = 0;
10001 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
10004 PyErr_Format(PyExc_TypeError,
10005 "%s() got an unexpected keyword argument '%U'",
10006 function_name, key);
10008 #if CYTHON_AVOID_BORROWED_REFS
10014 #if CYTHON_AVOID_BORROWED_REFS
10018 __Pyx_END_CRITICAL_SECTION();
10019 #if CYTHON_AVOID_BORROWED_REFS
10022 assert(PyErr_Occurred());
10024static int __Pyx_ParseKeywordDict(
10026 PyObject **
const argnames[],
10027 PyObject *values[],
10028 Py_ssize_t num_pos_args,
10029 Py_ssize_t num_kwargs,
10030 const char* function_name,
10031 int ignore_unknown_kwargs)
10033 PyObject**
const *name;
10034 PyObject**
const *first_kw_arg = argnames + num_pos_args;
10035 Py_ssize_t extracted = 0;
10036#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
10037 if (unlikely(!PyArg_ValidateKeywordArguments(kwds)))
return -1;
10039 name = first_kw_arg;
10040 while (*name && num_kwargs > extracted) {
10041 PyObject * key = **name;
10044 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
10045 found = PyDict_GetItemRef(kwds, key, &value);
10047 value = PyDict_GetItemWithError(kwds, key);
10052 if (unlikely(PyErr_Occurred()))
goto bad;
10056 if (unlikely(found < 0))
goto bad;
10057 values[name-argnames] = value;
10062 if (num_kwargs > extracted) {
10063 if (ignore_unknown_kwargs) {
10064 if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
10067 __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
10075static int __Pyx_ParseKeywordDictToDict(
10077 PyObject **
const argnames[],
10079 PyObject *values[],
10080 Py_ssize_t num_pos_args,
10081 const char* function_name)
10083 PyObject**
const *name;
10084 PyObject**
const *first_kw_arg = argnames + num_pos_args;
10086#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
10087 if (unlikely(!PyArg_ValidateKeywordArguments(kwds)))
return -1;
10089 if (PyDict_Update(kwds2, kwds) < 0)
goto bad;
10090 name = first_kw_arg;
10092 PyObject *key = **name;
10094#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
10095 int found = PyDict_Pop(kwds2, key, &value);
10097 if (unlikely(found < 0))
goto bad;
10098 values[name-argnames] = value;
10100#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
10101 int found = PyDict_GetItemRef(kwds2, key, &value);
10103 if (unlikely(found < 0))
goto bad;
10104 values[name-argnames] = value;
10105 if (unlikely(PyDict_DelItem(kwds2, key) < 0))
goto bad;
10108 #if CYTHON_COMPILING_IN_CPYTHON
10109 value = _PyDict_Pop(kwds2, key, kwds2);
10111 value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
10113 if (value == kwds2) {
10116 if (unlikely(!value))
goto bad;
10117 values[name-argnames] = value;
10122 len = PyDict_Size(kwds2);
10124 return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
10125 }
else if (unlikely(len == -1)) {
10132static int __Pyx_ParseKeywordsTuple(
10134 PyObject *
const *kwvalues,
10135 PyObject **
const argnames[],
10137 PyObject *values[],
10138 Py_ssize_t num_pos_args,
10139 Py_ssize_t num_kwargs,
10140 const char* function_name,
10141 int ignore_unknown_kwargs)
10143 PyObject *key = NULL;
10144 PyObject**
const * name;
10145 PyObject**
const *first_kw_arg = argnames + num_pos_args;
10146 for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
10147#if CYTHON_AVOID_BORROWED_REFS
10148 key = __Pyx_PySequence_ITEM(kwds, pos);
10150 key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
10152#if !CYTHON_ASSUME_SAFE_MACROS
10153 if (unlikely(!key))
goto bad;
10155 name = first_kw_arg;
10156 while (*name && (**name != key)) name++;
10158 PyObject *value = kwvalues[pos];
10159 values[name-argnames] = __Pyx_NewRef(value);
10161 size_t index_found = 0;
10162 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
10164 PyObject *value = kwvalues[pos];
10165 values[index_found] = __Pyx_NewRef(value);
10167 if (unlikely(cmp == -1))
goto bad;
10169 PyObject *value = kwvalues[pos];
10170 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
10171 }
else if (!ignore_unknown_kwargs) {
10172 goto invalid_keyword;
10176 #if CYTHON_AVOID_BORROWED_REFS
10183 PyErr_Format(PyExc_TypeError,
10184 "%s() got an unexpected keyword argument '%U'",
10185 function_name, key);
10188 #if CYTHON_AVOID_BORROWED_REFS
10195static int __Pyx_ParseKeywords(
10197 PyObject *
const *kwvalues,
10198 PyObject **
const argnames[],
10200 PyObject *values[],
10201 Py_ssize_t num_pos_args,
10202 Py_ssize_t num_kwargs,
10203 const char* function_name,
10204 int ignore_unknown_kwargs)
10206 if (CYTHON_VECTORCALL && likely(PyTuple_Check(kwds)))
10207 return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
10209 return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
10211 return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
10215static void __Pyx_RaiseArgtupleInvalid(
10216 const char* func_name,
10218 Py_ssize_t num_min,
10219 Py_ssize_t num_max,
10220 Py_ssize_t num_found)
10222 Py_ssize_t num_expected;
10223 const char *more_or_less;
10224 if (num_found < num_min) {
10225 num_expected = num_min;
10226 more_or_less =
"at least";
10228 num_expected = num_max;
10229 more_or_less =
"at most";
10232 more_or_less =
"exactly";
10234 PyErr_Format(PyExc_TypeError,
10235 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
10236 func_name, more_or_less, num_expected,
10237 (num_expected == 1) ?
"" :
"s", num_found);
10241static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type,
const char *name,
int exact)
10243 __Pyx_TypeName type_name;
10244 __Pyx_TypeName obj_type_name;
10245 PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
10246 int from_annotation_subclass = 0;
10247 if (unlikely(!type)) {
10248 PyErr_SetString(PyExc_SystemError,
"Missing type object");
10250 }
else if (exact == 2) {
10251 if (__Pyx_TypeCheck(obj, type)) {
10252 from_annotation_subclass = 1;
10253 extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
10256 type_name = __Pyx_PyType_GetFullyQualifiedName(type);
10257 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
10258 if (unlikely(!type_name))
return;
10260 obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
10261 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
10262 if (unlikely(!obj_type_name))
goto obj_type_name_failed;
10264 PyErr_Format(PyExc_TypeError,
10265 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
", got " __Pyx_FMT_TYPENAME
")"
10266#
if __PYX_LIMITED_VERSION_HEX < 0x030C0000
10269 , name, type_name, obj_type_name
10270#
if __PYX_LIMITED_VERSION_HEX < 0x030C0000
10271 , (from_annotation_subclass ?
". " :
""), extra_info
10274#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
10275 if (exact == 2 && from_annotation_subclass) {
10277 PyObject *vargs[2];
10278 vargs[0] = PyErr_GetRaisedException();
10279 vargs[1] = extra_info;
10280 res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
10282 PyErr_SetRaisedException(vargs[0]);
10285 __Pyx_DECREF_TypeName(obj_type_name);
10286#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
10287obj_type_name_failed:
10289 __Pyx_DECREF_TypeName(type_name);
10294static CYTHON_INLINE
int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type,
int none_allowed,
const char *name,
int exact) {
10295 if (likely(Py_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None))))
10297 if (!exact && likely(type) && likely(__Pyx_TypeCheck(obj, type)))
10299 __Pyx_ArgTypeError(obj, type, name, exact);
10304#ifndef __PYX_HAVE_RT_ImportType_3_3_0
10305#define __PYX_HAVE_RT_ImportType_3_3_0
10306static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject *module,
const char *module_name,
const char *class_name,
10307 size_t size,
size_t alignment,
enum __Pyx_ImportType_CheckSize_3_3_0 check_size)
10309 PyObject *result = 0;
10310 Py_ssize_t basicsize;
10311 Py_ssize_t itemsize;
10312#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
10313 PyObject *py_basicsize;
10314 PyObject *py_itemsize;
10316 result = PyObject_GetAttrString(module, class_name);
10319 if (!PyType_Check(result)) {
10320 PyErr_Format(PyExc_TypeError,
10321 "%.200s.%.200s is not a type object",
10322 module_name, class_name);
10325#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
10326 basicsize = ((PyTypeObject *)result)->tp_basicsize;
10327 itemsize = ((PyTypeObject *)result)->tp_itemsize;
10330 return (PyTypeObject *)result;
10332 py_basicsize = PyObject_GetAttrString(result,
"__basicsize__");
10335 basicsize = PyLong_AsSsize_t(py_basicsize);
10336 Py_DECREF(py_basicsize);
10338 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
10340 py_itemsize = PyObject_GetAttrString(result,
"__itemsize__");
10343 itemsize = PyLong_AsSsize_t(py_itemsize);
10344 Py_DECREF(py_itemsize);
10346 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
10350 if (size % alignment) {
10351 alignment = size % alignment;
10353 if (itemsize < (Py_ssize_t)alignment)
10354 itemsize = (Py_ssize_t)alignment;
10356 if ((
size_t)(basicsize + itemsize) < size) {
10357 PyErr_Format(PyExc_ValueError,
10358 "%.200s.%.200s size changed, may indicate binary incompatibility. "
10359 "Expected %zd from C header, got %zd from PyObject",
10360 module_name, class_name, size, basicsize+itemsize);
10363 if (check_size == __Pyx_ImportType_CheckSize_Error_3_3_0 &&
10364 ((
size_t)basicsize > size || (
size_t)(basicsize + itemsize) < size)) {
10365 PyErr_Format(PyExc_ValueError,
10366 "%.200s.%.200s size changed, may indicate binary incompatibility. "
10367 "Expected %zd from C header, got %zd-%zd from PyObject",
10368 module_name, class_name, size, basicsize, basicsize+itemsize);
10371 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_3_0 && (
size_t)basicsize > size) {
10372 if (PyErr_WarnFormat(NULL, 0,
10373 "%.200s.%.200s size changed, may indicate binary incompatibility. "
10374 "Expected %zd from C header, got %zd from PyObject",
10375 module_name, class_name, size, basicsize) < 0) {
10379 return (PyTypeObject *)result;
10381 Py_XDECREF(result);
10387#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
10388static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(
void) {
10389 __Pyx_PyThreadState_declare
10390 __Pyx_PyThreadState_assign
10391 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
10392 __Pyx_PyErr_Clear();
10395static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
10397#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
10398 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
10401#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
10402 PyTypeObject* tp = Py_TYPE(obj);
10403 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
10404 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
10407 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
10408 if (unlikely(!result)) {
10409 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
10416#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
10417static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *o, PyObject *
n) {
10419 if (unlikely(!PyUnicode_Check(
n))) {
10420 PyErr_SetString(PyExc_TypeError,
10421 "hasattr(): attribute name must be string");
10424 r = __Pyx_PyObject_GetAttrStrNoError(o,
n);
10426 return (unlikely(PyErr_Occurred())) ? -1 : 0;
10435CYTHON_UNUSED
static PyObject *
10436__Pyx_PyList_FromArray(PyObject *
const *src, Py_ssize_t
n) {
10437 PyObject *res = PyList_New(
n);
10438 if (unlikely(res == NULL))
return NULL;
10439 #if CYTHON_COMPILING_IN_CPYTHON
10440 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item,
n);
10443 for (i = 0; i <
n; i++) {
10445 if (unlikely(__Pyx_PyList_SET_ITEM(res, i, src[i]) < (0))) {
10455static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
10456 PyObject *imported_module = PyImport_GetModule(qualname);
10457 if (unlikely(!imported_module)) {
10459 if (PyErr_Occurred()) {
10464 *
module = imported_module;
10467static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
10468 PyObject *imported_module;
10469 PyObject *top_level_package_name;
10471 int status, module_found;
10472 Py_ssize_t dot_index;
10473 module_found = __Pyx__Import_GetModule(qualname, &imported_module);
10474 if (unlikely(!module_found || module_found == -1)) {
10476 return module_found;
10478 if (imported_names) {
10479 for (i = 0; i < len_imported_names; i++) {
10480 PyObject *imported_name = imported_names[i];
10481#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
10482 int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
10484 int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
10485 if (unlikely(has_imported_attribute == -1))
goto error;
10487 if (!has_imported_attribute) {
10491 *
module = imported_module;
10494 dot_index = PyUnicode_FindChar(qualname,
'.', 0, PY_SSIZE_T_MAX, 1);
10495 if (dot_index == -1) {
10496 *
module = imported_module;
10499 if (unlikely(dot_index == -2))
goto error;
10500 top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
10501 if (unlikely(!top_level_package_name))
goto error;
10502 Py_DECREF(imported_module);
10503 status = __Pyx__Import_GetModule(top_level_package_name, module);
10504 Py_DECREF(top_level_package_name);
10507 Py_DECREF(imported_module);
10511 Py_DECREF(imported_module);
10515static PyObject *__Pyx__Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict,
int level) {
10516 PyObject *module = 0;
10517 PyObject *empty_dict = 0;
10518 PyObject *from_list = 0;
10523 module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
10524 if (likely(module_found == 1)) {
10526 }
else if (unlikely(module_found == -1)) {
10529 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030f00a6
10530 empty_dict = PyFrozenDict_New(NULL);
10532 empty_dict = PyDict_New();
10534 if (unlikely(!empty_dict))
10536 if (imported_names) {
10537 from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
10538 if (unlikely(!from_list))
10542 const char* package_sep = strchr(__Pyx_MODULE_NAME,
'.');
10543 if (package_sep != (0)) {
10544 module = PyImport_ImportModuleLevelObject(
10545 name, moddict, empty_dict, from_list, 1);
10546 if (unlikely(!module)) {
10547 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
10555 module = PyImport_ImportModuleLevelObject(
10556 name, moddict, empty_dict, from_list, level);
10559 Py_XDECREF(from_list);
10560 Py_XDECREF(empty_dict);
10565static PyObject *__Pyx_Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname,
int level) {
10566 return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
10570static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
10572#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
10573 PyDict_SetDefaultRef(d, key, default_value, &value);
10574#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
10575 PyObject *args[] = {d, key, default_value};
10576 value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
10577#elif CYTHON_COMPILING_IN_LIMITED_API
10578 value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
10580 value = PyDict_SetDefault(d, key, default_value);
10581 if (unlikely(!value))
return NULL;
10588#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3
10589 static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
10590 PyObject *module_dict = PyImport_GetModuleDict();
10592 if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
10595 if (m != NULL && PyModule_Check(m)) {
10599 m = PyModule_NewObject(name);
10602 if (PyDict_CheckExact(module_dict)) {
10604 (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
10608 if (PyObject_SetItem(module_dict, name, m) != 0) {
10615 static PyObject *__Pyx_PyImport_AddModuleRef(
const char *name) {
10616 if ((PY_VERSION_HEX >= 0x030E0000) && Py_Version >= 0x030E0100) {
10617 return PyImport_AddModuleRef(name);
10619 PyObject *py_name = PyUnicode_FromString(name);
10620 if (!py_name)
return NULL;
10621 PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
10622 Py_DECREF(py_name);
10625#elif __PYX_LIMITED_VERSION_HEX < 0x030d0000
10626 static PyObject *__Pyx_PyImport_AddModuleRef(
const char *name) {
10627 PyObject *module = PyImport_AddModule(name);
10628 Py_XINCREF(module);
10634static PyObject *__Pyx_FetchSharedCythonABIModule(
void) {
10635 return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
10639static int __Pyx_VerifyCachedType(PyObject *cached_type,
10641 Py_ssize_t expected_basicsize) {
10642 Py_ssize_t basicsize;
10643 if (!PyType_Check(cached_type)) {
10644 PyErr_Format(PyExc_TypeError,
10645 "Shared Cython type %.200s is not a type object", name);
10648 if (expected_basicsize == 0) {
10651#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_OPAQUE_OBJECTS
10652 if (expected_basicsize < 0) {
10653 basicsize = PyType_GetTypeDataSize((PyTypeObject*)cached_type);
10657 #if CYTHON_COMPILING_IN_LIMITED_API
10658 PyObject *py_basicsize;
10659 py_basicsize = PyObject_GetAttrString(cached_type,
"__basicsize__");
10660 if (unlikely(!py_basicsize))
return -1;
10661 basicsize = PyLong_AsSsize_t(py_basicsize);
10662 Py_DECREF(py_basicsize);
10663 py_basicsize = NULL;
10664 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred())
return -1;
10666 basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
10669 if ((expected_basicsize >= 0) ?
10670 (basicsize != expected_basicsize) :
10671 (basicsize < -expected_basicsize)) {
10672 PyErr_Format(PyExc_TypeError,
10673 "Shared Cython type %.200s has the wrong size, try recompiling",
10681#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
10682static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
10683 PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
10684 if (result && metaclass) {
10685 PyObject *old_tp = (PyObject*)Py_TYPE(result);
10686 Py_INCREF((PyObject*)metaclass);
10687 Py_SET_TYPE(result, metaclass);
10689 PyType_Modified((PyTypeObject*)result);
10694#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
10696static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
10697 PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
10698 int get_item_ref_result;
10699 const char* object_name = strrchr(spec->name,
'.');
10700 object_name = object_name ? object_name+1 : spec->name;
10701 py_object_name = PyUnicode_FromString(object_name);
10702 if (!py_object_name)
return NULL;
10703 abi_module = __Pyx_FetchSharedCythonABIModule();
10704 if (!abi_module)
goto done;
10705 abi_module_dict = PyModule_GetDict(abi_module);
10706 if (!abi_module_dict)
goto done;
10707 get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
10708 if (get_item_ref_result == 1) {
10709 if (__Pyx_VerifyCachedType(
10712 spec->basicsize) < 0) {
10716 }
else if (unlikely(get_item_ref_result == -1)) {
10719 cached_type = __Pyx_PyType_FromMetaclass(
10721 CYTHON_USE_MODULE_STATE ? module : abi_module,
10723 if (unlikely(!cached_type))
goto bad;
10724 new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
10725 if (unlikely(new_cached_type != cached_type)) {
10726 if (unlikely(!new_cached_type))
goto bad;
10727 Py_DECREF(cached_type);
10728 cached_type = new_cached_type;
10729 if (__Pyx_VerifyCachedType(
10732 spec->basicsize) < 0) {
10737 Py_DECREF(new_cached_type);
10740 Py_XDECREF(abi_module);
10741 Py_DECREF(py_object_name);
10742 assert(cached_type == NULL || PyType_Check(cached_type));
10743 return (PyTypeObject *) cached_type;
10745 Py_XDECREF(cached_type);
10746 cached_type = NULL;
10751static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED
void* context) {
10752 return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
10754#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
10755static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
10756 PyErr_SetString(PyExc_TypeError,
"Cannot instantiate Cython internal types");
10759static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
10760 PyErr_SetString(PyExc_TypeError,
"Cython internal types are immutable");
10764static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
10765 {
"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
10768static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
10769 {Py_tp_getset, (
void *)__pyx_CommonTypesMetaclass_getset},
10770 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
10771 {Py_tp_call, (
void*)__pyx_CommonTypesMetaclass_call},
10772 {Py_tp_new, (
void*)__pyx_CommonTypesMetaclass_call},
10773 {Py_tp_setattro, (
void*)__pyx_CommonTypesMetaclass_setattr},
10777static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
10778 __PYX_TYPE_MODULE_PREFIX
"_common_types_metatype",
10781 Py_TPFLAGS_IMMUTABLETYPE |
10782 Py_TPFLAGS_DISALLOW_INSTANTIATION |
10783 Py_TPFLAGS_DEFAULT,
10784 __pyx_CommonTypesMetaclass_slots
10786static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
10787 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
10788 PyObject *bases = PyTuple_Pack(1, &PyType_Type);
10789 if (unlikely(!bases)) {
10792 mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
10794 if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
10801#if CYTHON_COMPILING_IN_LIMITED_API
10802static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func,
void (*cfunc)(
void)) {
10803 if (__Pyx_CyFunction_Check(func)) {
10804 return __Pyx_as_CyFunctionObject(func)->func_methoddef->ml_meth == (PyCFunction) cfunc;
10805 }
else if (PyCFunction_Check(func)) {
10806 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
10810static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void (*cfunc)(
void)) {
10811 if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
10813 PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
10814 if (unlikely(!newFunc)) {
10818 result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
10819 Py_DECREF(newFunc);
10822 return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
10825static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void (*cfunc)(
void)) {
10826 if (PyMethod_Check(func)) {
10827 func = PyMethod_GET_FUNCTION(func);
10829 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
10832static CYTHON_INLINE
void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject*
f, PyObject* classobj) {
10833#if CYTHON_COMPILING_IN_LIMITED_API
10834 __Pyx_Py_XDECREF_SET(
10835 __Pyx__CyFunction_GetClassObj(
f),
10836 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
10838 __Pyx_Py_XDECREF_SET(
10839 ((PyCMethodObject *) (
f))->mm_class,
10840 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
10843static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
10844 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
10845 m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL);
10846 if (unlikely(!m->defaults))
10848 return m->defaults;
10850static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
10851 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
10852 m->defaults_tuple = tuple;
10855static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
10856 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
10857 m->defaults_kwdict = dict;
10860static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
10861 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
10862 m->func_annotations = dict;
10867#if !CYTHON_USE_TYPE_SPECS
10869static int __Pyx_call_type_traverse(PyObject *o,
int always_call, visitproc visit,
void *arg) {
10870 if (!always_call) {
10871 PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
10872 unsigned long flags = PyType_GetFlags(base);
10873 if (flags & Py_TPFLAGS_HEAPTYPE) {
10877 Py_VISIT((PyObject*)Py_TYPE(o));
10883#if CYTHON_COMPILING_IN_LIMITED_API
10884static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
10886 CYTHON_UNUSED_VAR(typ);
10888 return __Pyx_NewRef(func);
10889 #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
10891 PyObject *args[] = {func, self};
10892 result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
10895 result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
10900static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
10901 CYTHON_UNUSED_VAR(typ);
10903 return __Pyx_NewRef(func);
10904 return PyMethod_New(func, self);
10909#if CYTHON_VECTORCALL
10910static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw)
10912 PyObject *res = NULL;
10914 PyObject **newargs;
10915 PyObject **kwvalues;
10917 #if CYTHON_AVOID_BORROWED_REFS
10923 PyObject *key, *value;
10924 unsigned long keys_are_strings;
10925 #if !CYTHON_ASSUME_SAFE_SIZE
10926 Py_ssize_t nkw = PyDict_Size(kw);
10927 if (unlikely(nkw == -1))
return NULL;
10929 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
10931 newargs = (PyObject **)PyMem_Malloc((nargs + (
size_t)nkw) *
sizeof(args[0]));
10932 if (unlikely(newargs == NULL)) {
10936 for (j = 0; j < nargs; j++) newargs[j] = args[j];
10937 kwnames = PyTuple_New(nkw);
10938 if (unlikely(kwnames == NULL)) {
10939 PyMem_Free(newargs);
10942 kwvalues = newargs + nargs;
10945 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
10946 while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
10947 keys_are_strings &=
10948 #if CYTHON_COMPILING_IN_LIMITED_API
10949 PyType_GetFlags(Py_TYPE(key));
10951 Py_TYPE(key)->tp_flags;
10953 #if !CYTHON_ASSUME_SAFE_MACROS
10954 if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0))
goto cleanup;
10956 PyTuple_SET_ITEM(kwnames, i, key);
10958 kwvalues[i] = value;
10961 if (unlikely(!keys_are_strings)) {
10962 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
10965 res = vc(func, newargs, nargs, kwnames);
10967 #if CYTHON_AVOID_BORROWED_REFS
10970 Py_DECREF(kwnames);
10971 for (i = 0; i < nkw; i++)
10972 Py_DECREF(kwvalues[i]);
10973 PyMem_Free(newargs);
10976static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw)
10978 Py_ssize_t kw_size =
10979 likely(kw == NULL) ?
10981#if !CYTHON_ASSUME_SAFE_SIZE
10984 PyDict_GET_SIZE(kw);
10986 if (kw_size == 0) {
10987 return vc(func, args, nargs, NULL);
10989#if !CYTHON_ASSUME_SAFE_SIZE
10990 else if (unlikely(kw_size == -1)) {
10994 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
11000__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
11002 if (unlikely(op->func_doc == NULL)) {
11003#if CYTHON_COMPILING_IN_LIMITED_API
11004 const char *doc = op->func_methoddef->ml_doc;
11006 const char *doc = ((PyCFunctionObject*)op)->m_ml->ml_doc;
11009 op->func_doc = PyUnicode_FromString(doc);
11010 if (unlikely(op->func_doc == NULL))
11013 Py_INCREF(Py_None);
11017 Py_INCREF(op->func_doc);
11018 return op->func_doc;
11021__Pyx_CyFunction_get_doc(PyObject *op_in,
void *closure) {
11023 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11024 CYTHON_UNUSED_VAR(closure);
11025 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11026 result = __Pyx_CyFunction_get_doc_locked(op);
11027 __Pyx_END_CRITICAL_SECTION();
11031__Pyx_CyFunction_set_doc(PyObject *op_in, PyObject *value,
void *context)
11033 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11034 CYTHON_UNUSED_VAR(context);
11035 if (value == NULL) {
11039 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11040 __Pyx_Py_XDECREF_SET(op->func_doc, value);
11041 __Pyx_END_CRITICAL_SECTION();
11045__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
11047 if (unlikely(op->func_name == NULL)) {
11048#if CYTHON_COMPILING_IN_LIMITED_API
11049 const char *name = op->func_methoddef->ml_name;
11051 const char *name = ((PyCFunctionObject*)op)->m_ml->ml_name;
11053 op->func_name = PyUnicode_InternFromString(name);
11054 if (unlikely(op->func_name == NULL))
11057 Py_INCREF(op->func_name);
11058 return op->func_name;
11061__Pyx_CyFunction_get_name(PyObject *op,
void *context)
11063 PyObject *result = NULL;
11064 CYTHON_UNUSED_VAR(context);
11065 __Pyx_BEGIN_CRITICAL_SECTION(op);
11066 result = __Pyx_CyFunction_get_name_locked(__Pyx_as_CyFunctionObject(op));
11067 __Pyx_END_CRITICAL_SECTION();
11071__Pyx_CyFunction_set_name(PyObject *op_in, PyObject *value,
void *context)
11073 CYTHON_UNUSED_VAR(context);
11074 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
11075 PyErr_SetString(PyExc_TypeError,
11076 "__name__ must be set to a string object");
11079 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11081 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11082 __Pyx_Py_XDECREF_SET(op->func_name, value);
11083 __Pyx_END_CRITICAL_SECTION();
11087__Pyx_CyFunction_get_qualname(PyObject *op_in,
void *context)
11089 CYTHON_UNUSED_VAR(context);
11090 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11092 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11093 Py_INCREF(op->func_qualname);
11094 result = op->func_qualname;
11095 __Pyx_END_CRITICAL_SECTION();
11099__Pyx_CyFunction_set_qualname(PyObject *op_in, PyObject *value,
void *context)
11101 CYTHON_UNUSED_VAR(context);
11102 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
11103 PyErr_SetString(PyExc_TypeError,
11104 "__qualname__ must be set to a string object");
11107 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11109 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11110 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
11111 __Pyx_END_CRITICAL_SECTION();
11114#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
11116__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op,
void *context)
11118 CYTHON_UNUSED_VAR(context);
11119 if (unlikely(op->func_dict == NULL)) {
11120 op->func_dict = PyDict_New();
11121 if (unlikely(op->func_dict == NULL))
11124 Py_INCREF(op->func_dict);
11125 return op->func_dict;
11129__Pyx_CyFunction_get_globals(PyObject *op_in,
void *context)
11131 CYTHON_UNUSED_VAR(context);
11132 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11133 Py_INCREF(op->func_globals);
11134 return op->func_globals;
11137__Pyx_CyFunction_get_closure(PyObject *op,
void *context)
11139 CYTHON_UNUSED_VAR(op);
11140 CYTHON_UNUSED_VAR(context);
11141 Py_INCREF(Py_None);
11145__Pyx_CyFunction_get_code(PyObject *op_in,
void *context)
11147 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11148 PyObject* result = (op->func_code) ? op->func_code : Py_None;
11149 CYTHON_UNUSED_VAR(context);
11154__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op, PyObject *op_obj) {
11156 PyObject *res = op->defaults_getter(op_obj);
11157 if (unlikely(!res))
11159 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11160 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
11161 Py_INCREF(op->defaults_tuple);
11162 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
11163 Py_INCREF(op->defaults_kwdict);
11165 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
11166 if (unlikely(!op->defaults_tuple)) result = -1;
11168 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
11169 if (unlikely(!op->defaults_kwdict)) result = -1;
11176__Pyx_CyFunction_set_defaults(PyObject *op_in, PyObject* value,
void *context) {
11177 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11178 CYTHON_UNUSED_VAR(context);
11181 }
else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
11182 PyErr_SetString(PyExc_TypeError,
11183 "__defaults__ must be set to a tuple object");
11186 PyErr_WarnEx(PyExc_RuntimeWarning,
"changes to cyfunction.__defaults__ will not "
11187 "currently affect the values used in function calls", 1);
11189 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11190 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
11191 __Pyx_END_CRITICAL_SECTION();
11195__Pyx_CyFunction_get_defaults_locked(PyObject *op_in) {
11196 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11197 PyObject* result = op->defaults_tuple;
11198 if (unlikely(!result)) {
11199 if (op->defaults_getter) {
11200 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0))
return NULL;
11201 result = op->defaults_tuple;
11210__Pyx_CyFunction_get_defaults(PyObject *op,
void *context) {
11211 PyObject* result = NULL;
11212 CYTHON_UNUSED_VAR(context);
11213 __Pyx_BEGIN_CRITICAL_SECTION(op);
11214 result = __Pyx_CyFunction_get_defaults_locked(op);
11215 __Pyx_END_CRITICAL_SECTION();
11219__Pyx_CyFunction_set_kwdefaults(PyObject *op_in, PyObject* value,
void *context) {
11220 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11221 CYTHON_UNUSED_VAR(context);
11224 }
else if (unlikely(value != Py_None && !PyDict_Check(value))) {
11225 PyErr_SetString(PyExc_TypeError,
11226 "__kwdefaults__ must be set to a dict object");
11229 PyErr_WarnEx(PyExc_RuntimeWarning,
"changes to cyfunction.__kwdefaults__ will not "
11230 "currently affect the values used in function calls", 1);
11232 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11233 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
11234 __Pyx_END_CRITICAL_SECTION();
11238__Pyx_CyFunction_get_kwdefaults_locked(PyObject *op_in) {
11239 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11240 PyObject* result = op->defaults_kwdict;
11241 if (unlikely(!result)) {
11242 if (op->defaults_getter) {
11243 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0))
return NULL;
11244 result = op->defaults_kwdict;
11253__Pyx_CyFunction_get_kwdefaults(PyObject *op,
void *context) {
11255 CYTHON_UNUSED_VAR(context);
11256 __Pyx_BEGIN_CRITICAL_SECTION(op);
11257 result = __Pyx_CyFunction_get_kwdefaults_locked(op);
11258 __Pyx_END_CRITICAL_SECTION();
11261static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value);
11263__Pyx_CyFunction_set_annotations(PyObject *op_in, PyObject* value,
void *context) {
11264 CYTHON_UNUSED_VAR(context);
11265 if (!value || value == Py_None) {
11267 }
else if (unlikely(!PyDict_Check(value))) {
11268 PyErr_SetString(PyExc_TypeError,
11269 "__annotations__ must be set to a dict object");
11272 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11274 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11275 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
11276 __Pyx_END_CRITICAL_SECTION();
11277 if (unlikely(__Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, Py_None) < 0))
return -1;
11281__Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
11284#if CYTHON_COMPILING_IN_PYPY
11285 *dict = PyObject_GenericGetDict(op_in, NULL);
11286#elif CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030C0000
11287 *dict = __Pyx_as_CyFunctionObject(op_in)->func_dict;
11289 PyObject **dictptr = _PyObject_GetDictPtr(op_in);
11290 *dict = likely(dictptr) ? *dictptr : NULL;
11292 return *dict ? 1 : 0;
11295__Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
11299 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
11300 if (!dict_found)
return 0;
11301 return __Pyx_PyDict_GetItemRef(dict, __pyx_mstate_global->__pyx_n_u_annotate, annotate);
11304__Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
11307 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
11308 if (!dict_found)
return 0;
11310 return PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
11312#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
11313 return PyDict_Pop(dict, __pyx_mstate_global->__pyx_n_u_annotate, NULL);
11315 int result = PyDict_Contains(dict, __pyx_mstate_global->__pyx_n_u_annotate);
11317 result = PyDict_DelItem(dict, __pyx_mstate_global->__pyx_n_u_annotate);
11324__Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
11327#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
11328 dict = __Pyx_CyFunction_get_dict(__Pyx_as_CyFunctionObject(op_in), NULL);
11330 dict = PyObject_GenericGetDict(op_in, NULL);
11332 if (unlikely(!dict))
return -1;
11333 result = PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
11338__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
11339 PyObject* result = op->func_annotations;
11340 if (unlikely(!result)) {
11341 result = PyDict_New();
11342 if (unlikely(!result))
return NULL;
11343 op->func_annotations = result;
11349__Pyx_CyFunction_get_annotations(PyObject *op_in,
void *context) {
11350 PyObject *annotate = NULL;
11351 PyObject *result = NULL;
11352 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11353 CYTHON_UNUSED_VAR(context);
11354 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11355 result = __Pyx_XNewRef(op->func_annotations);
11356 __Pyx_END_CRITICAL_SECTION();
11357 if (result)
return result;
11358 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0))
return NULL;
11359 if (!annotate || annotate == Py_None) {
11360 Py_XDECREF(annotate);
11361 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11362 result = __Pyx_CyFunction_get_annotations_locked(op);
11363 __Pyx_END_CRITICAL_SECTION();
11366 PyObject *format = PyLong_FromLong(1L);
11367 if (likely(format)) {
11368 if (!Py_EnterRecursiveCall(
" cyfunction __annotations__.__get__")) {
11369 result = __Pyx_PyObject_CallOneArg(annotate, format);
11370 Py_LeaveRecursiveCall();
11374 Py_DECREF(annotate);
11375 if (unlikely(!result))
return NULL;
11376 if (unlikely(!PyDict_Check(result))) {
11377 PyErr_SetString(PyExc_TypeError,
"__annotate__ must return a dict");
11381 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11382 __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
11383 __Pyx_END_CRITICAL_SECTION();
11386static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *arg) {
11387 CYTHON_UNUSED_VAR(arg);
11388 if (unlikely(!self)) {
11389 PyErr_SetString(PyExc_SystemError,
"cython __annotate__ called without 'self' argument");
11393 if (Py_EnterRecursiveCall(
" in cyfunction annotate")) {
11396 result = __Pyx_CyFunction_get_annotations(self, NULL);
11397 Py_LeaveRecursiveCall();
11401__Pyx_CyFunction_get_annotate(PyObject *op_in,
void *context);
11403__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value,
void *context) {
11404 CYTHON_UNUSED_VAR(context);
11405 if (value == NULL) {
11406 PyErr_SetString(PyExc_TypeError,
"__annotate__ cannot be deleted");
11409 if (unlikely(value != Py_None && !PyCallable_Check(value))) {
11410 PyErr_SetString(PyExc_TypeError,
"__annotate__ must be callable or None");
11413 if (unlikely(__Pyx_TypeCheck(value, &PyCFunction_Type))) {
11414#if !CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_PYPY
11415 PyCFunction cfunction = PyCFunction_GetFunction(value);
11416 if (unlikely(!cfunction))
return -1;
11417 PyObject *value_self = PyCFunction_GetSelf(value);
11418 if (unlikely(!value_self && PyErr_Occurred()))
return -1;
11420 PyCFunction cfunction = PyCFunction_GET_FUNCTION(value);
11421 PyObject *value_self = PyCFunction_GET_SELF(value);
11423 if (cfunction == __Pyx_CyFunction_annotate_impl && value_self == op_in) {
11424 return __Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, NULL);
11427 if (value != Py_None) {
11428 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11429 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11430 Py_CLEAR(op->func_annotations);
11431 __Pyx_END_CRITICAL_SECTION();
11433 return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
11435#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11437__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
11438 int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
11439 if (is_coroutine) {
11440 PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
11441 fromlist = PyList_New(1);
11442 if (unlikely(!fromlist))
return NULL;
11444#if CYTHON_ASSUME_SAFE_MACROS
11445 PyList_SET_ITEM(fromlist, 0, marker);
11447 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
11448 Py_DECREF(fromlist);
11452 module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
11453 Py_DECREF(fromlist);
11454 if (unlikely(!module)) {
11455 goto ignore_or_error;
11457 is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
11459 if (likely(is_coroutine_value)) {
11460 return is_coroutine_value;
11463 if (!__Pyx_IgnoreException(PyExc_Exception)) {
11467 return __Pyx_PyBool_FromLong(is_coroutine);
11470__Pyx_CyFunction_get_is_coroutine(PyObject *op_in,
void *context) {
11471 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11473 CYTHON_UNUSED_VAR(context);
11474 if (op->func_is_coroutine) {
11475 return __Pyx_NewRef(op->func_is_coroutine);
11477 result = __Pyx_CyFunction_get_is_coroutine_value(op);
11478 if (unlikely(!result))
11480 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11481 if (op->func_is_coroutine) {
11483 result = __Pyx_NewRef(op->func_is_coroutine);
11485 op->func_is_coroutine = __Pyx_NewRef(result);
11487 __Pyx_END_CRITICAL_SECTION();
11491static void __Pyx_CyFunction_raise_argument_count_error(PyObject *func,
const char* message, Py_ssize_t size) {
11492#if CYTHON_COMPILING_IN_LIMITED_API
11493 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
11494 if (!py_name)
return;
11495 PyErr_Format(PyExc_TypeError,
11496 "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
11497 py_name, message, size);
11498 Py_DECREF(py_name);
11500 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
11501 PyErr_Format(PyExc_TypeError,
11502 "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
11503 name, message, size);
11506static void __Pyx_CyFunction_raise_type_error(PyObject *func,
const char* message) {
11507#if CYTHON_COMPILING_IN_LIMITED_API
11508 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
11509 if (!py_name)
return;
11510 PyErr_Format(PyExc_TypeError,
11513 Py_DECREF(py_name);
11515 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
11516 PyErr_Format(PyExc_TypeError,
11521#if CYTHON_COMPILING_IN_LIMITED_API
11523__Pyx_CyFunction_get_module(PyObject *op_in,
void *context) {
11524 CYTHON_UNUSED_VAR(context);
11525 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11526 Py_INCREF(op->func_module);
11527 return op->func_module;
11530__Pyx_CyFunction_set_module(PyObject *op_in, PyObject* value,
void *context) {
11531 CYTHON_UNUSED_VAR(context);
11532 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11533 if (value == NULL) {
11537 PyObject *old = op->func_module;
11538 op->func_module = value;
11543static PyGetSetDef __pyx_CyFunction_getsets[] = {
11544 {
"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
11545 {
"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
11546 {
"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
11547 {
"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
11548 {
"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
11549#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
11550 {
"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
11551 {
"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
11553 {
"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
11554 {
"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
11556 {
"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
11557 {
"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
11558 {
"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
11559 {
"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
11560 {
"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
11561 {
"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
11562 {
"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
11563 {
"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
11564 {
"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
11565 {
"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
11566 {
"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0},
11567#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11568 {
"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
11570#if CYTHON_COMPILING_IN_LIMITED_API
11571 {
"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
11575static PyMemberDef __pyx_CyFunction_members[] = {
11576#if !CYTHON_COMPILING_IN_LIMITED_API
11577 {
"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
11579#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
11580 {
"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict),
11581 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
11583#if CYTHON_VECTORCALL
11584#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
11585 {
"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall),
11586 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
11588 {
"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
11590#if CYTHON_COMPILING_IN_LIMITED_API
11591 {
"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist),
11592 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
11594 {
"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
11600__Pyx_CyFunction_reduce(PyObject *m_in, PyObject *args)
11602 PyObject *result = NULL;
11603 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
11604 CYTHON_UNUSED_VAR(args);
11605 __Pyx_BEGIN_CRITICAL_SECTION(m_in);
11606 Py_INCREF(m->func_qualname);
11607 result = m->func_qualname;
11608 __Pyx_END_CRITICAL_SECTION();
11611static PyMethodDef __pyx_CyFunction_methods[] = {
11612 {
"__annotate_cython__", __Pyx_CyFunction_annotate_impl, METH_O,
11613 "Placeholder __annotate__ function to allow 'functools.wraps' to work "
11614 "on Cython functions."},
11615 {
"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_NOARGS, 0},
11619__Pyx_CyFunction_get_annotate(PyObject *op_in,
void *context) {
11620 PyObject *annotate = NULL;
11621 CYTHON_UNUSED_VAR(context);
11622 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0))
return NULL;
11623 if (annotate)
return annotate;
11624 PyObject *method = PyCFunction_New(
11625 &__pyx_CyFunction_methods[0],
11629#if CYTHON_COMPILING_IN_LIMITED_API
11630#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
11632#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
11634static PyObject *__Pyx_CyFunction_Init(PyObject *op_in,
11635 PyMethodDef *ml,
int flags, PyObject* qualname,
11636 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
11637 __pyx_CyFunctionObject* op = __Pyx_as_CyFunctionObject(op_in);
11638#if !CYTHON_COMPILING_IN_LIMITED_API
11639 PyCFunctionObject *cf = (PyCFunctionObject*) op;
11641 if (unlikely(op == NULL))
11643#if CYTHON_COMPILING_IN_LIMITED_API
11644 op->func_methoddef = ml;
11646 op->func_module =
module;
11649 __Pyx_CyFunction_weakreflist(op) = NULL;
11650#if !CYTHON_COMPILING_IN_LIMITED_API
11652 cf->m_self = (PyObject *) op;
11654 Py_XINCREF(closure);
11655 op->func_closure = closure;
11656#if !CYTHON_COMPILING_IN_LIMITED_API
11657 Py_XINCREF(module);
11658 cf->m_module =
module;
11660#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
11661 op->func_dict = NULL;
11663 op->func_name = NULL;
11664 Py_INCREF(qualname);
11665 op->func_qualname = qualname;
11666 op->func_doc = NULL;
11667#if CYTHON_COMPILING_IN_LIMITED_API
11668 op->func_classobj = NULL;
11670 ((PyCMethodObject*)op)->mm_class = NULL;
11672 op->func_globals = globals;
11673 Py_INCREF(op->func_globals);
11675 op->func_code = code;
11676 op->defaults = NULL;
11677 op->defaults_tuple = NULL;
11678 op->defaults_kwdict = NULL;
11679 op->defaults_getter = NULL;
11680 op->func_annotations = NULL;
11681#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11682 op->func_is_coroutine = NULL;
11684#if CYTHON_VECTORCALL
11685 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
11687 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
11690 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
11692 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
11693 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
11695 case METH_FASTCALL | METH_KEYWORDS:
11696 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
11698 case METH_VARARGS | METH_KEYWORDS:
11699 __Pyx_CyFunction_func_vectorcall(op) = NULL;
11702 PyErr_SetString(PyExc_SystemError,
"Bad call flags for CyFunction");
11709static int __Pyx__CyFunction_clear(__pyx_CyFunctionObject *m)
11711 Py_CLEAR(m->func_closure);
11712#if CYTHON_COMPILING_IN_LIMITED_API
11713 Py_CLEAR(m->func_module);
11715 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
11717#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
11718 Py_CLEAR(m->func_dict);
11719#elif PY_VERSION_HEX < 0x030d0000
11720 _PyObject_ClearManagedDict((PyObject*)m);
11722 PyObject_ClearManagedDict((PyObject*)m);
11724 Py_CLEAR(m->func_name);
11725 Py_CLEAR(m->func_qualname);
11726 Py_CLEAR(m->func_doc);
11727 Py_CLEAR(m->func_globals);
11728 Py_CLEAR(m->func_code);
11729#if CYTHON_COMPILING_IN_LIMITED_API
11730 Py_CLEAR(m->func_classobj);
11733 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
11734 ((PyCMethodObject *) (m))->mm_class = NULL;
11738 Py_CLEAR(m->defaults_tuple);
11739 Py_CLEAR(m->defaults_kwdict);
11740 Py_CLEAR(m->func_annotations);
11741#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11742 Py_CLEAR(m->func_is_coroutine);
11744 Py_CLEAR(m->defaults);
11748__Pyx_CyFunction_clear(PyObject *m)
11750 return __Pyx__CyFunction_clear(__Pyx_as_CyFunctionObject(m));
11752static void __Pyx__CyFunction_dealloc(PyObject *m)
11754 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(m);
11755 if (__Pyx_CyFunction_weakreflist(cyfunc) != NULL)
11756 PyObject_ClearWeakRefs(m);
11757 __Pyx__CyFunction_clear(cyfunc);
11758 __Pyx_PyHeapTypeObject_GC_Del(m);
11760static void __Pyx_CyFunction_dealloc(PyObject *m)
11762 PyObject_GC_UnTrack(m);
11763 __Pyx__CyFunction_dealloc(m);
11765static int __Pyx_CyFunction_traverse(PyObject *m_in, visitproc visit,
void *arg)
11767 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
11769 int e = __Pyx_call_type_traverse(m_in, 1, visit, arg);
11772 Py_VISIT(m->func_closure);
11773#if CYTHON_COMPILING_IN_LIMITED_API
11774 Py_VISIT(m->func_module);
11776 Py_VISIT(((PyCFunctionObject*)m)->m_module);
11778#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
11779 Py_VISIT(m->func_dict);
11783#if PY_VERSION_HEX < 0x030d0000
11784 _PyObject_VisitManagedDict
11786 PyObject_VisitManagedDict
11788 ((PyObject*)m, visit, arg);
11789 if (e != 0)
return e;
11792 __Pyx_VISIT_CONST(m->func_name);
11793 __Pyx_VISIT_CONST(m->func_qualname);
11794 Py_VISIT(m->func_doc);
11795 Py_VISIT(m->func_globals);
11796 __Pyx_VISIT_CONST(m->func_code);
11797 Py_VISIT(__Pyx__CyFunction_GetClassObj(m));
11798 Py_VISIT(m->defaults_tuple);
11799 Py_VISIT(m->defaults_kwdict);
11800 Py_VISIT(m->func_annotations);
11801#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11802 Py_VISIT(m->func_is_coroutine);
11804 Py_VISIT(m->defaults);
11808__Pyx_CyFunction_repr(PyObject *op_in)
11810 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11812 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11813 repr = PyUnicode_FromFormat(
"<cyfunction %U at %p>",
11814 op->func_qualname, (
void *)op);
11815 __Pyx_END_CRITICAL_SECTION();
11818static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
11819#if CYTHON_COMPILING_IN_LIMITED_API
11820 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
11821 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
11822 int flags = cyfunc->func_methoddef->ml_flags;
11824 PyCFunctionObject*
f = (PyCFunctionObject*)func;
11825 PyCFunction meth =
f->m_ml->ml_meth;
11826 int flags =
f->m_ml->ml_flags;
11829 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
11831 if (likely(kw == NULL || PyDict_Size(kw) == 0))
11832 return (*meth)(self, arg);
11834 case METH_VARARGS | METH_KEYWORDS:
11835 return (*(PyCFunctionWithKeywords)(
void(*)(
void))meth)(self, arg, kw);
11837 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
11838#if CYTHON_ASSUME_SAFE_SIZE
11839 size = PyTuple_GET_SIZE(arg);
11841 size = PyTuple_Size(arg);
11842 if (unlikely(size < 0))
return NULL;
11844 if (likely(size == 0))
11845 return (*meth)(self, NULL);
11846 __Pyx_CyFunction_raise_argument_count_error(
11848 "takes no arguments", size);
11853 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
11854#if CYTHON_ASSUME_SAFE_SIZE
11855 size = PyTuple_GET_SIZE(arg);
11857 size = PyTuple_Size(arg);
11858 if (unlikely(size < 0))
return NULL;
11860 if (likely(size == 1)) {
11861 PyObject *result, *arg0;
11862 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11863 arg0 = PyTuple_GET_ITEM(arg, 0);
11865 arg0 = __Pyx_PySequence_ITEM(arg, 0);
if (unlikely(!arg0))
return NULL;
11867 result = (*meth)(self, arg0);
11868 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
11873 __Pyx_CyFunction_raise_argument_count_error(
11875 "takes exactly one argument", size);
11880 PyErr_SetString(PyExc_SystemError,
"Bad call flags for CyFunction");
11883 __Pyx_CyFunction_raise_type_error(
11884 func,
"takes no keyword arguments");
11887static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
11889 result = __Pyx_CyFunction_CallMethod(func, func, arg, kw);
11892static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
11894 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
11895#if CYTHON_VECTORCALL
11896 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
11898#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
11899 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (
size_t)PyTuple_GET_SIZE(args), kw);
11901 (void) &__Pyx_PyVectorcall_FastCallDict;
11902 return PyVectorcall_Call(func, args, kw);
11906 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
11908 PyObject *new_args;
11910#if CYTHON_ASSUME_SAFE_SIZE
11911 argc = PyTuple_GET_SIZE(args);
11913 argc = PyTuple_Size(args);
11914 if (unlikely(argc < 0))
return NULL;
11916 new_args = PyTuple_GetSlice(args, 1, argc);
11917 if (unlikely(!new_args))
11919 self = PyTuple_GetItem(args, 0);
11920 if (unlikely(!self)) {
11921 Py_DECREF(new_args);
11922 PyErr_Format(PyExc_TypeError,
11923 "unbound method %.200S() needs an argument",
11924 cyfunc->func_qualname);
11927 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
11928 Py_DECREF(new_args);
11930 result = __Pyx_CyFunction_Call(func, args, kw);
11934#if CYTHON_VECTORCALL
11935static CYTHON_INLINE
int __Pyx_CyFunction_Vectorcall_CheckArgs(PyObject *func, __pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
11938 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
11939 if (unlikely(nargs < 1)) {
11940 __Pyx_CyFunction_raise_type_error(
11941 func,
"needs an argument");
11946 if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
11947 __Pyx_CyFunction_raise_type_error(
11948 func,
"takes no keyword arguments");
11953static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
11955 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
11956 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
11958#if CYTHON_COMPILING_IN_LIMITED_API
11959 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
11960 if (unlikely(!meth))
return NULL;
11962 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
11964 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
11976 if (unlikely(nargs != 0)) {
11977 __Pyx_CyFunction_raise_argument_count_error(
11978 func,
"takes no arguments", nargs);
11981 return meth(self, NULL);
11983static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
11985 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
11986 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
11988#if CYTHON_COMPILING_IN_LIMITED_API
11989 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
11990 if (unlikely(!meth))
return NULL;
11992 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
11994 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
12006 if (unlikely(nargs != 1)) {
12007 __Pyx_CyFunction_raise_argument_count_error(
12008 func,
"takes exactly one argument", nargs);
12011 return meth(self, args[0]);
12013static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
12015 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
12016 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
12018#if CYTHON_COMPILING_IN_LIMITED_API
12019 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
12020 if (unlikely(!meth))
return NULL;
12022 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
12024 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
12036 return ((__Pyx_PyCFunctionFastWithKeywords)(
void(*)(
void))meth)(self, args, nargs, kwnames);
12038static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
12040 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
12041 PyTypeObject *cls = (PyTypeObject *) __Pyx__CyFunction_GetClassObj(cyfunc);
12042 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
12044#if CYTHON_COMPILING_IN_LIMITED_API
12045 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
12046 if (unlikely(!meth))
return NULL;
12048 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
12050 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
12062 #if PY_VERSION_HEX < 0x030e00A6
12063 size_t nargs_value = (size_t) nargs;
12065 Py_ssize_t nargs_value = nargs;
12067 return ((__Pyx_PyCMethod)(
void(*)(
void))meth)(self, cls, args, nargs_value, kwnames);
12070static PyType_Slot __pyx_CyFunctionType_slots[] = {
12071 {Py_tp_dealloc, (
void *)__Pyx_CyFunction_dealloc},
12072 {Py_tp_repr, (
void *)__Pyx_CyFunction_repr},
12073 {Py_tp_call, (
void *)__Pyx_CyFunction_CallAsMethod},
12074 {Py_tp_traverse, (
void *)__Pyx_CyFunction_traverse},
12075 {Py_tp_clear, (
void *)__Pyx_CyFunction_clear},
12076 {Py_tp_methods, (
void *)__pyx_CyFunction_methods},
12077 {Py_tp_members, (
void *)__pyx_CyFunction_members},
12078 {Py_tp_getset, (
void *)__pyx_CyFunction_getsets},
12079 {Py_tp_descr_get, (
void *)__Pyx_PyMethod_New},
12082static PyType_Spec __pyx_CyFunctionType_spec = {
12083 __PYX_TYPE_MODULE_PREFIX
"cython_function_or_method",
12084 __PYX_SHARED_SIZEOF(__pyx_CyFunctionObject),
12086#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
12087 Py_TPFLAGS_METHOD_DESCRIPTOR |
12089#if CYTHON_VECTORCALL
12090#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
12091 Py_TPFLAGS_HAVE_VECTORCALL |
12092#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
12093 _Py_TPFLAGS_HAVE_VECTORCALL |
12096#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
12097 Py_TPFLAGS_MANAGED_DICT |
12099 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
12100 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
12101 __pyx_CyFunctionType_slots
12103static int __pyx_CyFunction_init(PyObject *module) {
12104 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
12105 mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
12106 mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
12107 if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
12114static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
int flags, PyObject* qualname,
12115 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
12116 (void)&__Pyx_Get_CyFunction_Type;
12117 PyObject *op = __Pyx_CyFunction_Init(
12118 PyObject_GC_New(PyObject, __pyx_mstate_global->__pyx_CyFunctionType),
12119 ml, flags, qualname, closure, module, globals, code
12122 PyObject_GC_Track(op);
12126static PyTypeObject *__Pyx_Get_CyFunction_Type(
void) {
12127 PyTypeObject *tp = __pyx_mstate_global->__pyx_CyFunctionType;
12128 Py_INCREF((PyObject*)tp);
12133#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
12134static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
12135 PyObject *dict = Py_TYPE(obj)->tp_dict;
12136 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
12138static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
12139 PyObject **dictptr = NULL;
12140 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
12142#if CYTHON_COMPILING_IN_CPYTHON
12143 dictptr = (likely(offset > 0)) ? (PyObject **) ((
char *)obj + offset) : _PyObject_GetDictPtr(obj);
12145 dictptr = _PyObject_GetDictPtr(obj);
12148 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
12150static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
12151 PyObject *dict = Py_TYPE(obj)->tp_dict;
12152 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
12154 return obj_dict_version == __Pyx_get_object_dict_version(obj);
12159#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
12160#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
12161#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
12162#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12163#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
12165PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
12166 PyObject **dict_ptr = _PyObject_GetDictPtr(o);
12167 return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
12170static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line) {
12171 PyObject *use_cline = NULL;
12172 PyObject *ptype, *pvalue, *ptraceback;
12173 PyObject *cython_runtime_dict;
12174 CYTHON_MAYBE_UNUSED_VAR(tstate);
12175 if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
12178 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12179 cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
12180 if (likely(cython_runtime_dict)) {
12181 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
12182 use_cline, cython_runtime_dict,
12183 __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
12185 if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
12188 Py_XDECREF(use_cline);
12189 Py_XDECREF(cython_runtime_dict);
12190 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12196static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
12197 int start = 0, mid = 0, end = count - 1;
12198 if (end >= 0 && code_line > entries[end].code_line) {
12201 while (start < end) {
12202 mid = start + (end - start) / 2;
12203 if (code_line < entries[mid].code_line) {
12205 }
else if (code_line > entries[mid].code_line) {
12211 if (code_line <= entries[mid].code_line) {
12217static __Pyx_CachedCodeObjectType *__pyx__find_code_object(
struct __Pyx_CodeObjectCache *code_cache,
int code_line) {
12218 __Pyx_CachedCodeObjectType* code_object;
12220 if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
12223 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
12224 if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
12227 code_object = code_cache->entries[pos].code_object;
12228 Py_INCREF(code_object);
12229 return code_object;
12231static __Pyx_CachedCodeObjectType *__pyx_find_code_object(
int code_line) {
12232#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
12233 (void)__pyx__find_code_object;
12236 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
12237#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12238 __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
12239 if (old_count < 0) {
12240 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
12244 __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
12245#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12246 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
12251static void __pyx__insert_code_object(
struct __Pyx_CodeObjectCache *code_cache,
int code_line, __Pyx_CachedCodeObjectType* code_object)
12254 __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
12255 if (unlikely(!code_line)) {
12258 if (unlikely(!entries)) {
12259 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
12260 if (likely(entries)) {
12261 code_cache->entries = entries;
12262 code_cache->max_count = 64;
12263 code_cache->count = 1;
12264 entries[0].code_line = code_line;
12265 entries[0].code_object = code_object;
12266 Py_INCREF(code_object);
12270 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
12271 if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
12272 __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
12273 entries[pos].code_object = code_object;
12274 Py_INCREF(code_object);
12278 if (code_cache->count == code_cache->max_count) {
12279 int new_max = code_cache->max_count + 64;
12280 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
12281 code_cache->entries, ((
size_t)new_max) *
sizeof(__Pyx_CodeObjectCacheEntry));
12282 if (unlikely(!entries)) {
12285 code_cache->entries = entries;
12286 code_cache->max_count = new_max;
12288 for (i=code_cache->count; i>pos; i--) {
12289 entries[i] = entries[i-1];
12291 entries[pos].code_line = code_line;
12292 entries[pos].code_object = code_object;
12293 code_cache->count++;
12294 Py_INCREF(code_object);
12296static void __pyx_insert_code_object(
int code_line, __Pyx_CachedCodeObjectType* code_object) {
12297#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
12298 (void)__pyx__insert_code_object;
12301 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
12302#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12303 __pyx_nonatomic_int_type expected = 0;
12304 if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
12308 __pyx__insert_code_object(code_cache, code_line, code_object);
12309#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12310 __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
12316#include "compile.h"
12317#include "frameobject.h"
12318#include "traceback.h"
12319#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
12320 #ifndef Py_BUILD_CORE
12321 #define Py_BUILD_CORE 1
12323 #include "internal/pycore_frame.h"
12325#if CYTHON_COMPILING_IN_LIMITED_API
12326static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
12327 PyObject *firstlineno, PyObject *name) {
12328 PyObject *replace = NULL;
12329 if (unlikely(PyDict_SetItemString(scratch_dict,
"co_firstlineno", firstlineno)))
return NULL;
12330 if (unlikely(PyDict_SetItemString(scratch_dict,
"co_name", name)))
return NULL;
12331 replace = PyObject_GetAttrString(code,
"replace");
12332 if (likely(replace)) {
12333 PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
12334 Py_DECREF(replace);
12339static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
12340 int py_line,
const char *filename) {
12341 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
12342 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
12343 PyObject *exc_type, *exc_value, *exc_traceback;
12346 c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
12348 __Pyx_PyErr_FetchException(&exc_type, &exc_value, &exc_traceback);
12349 code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
12350 if (!code_object) {
12351 code_object = Py_CompileString(
"_getframe()", filename, Py_eval_input);
12352 if (unlikely(!code_object))
goto bad;
12353 py_py_line = PyLong_FromLong(py_line);
12354 if (unlikely(!py_py_line))
goto bad;
12356 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12358 py_funcname = PyUnicode_FromString(funcname);
12360 if (unlikely(!py_funcname))
goto bad;
12361 dict = PyDict_New();
12362 if (unlikely(!dict))
goto bad;
12364 PyObject *old_code_object = code_object;
12365 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
12366 Py_DECREF(old_code_object);
12368 if (unlikely(!code_object))
goto bad;
12369 __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
12371 dict = PyDict_New();
12373 getframe = PySys_GetObject(
"_getframe");
12374 if (unlikely(!getframe))
goto bad;
12375 if (unlikely(PyDict_SetItemString(dict,
"_getframe", getframe)))
goto bad;
12376 frame = PyEval_EvalCode(code_object, dict, dict);
12377 if (unlikely(!frame) || frame == Py_None)
goto bad;
12380 __Pyx_PyErr_RestoreException(exc_type, exc_value, exc_traceback);
12381 Py_XDECREF(code_object);
12382 Py_XDECREF(py_py_line);
12383 Py_XDECREF(py_funcname);
12385 Py_XDECREF(replace);
12388 (
struct _frame*)frame);
12393static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
12394 const char *funcname,
int c_line,
12395 int py_line,
const char *filename) {
12396 PyCodeObject *py_code = NULL;
12397 PyObject *py_funcname = NULL;
12399 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12400 if (!py_funcname)
goto bad;
12401 funcname = PyUnicode_AsUTF8(py_funcname);
12402 if (!funcname)
goto bad;
12404 py_code = PyCode_NewEmpty(filename, funcname, py_line);
12405 Py_XDECREF(py_funcname);
12408 Py_XDECREF(py_funcname);
12411static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
12412 int py_line,
const char *filename) {
12413 PyCodeObject *py_code = 0;
12414 PyFrameObject *py_frame = 0;
12415 PyThreadState *tstate = __Pyx_PyThreadState_Current;
12416 PyObject *ptype, *pvalue, *ptraceback;
12418 c_line = __Pyx_CLineForTraceback(tstate, c_line);
12420 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
12422 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12423 py_code = __Pyx_CreateCodeObjectForTraceback(
12424 funcname, c_line, py_line, filename);
12429 Py_XDECREF(pvalue);
12430 Py_XDECREF(ptraceback);
12433 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12434 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
12436 py_frame = PyFrame_New(
12439 __pyx_mstate_global->__pyx_d,
12442 if (!py_frame)
goto bad;
12443 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
12444 PyTraceBack_Here(py_frame);
12446 Py_XDECREF(py_code);
12447 Py_XDECREF(py_frame);
12452#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
12453 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
12454#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
12455 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
12456#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
12458 func_type value = func_value;\
12459 if (sizeof(target_type) < sizeof(func_type)) {\
12460 if (unlikely(value != (func_type) (target_type) value)) {\
12461 func_type zero = 0;\
12462 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
12463 return (target_type) -1;\
12464 if (is_unsigned && unlikely(value < zero))\
12465 goto raise_neg_overflow;\
12467 goto raise_overflow;\
12470 return (target_type) value;\
12474#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12476 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12477 return ::std::complex< float >(x, y);
12480 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12481 return x + y*(__pyx_t_float_complex)_Complex_I;
12485 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12486 __pyx_t_float_complex
z;
12494#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12496 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12497 return (a.real == b.real) && (a.imag == b.imag);
12499 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12500 __pyx_t_float_complex
z;
12501 z.real = a.real + b.real;
12502 z.imag = a.imag + b.imag;
12505 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12506 __pyx_t_float_complex
z;
12507 z.real = a.real - b.real;
12508 z.imag = a.imag - b.imag;
12511 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12512 __pyx_t_float_complex
z;
12513 z.real = a.real * b.real - a.imag * b.imag;
12514 z.imag = a.real * b.imag + a.imag * b.real;
12518 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12520 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
12521 }
else if (fabsf(b.real) >= fabsf(b.imag)) {
12522 if (b.real == 0 && b.imag == 0) {
12523 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
12525 float r = b.imag / b.real;
12526 float s = (float)(1.0) / (b.real + b.imag *
r);
12527 return __pyx_t_float_complex_from_parts(
12528 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
12531 float r = b.real / b.imag;
12532 float s = (float)(1.0) / (b.imag + b.real *
r);
12533 return __pyx_t_float_complex_from_parts(
12534 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
12538 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12540 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
12542 float denom = b.real * b.real + b.imag * b.imag;
12543 return __pyx_t_float_complex_from_parts(
12544 (a.real * b.real + a.imag * b.imag) / denom,
12545 (a.imag * b.real - a.real * b.imag) / denom);
12549 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
12550 __pyx_t_float_complex
z;
12555 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
12556 return (a.real == 0) && (a.imag == 0);
12558 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
12559 __pyx_t_float_complex
z;
12565 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex
z) {
12566 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12567 return sqrtf(
z.real*
z.real +
z.imag*
z.imag);
12569 return hypotf(
z.real,
z.imag);
12572 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12573 __pyx_t_float_complex
z;
12574 float r, lnr, theta, z_r, z_theta;
12575 if (b.imag == 0 && b.real == (
int)b.real) {
12577 float denom = a.real * a.real + a.imag * a.imag;
12578 a.real = a.real / denom;
12579 a.imag = -a.imag / denom;
12582 switch ((
int)b.real) {
12590 return __Pyx_c_prod_float(a, a);
12592 z = __Pyx_c_prod_float(a, a);
12593 return __Pyx_c_prod_float(
z, a);
12595 z = __Pyx_c_prod_float(a, a);
12596 return __Pyx_c_prod_float(
z,
z);
12602 }
else if ((b.imag == 0) && (a.real >= 0)) {
12603 z.real = powf(a.real, b.real);
12606 }
else if (a.real > 0) {
12611 theta = atan2f(0.0, -1.0);
12614 r = __Pyx_c_abs_float(a);
12615 theta = atan2f(a.imag, a.real);
12618 z_r = expf(lnr * b.real - theta * b.imag);
12619 z_theta = theta * b.real + lnr * b.imag;
12620 z.real = z_r * cosf(z_theta);
12621 z.imag = z_r * sinf(z_theta);
12628#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12630 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
12631 return ::std::complex< double >(x, y);
12634 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
12635 return x + y*(__pyx_t_double_complex)_Complex_I;
12639 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
12640 __pyx_t_double_complex
z;
12648#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12650 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12651 return (a.real == b.real) && (a.imag == b.imag);
12653 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12654 __pyx_t_double_complex
z;
12655 z.real = a.real + b.real;
12656 z.imag = a.imag + b.imag;
12659 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12660 __pyx_t_double_complex
z;
12661 z.real = a.real - b.real;
12662 z.imag = a.imag - b.imag;
12665 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12666 __pyx_t_double_complex
z;
12667 z.real = a.real * b.real - a.imag * b.imag;
12668 z.imag = a.real * b.imag + a.imag * b.real;
12672 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12674 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12675 }
else if (fabs(b.real) >= fabs(b.imag)) {
12676 if (b.real == 0 && b.imag == 0) {
12677 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
12679 double r = b.imag / b.real;
12680 double s = (double)(1.0) / (b.real + b.imag *
r);
12681 return __pyx_t_double_complex_from_parts(
12682 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
12685 double r = b.real / b.imag;
12686 double s = (double)(1.0) / (b.imag + b.real *
r);
12687 return __pyx_t_double_complex_from_parts(
12688 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
12692 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12694 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12696 double denom = b.real * b.real + b.imag * b.imag;
12697 return __pyx_t_double_complex_from_parts(
12698 (a.real * b.real + a.imag * b.imag) / denom,
12699 (a.imag * b.real - a.real * b.imag) / denom);
12703 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
12704 __pyx_t_double_complex
z;
12709 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
12710 return (a.real == 0) && (a.imag == 0);
12712 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
12713 __pyx_t_double_complex
z;
12719 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex
z) {
12720 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12721 return sqrt(
z.real*
z.real +
z.imag*
z.imag);
12723 return hypot(
z.real,
z.imag);
12726 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12727 __pyx_t_double_complex
z;
12728 double r, lnr, theta, z_r, z_theta;
12729 if (b.imag == 0 && b.real == (
int)b.real) {
12731 double denom = a.real * a.real + a.imag * a.imag;
12732 a.real = a.real / denom;
12733 a.imag = -a.imag / denom;
12736 switch ((
int)b.real) {
12744 return __Pyx_c_prod_double(a, a);
12746 z = __Pyx_c_prod_double(a, a);
12747 return __Pyx_c_prod_double(
z, a);
12749 z = __Pyx_c_prod_double(a, a);
12750 return __Pyx_c_prod_double(
z,
z);
12756 }
else if ((b.imag == 0) && (a.real >= 0)) {
12757 z.real = pow(a.real, b.real);
12760 }
else if (a.real > 0) {
12765 theta = atan2(0.0, -1.0);
12768 r = __Pyx_c_abs_double(a);
12769 theta = atan2(a.imag, a.real);
12772 z_r = exp(lnr * b.real - theta * b.imag);
12773 z_theta = theta * b.real + lnr * b.imag;
12774 z.real = z_r * cos(z_theta);
12775 z.imag = z_r * sin(z_theta);
12782#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12784 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double x,
long double y) {
12785 return ::std::complex< long double >(x, y);
12788 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double x,
long double y) {
12789 return x + y*(__pyx_t_long_double_complex)_Complex_I;
12793 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double x,
long double y) {
12794 __pyx_t_long_double_complex
z;
12802#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12804 static CYTHON_INLINE
int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
12805 return (a.real == b.real) && (a.imag == b.imag);
12807 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
12808 __pyx_t_long_double_complex
z;
12809 z.real = a.real + b.real;
12810 z.imag = a.imag + b.imag;
12813 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
12814 __pyx_t_long_double_complex
z;
12815 z.real = a.real - b.real;
12816 z.imag = a.imag - b.imag;
12819 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
12820 __pyx_t_long_double_complex
z;
12821 z.real = a.real * b.real - a.imag * b.imag;
12822 z.imag = a.real * b.imag + a.imag * b.real;
12826 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
12828 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12829 }
else if (fabsl(b.real) >= fabsl(b.imag)) {
12830 if (b.real == 0 && b.imag == 0) {
12831 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
12833 long double r = b.imag / b.real;
12834 long double s = (
long double)(1.0) / (b.real + b.imag *
r);
12835 return __pyx_t_long_double_complex_from_parts(
12836 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
12839 long double r = b.real / b.imag;
12840 long double s = (
long double)(1.0) / (b.imag + b.real *
r);
12841 return __pyx_t_long_double_complex_from_parts(
12842 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
12846 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
12848 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12850 long double denom = b.real * b.real + b.imag * b.imag;
12851 return __pyx_t_long_double_complex_from_parts(
12852 (a.real * b.real + a.imag * b.imag) / denom,
12853 (a.imag * b.real - a.real * b.imag) / denom);
12857 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
12858 __pyx_t_long_double_complex
z;
12863 static CYTHON_INLINE
int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
12864 return (a.real == 0) && (a.imag == 0);
12866 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
12867 __pyx_t_long_double_complex
z;
12873 static CYTHON_INLINE
long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex
z) {
12874 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12875 return sqrtl(
z.real*
z.real +
z.imag*
z.imag);
12877 return hypotl(
z.real,
z.imag);
12880 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
12881 __pyx_t_long_double_complex
z;
12882 long double r, lnr, theta, z_r, z_theta;
12883 if (b.imag == 0 && b.real == (
int)b.real) {
12885 long double denom = a.real * a.real + a.imag * a.imag;
12886 a.real = a.real / denom;
12887 a.imag = -a.imag / denom;
12890 switch ((
int)b.real) {
12898 return __Pyx_c_prod_long__double(a, a);
12900 z = __Pyx_c_prod_long__double(a, a);
12901 return __Pyx_c_prod_long__double(
z, a);
12903 z = __Pyx_c_prod_long__double(a, a);
12904 return __Pyx_c_prod_long__double(
z,
z);
12910 }
else if ((b.imag == 0) && (a.real >= 0)) {
12911 z.real = powl(a.real, b.real);
12914 }
else if (a.real > 0) {
12919 theta = atan2l(0.0, -1.0);
12922 r = __Pyx_c_abs_long__double(a);
12923 theta = atan2l(a.imag, a.real);
12926 z_r = expl(lnr * b.real - theta * b.imag);
12927 z_theta = theta * b.real + lnr * b.imag;
12928 z.real = z_r * cosl(z_theta);
12929 z.imag = z_r * sinl(z_theta);
12936static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x);
12937static int __Pyx_raise_neg_overflow___Pyx_PyLong_As_int(
void) {
12938 const char* type_name =
"int";
12939 PyErr_Format(PyExc_OverflowError,
12940 "can't convert negative value to %.200s", type_name);
12943static int __Pyx_raise_overflow___Pyx_PyLong_As_int(
void) {
12944 const char* type_name =
"int";
12945 PyErr_Format(PyExc_OverflowError,
12946 "value too large to convert to %.200s", type_name);
12949static CYTHON_INLINE
int __Pyx_PyULong___Pyx_PyLong_As_int(PyObject *x) {
12950 const int is_unsigned = 1;
12951#if CYTHON_USE_PYLONG_INTERNALS
12953 const digit* digits = __Pyx_PyLong_Digits(x);
12954 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
12955 if (size == 2 && (8 *
sizeof(
int) > 1 * PyLong_SHIFT)) {
12956 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
12957 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12958 }
else if ((8 *
sizeof(
int) >= 2 * PyLong_SHIFT)) {
12959 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12962 if (size == 3 && (8 *
sizeof(
int) > 2 * PyLong_SHIFT)) {
12963 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
12964 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
12965 }
else if ((8 *
sizeof(
int) >= 3 * PyLong_SHIFT)) {
12966 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12969 if (size == 4 && (8 *
sizeof(
int) > 3 * PyLong_SHIFT)) {
12970 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
12971 __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])))
12972 }
else if ((8 *
sizeof(
int) >= 4 * PyLong_SHIFT)) {
12973 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12978#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
12979 if (unlikely(Py_SIZE(x) < 0)) {
12980 goto raise_neg_overflow;
12984 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
12985 if (unlikely(result < 0))
12987 if (unlikely(result == 1))
12988 goto raise_neg_overflow;
12991 if ((
sizeof(
int) <=
sizeof(
unsigned long))) {
12992 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned long, PyLong_AsUnsignedLong(x))
12993 }
else if ((
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG))) {
12994 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
12996 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
12998 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
13000 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
13002static CYTHON_INLINE
int __Pyx_PySLong___Pyx_PyLong_As_int(PyObject *x) {
13003 const int is_unsigned = 0;
13004#if CYTHON_USE_PYLONG_INTERNALS
13005 if (__Pyx_PyLong_IsNeg(x)) {
13006 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13007 const digit* digits = __Pyx_PyLong_Digits(x);
13008 if (size == 2 && (8 *
sizeof(
int) > 1 * PyLong_SHIFT)) {
13009 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
13010 long ival = - (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
13011 __PYX_VERIFY_RETURN_INT(
int,
long, ival)
13012 }
else if ((8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT)) {
13013 return (
int) (((int) -1) * (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13016 if (size == 3 && (8 *
sizeof(
int) > 2 * PyLong_SHIFT)) {
13017 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
13018 long ival = - (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
13019 __PYX_VERIFY_RETURN_INT(
int,
long, ival)
13020 }
else if ((8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT)) {
13021 return (
int) (((int) -1) * (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13024 if (size == 4 && (8 *
sizeof(
int) > 3 * PyLong_SHIFT)) {
13025 if ((8 *
sizeof(
long) > 4 * PyLong_SHIFT)) {
13026 long ival = - (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
13027 __PYX_VERIFY_RETURN_INT(
int,
long, ival)
13028 }
else if ((8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT)) {
13029 return (
int) (((int) -1) * (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13034 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13035 const digit* digits = __Pyx_PyLong_Digits(x);
13036 if (size == 2 && (8 *
sizeof(
int) > 1 * PyLong_SHIFT)) {
13037 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
13038 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13039 }
else if ((8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT)) {
13040 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13043 if (size == 3 && (8 *
sizeof(
int) > 2 * PyLong_SHIFT)) {
13044 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
13045 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13046 }
else if ((8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT)) {
13047 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13050 if (size == 4 && (8 *
sizeof(
int) > 3 * PyLong_SHIFT)) {
13051 if ((8 *
sizeof(
long) > 4 * PyLong_SHIFT)) {
13052 __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])))
13053 }
else if ((8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT)) {
13054 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13060 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
13061 if ((
sizeof(
int) <=
sizeof(
int)) && (
sizeof(
int) <
sizeof(
long))) {
13062 __PYX_VERIFY_RETURN_INT_EXC(
int,
int, PyLong_AsInt(x))
13065 if ((
sizeof(
int) <=
sizeof(
long))) {
13066 __PYX_VERIFY_RETURN_INT_EXC(
int,
long, PyLong_AsLong(x))
13067 }
else if ((
sizeof(
int) <=
sizeof(PY_LONG_LONG))) {
13068 __PYX_VERIFY_RETURN_INT_EXC(
int, PY_LONG_LONG, PyLong_AsLongLong(x))
13070 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
13072 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
13074 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
13076static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x) {
13077#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13078#pragma GCC diagnostic push
13079#pragma GCC diagnostic ignored "-Wconversion"
13081 const int neg_one = (int) -1, const_zero = (
int) 0;
13082#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13083#pragma GCC diagnostic pop
13085 const int is_unsigned = neg_one > const_zero;
13088#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
13089 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
13090 x, &val,
sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
13091 if (unlikely(bytes_copied == -1)) {
13092 }
else if (unlikely(bytes_copied > (Py_ssize_t)
sizeof(val))) {
13093 goto raise_overflow;
13097#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
13098 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
13099 unsigned char *bytes = (
unsigned char *)&val;
13100 ret = _PyLong_AsByteArray((PyLongObject *)x,
13101 bytes,
sizeof(val),
13102 is_little, !is_unsigned);
13103 if ((0))
goto raise_overflow;
13106 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
13107 int bits, remaining_bits, is_negative = 0;
13108 int chunk_size = (
sizeof(long) < 8) ? 30 : 62;
13109 if (likely(PyLong_CheckExact(x))) {
13110 v = __Pyx_NewRef(x);
13112 v = PyNumber_Long(x);
13113 if (unlikely(!
v))
return (
int) -1;
13114 assert(PyLong_CheckExact(
v));
13117 int result = PyObject_RichCompareBool(
v, Py_False, Py_LT);
13118 if (unlikely(result < 0)) {
13122 is_negative = result == 1;
13124 if (is_unsigned && unlikely(is_negative)) {
13126 PyErr_SetString(PyExc_OverflowError,
13127 "can't convert negative value to int");
13129 }
else if (is_negative) {
13130 stepval = PyNumber_Invert(
v);
13132 if (unlikely(!stepval))
13139 mask = PyLong_FromLong((1L << chunk_size) - 1);
if (unlikely(!mask))
goto done;
13140 shift = PyLong_FromLong(chunk_size);
if (unlikely(!shift))
goto done;
13141 for (bits = 0; bits < (int)
sizeof(int) * 8 - chunk_size; bits += chunk_size) {
13142 PyObject *tmp, *digit;
13144 digit = PyNumber_And(stepval, mask);
13145 if (unlikely(!digit))
goto done;
13146 idigit = PyLong_AsLong(digit);
13148 if (unlikely(idigit < 0))
goto done;
13149 val |= ((int) idigit) << bits;
13150 tmp = PyNumber_Rshift(stepval, shift);
13151 if (unlikely(!tmp))
goto done;
13152 Py_DECREF(stepval); stepval = tmp;
13154 Py_DECREF(shift); shift = NULL;
13155 Py_DECREF(mask); mask = NULL;
13157 long idigit = PyLong_AsLong(stepval);
13158 if (unlikely(idigit < 0))
goto done;
13159 remaining_bits = ((int)
sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
13160 if (unlikely(idigit >= (1L << remaining_bits)))
13161 goto raise_overflow;
13162 val |= ((int) idigit) << bits;
13164 if (!is_unsigned) {
13165 if (unlikely(val & (((
int) 1) << (
sizeof(
int) * 8 - 1))))
13166 goto raise_overflow;
13174 Py_XDECREF(stepval);
13180 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
13182static CYTHON_INLINE
int __Pyx_PyLong___Pyx_PyLong_As_int(PyObject *x) {
13183#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13184#pragma GCC diagnostic push
13185#pragma GCC diagnostic ignored "-Wconversion"
13187 const int neg_one = (int) -1, const_zero = (
int) 0;
13188#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13189#pragma GCC diagnostic pop
13191 const int is_unsigned = neg_one > const_zero;
13193 #if CYTHON_USE_PYLONG_INTERNALS
13194 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
13195 goto raise_neg_overflow;
13196 }
else if (__Pyx_PyLong_IsCompact(x)) {
13197 __PYX_VERIFY_RETURN_INT(
int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
13201 return __Pyx_PyULong___Pyx_PyLong_As_int(x);
13204 #if CYTHON_USE_PYLONG_INTERNALS
13205 if (__Pyx_PyLong_IsCompact(x)) {
13206 __PYX_VERIFY_RETURN_INT(
int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
13210 return __Pyx_PySLong___Pyx_PyLong_As_int(x);
13213#if CYTHON_USE_PYLONG_INTERNALS
13215 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
13217 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
13220static int __Pyx_NonPyLong___Pyx_PyLong_As_int(PyObject *x) {
13222 PyObject *tmp = __Pyx_PyNumber_Long(x);
13223 if (!tmp)
return (
int) -1;
13224 val = __Pyx_PyLong_As_int(tmp);
13228static CYTHON_INLINE
int __Pyx_PyLong_As_int(PyObject *x) {
13229 if (likely(PyLong_Check(x))) {
13230 return __Pyx_PyLong___Pyx_PyLong_As_int(x);
13232 return __Pyx_NonPyLong___Pyx_PyLong_As_int(x);
13237#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
13238static __Pyx_TypeName
13239__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
13241 PyObject *module = NULL, *name = NULL, *result = NULL;
13242 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
13243 name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
13244 __pyx_mstate_global->__pyx_n_u_qualname);
13246 name = PyType_GetQualName(tp);
13248 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name)))
goto bad;
13249 module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
13250 __pyx_mstate_global->__pyx_n_u_module);
13251 if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module)))
goto bad;
13252 if (PyUnicode_CompareWithASCIIString(module,
"builtins") == 0) {
13257 result = PyUnicode_FromFormat(
"%U.%U", module, name);
13258 if (unlikely(result == NULL))
goto bad;
13261 Py_XDECREF(module);
13269 result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_);
13276#if CYTHON_VECTORCALL
13277CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i) {
13278 PyObject *key = __Pyx_PyTuple_GET_ITEM(kwnames, i);
13279#if !CYTHON_ASSUME_SAFE_MACROS
13280 if (unlikely(!key))
return -1;
13282 if (unlikely(!PyUnicode_Check(key))) {
13283 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
13289CYTHON_UNUSED
static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t
n) {
13290 PyObject *out = PyDict_New();
13291 if (unlikely(!out))
return NULL;
13292 for (Py_ssize_t i=0; i<
n; ++i) {
13293 if (unlikely(PyDict_SetItem(out, keys[i], values[i]) < 0)) {
13300CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i) {
13301 PyObject *key = kwnames[i];
13302 if (unlikely(!PyUnicode_Check(key))) {
13303 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
13311#if !CYTHON_VECTORCALL
13312static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *
const *args,
size_t nargsf, PyObject *kwnames) {
13314 PyObject *obj = PyObject_GetAttr(args[0], name);
13315 if (unlikely(!obj))
13317 result = __Pyx_Object_VectorcallKwds(obj, args+1, nargsf-1, kwnames);
13324static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(
long value) {
13325#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13326#pragma GCC diagnostic push
13327#pragma GCC diagnostic ignored "-Wconversion"
13329 const long neg_one = (long) -1, const_zero = (
long) 0;
13330#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13331#pragma GCC diagnostic pop
13333 const int is_unsigned = neg_one > const_zero;
13335 if (
sizeof(
long) <
sizeof(
long)) {
13336 return PyLong_FromLong((
long) value);
13337 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
13338 return PyLong_FromUnsignedLong((
unsigned long) value);
13339#if !CYTHON_COMPILING_IN_PYPY
13340 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
13341 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
13345 if (
sizeof(
long) <=
sizeof(
long)) {
13346 return PyLong_FromLong((
long) value);
13347 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
13348 return PyLong_FromLongLong((PY_LONG_LONG) value);
13352 unsigned char *bytes = (
unsigned char *)&value;
13353#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
13355 return PyLong_FromUnsignedNativeBytes(bytes,
sizeof(value), -1);
13357 return PyLong_FromNativeBytes(bytes,
sizeof(value), -1);
13359#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
13360 int one = 1;
int little = (int)*(
unsigned char *)&one;
13361 return _PyLong_FromByteArray(bytes,
sizeof(
long),
13362 little, !is_unsigned);
13364 int one = 1;
int little = (int)*(
unsigned char *)&one;
13365 PyObject *result = NULL, *kwds = NULL;
13366 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
13367 py_bytes = PyBytes_FromStringAndSize((
char*)bytes,
sizeof(
long));
13368 if (!py_bytes)
goto limited_bad;
13369 from_bytes_str = PyUnicode_FromStringAndSize(
"from_bytes", 10);
13370 if (!from_bytes_str)
goto limited_bad;
13371 order_str = PyUnicode_FromString(little ?
"little" :
"big");
13372 if (!order_str)
goto limited_bad;
13374 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
13375 if (!is_unsigned) {
13376 PyObject *signed_str = PyUnicode_FromStringAndSize(
"signed", 6);
13377 if (!signed_str)
goto limited_bad;
13378#if CYTHON_VECTORCALL
13379 kwds = PyTuple_Pack(1, signed_str);
13382 PyObject *keys[] = {signed_str};
13383 PyObject *values[] = {Py_True};
13384 kwds = __Pyx_MakeKwargDict(keys, values, 1);
13387 Py_DECREF(signed_str);
13388 if (unlikely(!kwds))
goto limited_bad;
13390 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
13394 Py_XDECREF(order_str);
13395 Py_XDECREF(py_bytes);
13396 Py_XDECREF(from_bytes_str);
13403static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x);
13404static long __Pyx_raise_neg_overflow___Pyx_PyLong_As_long(
void) {
13405 const char* type_name =
"long";
13406 PyErr_Format(PyExc_OverflowError,
13407 "can't convert negative value to %.200s", type_name);
13410static long __Pyx_raise_overflow___Pyx_PyLong_As_long(
void) {
13411 const char* type_name =
"long";
13412 PyErr_Format(PyExc_OverflowError,
13413 "value too large to convert to %.200s", type_name);
13416static CYTHON_INLINE
long __Pyx_PyULong___Pyx_PyLong_As_long(PyObject *x) {
13417 const int is_unsigned = 1;
13418#if CYTHON_USE_PYLONG_INTERNALS
13420 const digit* digits = __Pyx_PyLong_Digits(x);
13421 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13422 if (size == 2 && (8 *
sizeof(
long) > 1 * PyLong_SHIFT)) {
13423 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
13424 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13425 }
else if ((8 *
sizeof(
long) >= 2 * PyLong_SHIFT)) {
13426 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13429 if (size == 3 && (8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
13430 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
13431 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13432 }
else if ((8 *
sizeof(
long) >= 3 * PyLong_SHIFT)) {
13433 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13436 if (size == 4 && (8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
13437 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
13438 __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])))
13439 }
else if ((8 *
sizeof(
long) >= 4 * PyLong_SHIFT)) {
13440 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13445#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
13446 if (unlikely(Py_SIZE(x) < 0)) {
13447 goto raise_neg_overflow;
13451 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
13452 if (unlikely(result < 0))
13454 if (unlikely(result == 1))
13455 goto raise_neg_overflow;
13458 if ((
sizeof(
long) <=
sizeof(
unsigned long))) {
13459 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned long, PyLong_AsUnsignedLong(x))
13460 }
else if ((
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG))) {
13461 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
13463 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
13465 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
13467 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
13469static CYTHON_INLINE
long __Pyx_PySLong___Pyx_PyLong_As_long(PyObject *x) {
13470 const int is_unsigned = 0;
13471#if CYTHON_USE_PYLONG_INTERNALS
13472 if (__Pyx_PyLong_IsNeg(x)) {
13473 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13474 const digit* digits = __Pyx_PyLong_Digits(x);
13475 if (size == 2 && (8 *
sizeof(
long) > 1 * PyLong_SHIFT)) {
13476 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
13477 long ival = - (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
13478 __PYX_VERIFY_RETURN_INT(
long,
long, ival)
13479 }
else if ((8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT)) {
13480 return (
long) (((long) -1) * (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13483 if (size == 3 && (8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
13484 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
13485 long ival = - (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
13486 __PYX_VERIFY_RETURN_INT(
long,
long, ival)
13487 }
else if ((8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT)) {
13488 return (
long) (((long) -1) * (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13491 if (size == 4 && (8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
13492 if ((8 *
sizeof(
long) > 4 * PyLong_SHIFT)) {
13493 long ival = - (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
13494 __PYX_VERIFY_RETURN_INT(
long,
long, ival)
13495 }
else if ((8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT)) {
13496 return (
long) (((long) -1) * (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13501 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13502 const digit* digits = __Pyx_PyLong_Digits(x);
13503 if (size == 2 && (8 *
sizeof(
long) > 1 * PyLong_SHIFT)) {
13504 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
13505 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13506 }
else if ((8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT)) {
13507 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13510 if (size == 3 && (8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
13511 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
13512 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13513 }
else if ((8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT)) {
13514 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13517 if (size == 4 && (8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
13518 if ((8 *
sizeof(
long) > 4 * PyLong_SHIFT)) {
13519 __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])))
13520 }
else if ((8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT)) {
13521 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13527 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
13528 if ((
sizeof(
long) <=
sizeof(
int)) && (
sizeof(
int) <
sizeof(
long))) {
13529 __PYX_VERIFY_RETURN_INT_EXC(
long,
int, PyLong_AsInt(x))
13532 if ((
sizeof(
long) <=
sizeof(
long))) {
13533 __PYX_VERIFY_RETURN_INT_EXC(
long,
long, PyLong_AsLong(x))
13534 }
else if ((
sizeof(
long) <=
sizeof(PY_LONG_LONG))) {
13535 __PYX_VERIFY_RETURN_INT_EXC(
long, PY_LONG_LONG, PyLong_AsLongLong(x))
13537 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
13539 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
13541 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
13543static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x) {
13544#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13545#pragma GCC diagnostic push
13546#pragma GCC diagnostic ignored "-Wconversion"
13548 const long neg_one = (long) -1, const_zero = (
long) 0;
13549#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13550#pragma GCC diagnostic pop
13552 const int is_unsigned = neg_one > const_zero;
13555#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
13556 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
13557 x, &val,
sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
13558 if (unlikely(bytes_copied == -1)) {
13559 }
else if (unlikely(bytes_copied > (Py_ssize_t)
sizeof(val))) {
13560 goto raise_overflow;
13564#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
13565 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
13566 unsigned char *bytes = (
unsigned char *)&val;
13567 ret = _PyLong_AsByteArray((PyLongObject *)x,
13568 bytes,
sizeof(val),
13569 is_little, !is_unsigned);
13570 if ((0))
goto raise_overflow;
13573 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
13574 int bits, remaining_bits, is_negative = 0;
13575 int chunk_size = (
sizeof(long) < 8) ? 30 : 62;
13576 if (likely(PyLong_CheckExact(x))) {
13577 v = __Pyx_NewRef(x);
13579 v = PyNumber_Long(x);
13580 if (unlikely(!
v))
return (
long) -1;
13581 assert(PyLong_CheckExact(
v));
13584 int result = PyObject_RichCompareBool(
v, Py_False, Py_LT);
13585 if (unlikely(result < 0)) {
13589 is_negative = result == 1;
13591 if (is_unsigned && unlikely(is_negative)) {
13593 PyErr_SetString(PyExc_OverflowError,
13594 "can't convert negative value to long");
13596 }
else if (is_negative) {
13597 stepval = PyNumber_Invert(
v);
13599 if (unlikely(!stepval))
13606 mask = PyLong_FromLong((1L << chunk_size) - 1);
if (unlikely(!mask))
goto done;
13607 shift = PyLong_FromLong(chunk_size);
if (unlikely(!shift))
goto done;
13608 for (bits = 0; bits < (int)
sizeof(long) * 8 - chunk_size; bits += chunk_size) {
13609 PyObject *tmp, *digit;
13611 digit = PyNumber_And(stepval, mask);
13612 if (unlikely(!digit))
goto done;
13613 idigit = PyLong_AsLong(digit);
13615 if (unlikely(idigit < 0))
goto done;
13616 val |= ((long) idigit) << bits;
13617 tmp = PyNumber_Rshift(stepval, shift);
13618 if (unlikely(!tmp))
goto done;
13619 Py_DECREF(stepval); stepval = tmp;
13621 Py_DECREF(shift); shift = NULL;
13622 Py_DECREF(mask); mask = NULL;
13624 long idigit = PyLong_AsLong(stepval);
13625 if (unlikely(idigit < 0))
goto done;
13626 remaining_bits = ((int)
sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
13627 if (unlikely(idigit >= (1L << remaining_bits)))
13628 goto raise_overflow;
13629 val |= ((long) idigit) << bits;
13631 if (!is_unsigned) {
13632 if (unlikely(val & (((
long) 1) << (
sizeof(
long) * 8 - 1))))
13633 goto raise_overflow;
13641 Py_XDECREF(stepval);
13647 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
13649static CYTHON_INLINE
long __Pyx_PyLong___Pyx_PyLong_As_long(PyObject *x) {
13650#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13651#pragma GCC diagnostic push
13652#pragma GCC diagnostic ignored "-Wconversion"
13654 const long neg_one = (long) -1, const_zero = (
long) 0;
13655#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13656#pragma GCC diagnostic pop
13658 const int is_unsigned = neg_one > const_zero;
13660 #if CYTHON_USE_PYLONG_INTERNALS
13661 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
13662 goto raise_neg_overflow;
13663 }
else if (__Pyx_PyLong_IsCompact(x)) {
13664 __PYX_VERIFY_RETURN_INT(
long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
13668 return __Pyx_PyULong___Pyx_PyLong_As_long(x);
13671 #if CYTHON_USE_PYLONG_INTERNALS
13672 if (__Pyx_PyLong_IsCompact(x)) {
13673 __PYX_VERIFY_RETURN_INT(
long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
13677 return __Pyx_PySLong___Pyx_PyLong_As_long(x);
13680#if CYTHON_USE_PYLONG_INTERNALS
13682 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
13684 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
13687static long __Pyx_NonPyLong___Pyx_PyLong_As_long(PyObject *x) {
13689 PyObject *tmp = __Pyx_PyNumber_Long(x);
13690 if (!tmp)
return (
long) -1;
13691 val = __Pyx_PyLong_As_long(tmp);
13695static CYTHON_INLINE
long __Pyx_PyLong_As_long(PyObject *x) {
13696 if (likely(PyLong_Check(x))) {
13697 return __Pyx_PyLong___Pyx_PyLong_As_long(x);
13699 return __Pyx_NonPyLong___Pyx_PyLong_As_long(x);
13704#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
13705void __Pyx_init_runtime_version(
void) {
13706 if (__Pyx_cached_runtime_version == 0) {
13707 const char* rt_version = Py_GetVersion();
13708 unsigned long version = 0;
13709 unsigned long factor = 0x01000000UL;
13710 unsigned int digit = 0;
13713 while (
'0' <= rt_version[i] && rt_version[i] <=
'9') {
13714 digit = digit * 10 + (
unsigned int) (rt_version[i] -
'0');
13717 version += factor * digit;
13718 if (rt_version[i] !=
'.')
13724 __Pyx_cached_runtime_version = version;
13728static unsigned long __Pyx_get_runtime_version(
void) {
13729#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
13730 return Py_Version & ~0xFFUL;
13732 return __Pyx_cached_runtime_version;
13737static int __Pyx_check_binary_version(
unsigned long ct_version,
unsigned long rt_version,
int allow_newer) {
13738 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
13739 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
13741 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
13745 PyOS_snprintf(message,
sizeof(message),
13746 "compile time Python version %d.%d "
13747 "of module '%.100s' "
13749 "runtime version %d.%d",
13750 (
int) (ct_version >> 24), (
int) ((ct_version >> 16) & 0xFF),
13752 (allow_newer) ?
"was newer than" :
"does not match",
13753 (
int) (rt_version >> 24), (
int) ((rt_version >> 16) & 0xFF)
13755 return PyErr_WarnEx(NULL, message, 1);
13760#if CYTHON_COMPILING_IN_LIMITED_API
13761 static PyObject* __Pyx__PyCode_New(
int a,
int p,
int k,
int l,
int s,
int f,
13762 PyObject *code, PyObject *
c, PyObject*
n, PyObject *
v,
13763 PyObject *fv, PyObject *cell, PyObject* fn,
13764 PyObject *name,
int fline, PyObject *lnos) {
13765 PyObject *exception_table = NULL;
13766 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
13767 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
13768 PyObject *version_info;
13769 PyObject *py_minor_version = NULL;
13771 long minor_version = 0;
13772 #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
13773 minor_version = 11;
13775 if (!(version_info = PySys_GetObject(
"version_info")))
goto end;
13776 if (!(py_minor_version = PySequence_GetItem(version_info, 1)))
goto end;
13777 minor_version = PyLong_AsLong(py_minor_version);
13778 Py_DECREF(py_minor_version);
13779 if (minor_version == -1 && PyErr_Occurred())
goto end;
13781 if (!(types_module = PyImport_ImportModule(
"types")))
goto end;
13782 if (!(code_type = PyObject_GetAttrString(types_module,
"CodeType")))
goto end;
13783 if (minor_version <= 10) {
13784 result = PyObject_CallFunction(code_type,
"iiiiiiOOOOOOiOOO", a,p, k, l,
s,
f, code,
13785 c,
n,
v, fn, name, fline, lnos, fv, cell);
13787 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0)))
goto end;
13788 result = PyObject_CallFunction(code_type,
"iiiiiiOOOOOOOiOOOO", a,p, k, l,
s,
f, code,
13789 c,
n,
v, fn, name, name, fline, lnos, exception_table, fv, cell);
13792 Py_XDECREF(code_type);
13793 Py_XDECREF(exception_table);
13794 Py_XDECREF(types_module);
13796 PyObject *exc_type, *exc_value, *exc_tb;
13797 PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
13798 if (PyErr_WarnFormat(
13799 PyExc_RuntimeWarning, 1,
13800 "Code object creation failed in Cython module: %S\nTry recompiling with a more recent version of Cython.",
13801 exc_value ? exc_value : exc_type) == 0) {
13805 Py_DECREF(exc_type);
13806 Py_XDECREF(exc_value);
13807 Py_XDECREF(exc_tb);
13811#elif PY_VERSION_HEX >= 0x030B0000
13812 static PyCodeObject* __Pyx__PyCode_New(
int a,
int p,
int k,
int l,
int s,
int f,
13813 PyObject *code, PyObject *
c, PyObject*
n, PyObject *
v,
13814 PyObject *fv, PyObject *cell, PyObject* fn,
13815 PyObject *name,
int fline, PyObject *lnos) {
13816 PyCodeObject *result;
13818 #if PY_VERSION_HEX >= 0x030C0000
13819 PyUnstable_Code_NewWithPosOnlyArgs
13821 PyCode_NewWithPosOnlyArgs
13823 (a, p, k, l,
s,
f, code,
c,
n,
v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
13824 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
13825 if (likely(result))
13826 result->_co_firsttraceable = 0;
13830#elif !CYTHON_COMPILING_IN_PYPY
13831 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
13832 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
13834 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
13835 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
13837static PyObject* __Pyx_PyCode_New(
13838 const __Pyx_PyCode_New_function_description descr,
13839 PyObject *
const *varnames,
13840 PyObject *filename,
13841 PyObject *funcname,
13842 PyObject *line_table,
13843 PyObject *tuple_dedup_map
13845 PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
13846 Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
13847 PyObject *varnames_tuple = PyTuple_New(var_count);
13848 if (unlikely(!varnames_tuple))
return NULL;
13849 for (Py_ssize_t i=0; i < var_count; i++) {
13850 Py_INCREF(varnames[i]);
13851 if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0))
goto done;
13853 #if CYTHON_COMPILING_IN_LIMITED_API
13854 varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
13855 if (!varnames_tuple_dedup) {
13856 if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0))
goto done;
13857 varnames_tuple_dedup = varnames_tuple;
13860 varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
13861 if (unlikely(!varnames_tuple_dedup))
goto done;
13863 #if CYTHON_AVOID_BORROWED_REFS
13864 Py_INCREF(varnames_tuple_dedup);
13866 if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
13867 Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
13868 #if !CYTHON_ASSUME_SAFE_SIZE
13869 if (unlikely(line_table_length == -1))
goto done;
13871 Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
13872 code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
13873 if (unlikely(!code_bytes))
goto done;
13874 char* c_code_bytes = PyBytes_AsString(code_bytes);
13875 if (unlikely(!c_code_bytes))
goto done;
13876 memset(c_code_bytes, 0, (
size_t) code_len);
13878 code_obj = (PyObject*) __Pyx__PyCode_New(
13879 (
int) descr.argcount,
13880 (
int) descr.num_posonly_args,
13881 (
int) descr.num_kwonly_args,
13882 (
int) descr.nlocals,
13885 code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
13886 __pyx_mstate_global->__pyx_empty_tuple,
13887 __pyx_mstate_global->__pyx_empty_tuple,
13888 varnames_tuple_dedup,
13889 __pyx_mstate_global->__pyx_empty_tuple,
13890 __pyx_mstate_global->__pyx_empty_tuple,
13893 (
int) descr.first_line,
13894 (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
13897 Py_XDECREF(code_bytes);
13898 #if CYTHON_AVOID_BORROWED_REFS
13899 Py_XDECREF(varnames_tuple_dedup);
13901 Py_DECREF(varnames_tuple);
13907static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString(
const char *
s, Py_ssize_t length,
int algo) {
13908#ifdef __Pyx_DecompressString_UNUSED
13909 CYTHON_UNUSED_VAR(
s);
13910 CYTHON_UNUSED_VAR(length);
13911 CYTHON_UNUSED_VAR(algo);
13914 PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
13915 const char* module_name = algo == 3 ?
"compression.zstd" : algo == 2 ?
"bz2" :
"zlib";
13916 PyObject *methodname = PyUnicode_FromString(
"decompress");
13917 if (unlikely(!methodname))
return NULL;
13918 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
13920 PyObject *fromlist = Py_BuildValue(
"[O]", methodname);
13921 if (unlikely(!fromlist))
goto bad;
13922 module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
13923 Py_DECREF(fromlist);
13926 module = PyImport_ImportModule(module_name);
13927 if (unlikely(!module))
goto import_failed;
13928 decompress = PyObject_GetAttr(module, methodname);
13929 if (unlikely(!decompress))
goto import_failed;
13932 char *memview_bytes =
const_cast<char*
>(
s);
13934 #if defined(__clang__)
13935 #pragma clang diagnostic push
13936 #pragma clang diagnostic ignored "-Wcast-qual"
13937 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
13938 #pragma GCC diagnostic push
13939 #pragma GCC diagnostic ignored "-Wcast-qual"
13941 char *memview_bytes = (
char*)
s;
13942 #if defined(__clang__)
13943 #pragma clang diagnostic pop
13944 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
13945 #pragma GCC diagnostic pop
13948 #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
13949 int memview_flags = 0x100;
13951 int memview_flags = PyBUF_READ;
13953 compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
13955 if (unlikely(!compressed_bytes)) {
13956 Py_DECREF(decompress);
13959 decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
13960 Py_DECREF(compressed_bytes);
13961 Py_DECREF(decompress);
13963 Py_DECREF(methodname);
13964 return decompressed;
13966 PyErr_Format(PyExc_ImportError,
13967 "Failed to import '%.20s.decompress' - cannot initialise module strings. "
13968 "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
13969 module_name, algo);
13971 Py_XDECREF(module);
13972 Py_DECREF(methodname);
13978#ifndef __Pyx_DecompressString_LZSS_UNUSED
13980static CYTHON_SMALL_CODE
size_t __pyx_lzss_decompress(
const uint8_t* src, uint8_t* dst,
size_t dst_len) {
13981 size_t pos = 0, out_pos = 0;
13983 uint32_t flags = src[pos++] | 0xFF00;
13984 while (flags & 0x100) {
13986 dst[out_pos++] = src[pos++];
13988 uint32_t lo = src[pos++], hi = src[pos++];
13989 uint32_t end_offset_of_last_occurrence, match_length;
13990 if (!(lo & 0x80)) {
13991 end_offset_of_last_occurrence = lo;
13993 }
else if (!(hi & 0x80)) {
13994 end_offset_of_last_occurrence = 0x80 + (((hi << 2) & 0x180) | (lo & 0x7F));
13995 match_length = hi & 0x1F;
13997 end_offset_of_last_occurrence = 0x80 + ((hi & 0x7F) << 7 | (lo & 0x7F));
13998 match_length = src[pos++];
14001 size_t ref_pos = out_pos - end_offset_of_last_occurrence - match_length;
14002 memcpy(dst + out_pos, dst + ref_pos, match_length);
14003 out_pos += match_length;
14005 if (out_pos >= dst_len)
return pos;
14011static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString_LZSS(
const char *
s,
size_t compressed_length,
size_t uncompressed_length) {
14012#ifdef __Pyx_DecompressString_LZSS_UNUSED
14013 CYTHON_UNUSED_VAR(
s);
14014 CYTHON_UNUSED_VAR(compressed_length);
14015 CYTHON_UNUSED_VAR(uncompressed_length);
14019 unsigned char *result_data;
14021 result = PyBytes_FromStringAndSize(NULL, (Py_ssize_t) uncompressed_length);
14022 if (unlikely(!result))
return NULL;
14023 result_data = __Pyx_PyBytes_AsWritableUString(result);
14024 if (unlikely(!result_data))
goto bad;
14025 src_length = __pyx_lzss_decompress((
const uint8_t*)
s, result_data, uncompressed_length);
14026 if (unlikely(src_length != compressed_length))
goto decompression_failed;
14028decompression_failed:
14029 PyErr_SetString(PyExc_RuntimeError,
"LZSS string data decompression failed");
14037static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(
const char *
s) {
14038 size_t len = strlen(
s);
14039 if (unlikely(len > (
size_t) PY_SSIZE_T_MAX)) {
14040 PyErr_SetString(PyExc_OverflowError,
"byte string is too long");
14043 return (Py_ssize_t) len;
14045static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
14046 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
14047 if (unlikely(len < 0))
return NULL;
14048 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
14050static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(
const char* c_str) {
14051 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
14052 if (unlikely(len < 0))
return NULL;
14053 return PyByteArray_FromStringAndSize(c_str, len);
14055static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject* o) {
14057 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
14059#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
14060static CYTHON_INLINE
const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
14061 if (unlikely(__Pyx_PyUnicode_READY(o) == -1))
return NULL;
14062#if CYTHON_COMPILING_IN_LIMITED_API
14064 const char* result;
14065 Py_ssize_t unicode_length;
14066 CYTHON_MAYBE_UNUSED_VAR(unicode_length);
14067 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
14068 if (unlikely(PyArg_Parse(o,
"s#", &result, length) < 0))
return NULL;
14070 result = PyUnicode_AsUTF8AndSize(o, length);
14072 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
14073 unicode_length = PyUnicode_GetLength(o);
14074 if (unlikely(unicode_length < 0))
return NULL;
14075 if (unlikely(unicode_length != *length)) {
14076 PyUnicode_AsASCIIString(o);
14083#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
14084 if (likely(PyUnicode_IS_ASCII(o))) {
14085 *length = PyUnicode_GET_LENGTH(o);
14086 return PyUnicode_AsUTF8(o);
14088 PyUnicode_AsASCIIString(o);
14092 return PyUnicode_AsUTF8AndSize(o, length);
14097static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
14098#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
14099 if (PyUnicode_Check(o)) {
14100 return __Pyx_PyUnicode_AsStringAndSize(o, length);
14103 if (PyByteArray_Check(o)) {
14104#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
14105 *length = PyByteArray_GET_SIZE(o);
14106 return PyByteArray_AS_STRING(o);
14108 *length = PyByteArray_Size(o);
14109 if (*length == -1)
return NULL;
14110 return PyByteArray_AsString(o);
14115 int r = PyBytes_AsStringAndSize(o, &result, length);
14116 if (unlikely(
r < 0)) {
14123static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
14124 int is_true = x == Py_True;
14125 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
14126 else return PyObject_IsTrue(x);
14128static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
14130 if (unlikely(!x))
return -1;
14131 retval = __Pyx_PyObject_IsTrue(x);
14135static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
14136 __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
14137 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
14138 if (unlikely(!result_type_name))
goto bad;
14140 if (PyLong_Check(result)) {
14141 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
14142 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME
"). "
14143 "The ability to return an instance of a strict subclass of int is deprecated, "
14144 "and may be removed in a future version of Python.",
14145 result_type_name)) {
14146 __Pyx_DECREF_TypeName(result_type_name);
14149 __Pyx_DECREF_TypeName(result_type_name);
14152 PyErr_Format(PyExc_TypeError,
14153 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME
")",
14155 __Pyx_DECREF_TypeName(result_type_name);
14160static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
14161#if CYTHON_USE_TYPE_SLOTS
14162 PyNumberMethods *m;
14164 PyObject *res = NULL;
14165 if (likely(PyLong_Check(x)))
14166 return __Pyx_NewRef(x);
14167#if CYTHON_USE_TYPE_SLOTS
14168 m = Py_TYPE(x)->tp_as_number;
14169 if (likely(m && m->nb_int)) {
14170 res = m->nb_int(x);
14173 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
14174 res = PyNumber_Long(x);
14178 if (unlikely(!PyLong_CheckExact(res))) {
14179 return __Pyx_PyNumber_LongWrongResultType(res);
14182 else if (!PyErr_Occurred()) {
14183 PyErr_SetString(PyExc_TypeError,
14184 "an integer is required");
14188static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_AsSsize_t(PyObject* b) {
14189 #if CYTHON_USE_PYLONG_INTERNALS
14191 const Py_ssize_t size = __Pyx_PyLong_DigitCount(b);
14192 const int is_neg = __Pyx_PyLong_IsNeg(b);
14193 const digit* digits = __Pyx_PyLong_Digits(b);
14194 if (size == 0)
return 0;
14195 #if SIZEOF_SIZE_T * 8 > 1 * PyLong_SHIFT
14197 ival = (Py_ssize_t) (((
size_t)digits[0]));
14200 #if SIZEOF_SIZE_T * 8 > 2 * PyLong_SHIFT
14202 ival = (Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
14205 #if SIZEOF_SIZE_T * 8 > 3 * PyLong_SHIFT
14207 ival = (Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
14210 #if SIZEOF_SIZE_T * 8 > 4 * PyLong_SHIFT
14212 ival = (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]));
14215 return PyLong_AsSsize_t(b);
14216 return is_neg ? -ival : ival;
14218 return PyLong_AsSsize_t(b);
14221static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
14222 if (likely(PyLong_Check(b))) {
14223 return __Pyx_PyLong_AsSsize_t(b);
14226 PyObject *x = PyNumber_Index(b);
14227 if (unlikely(!x))
return -1;
14228 ival = __Pyx_PyLong_AsSsize_t(x);
14233static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
14234 if (
sizeof(Py_hash_t) ==
sizeof(Py_ssize_t)) {
14235 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
14239 x = PyNumber_Index(o);
14241 ival = PyLong_AsLong(x);
14246static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(
int b) {
14247 CYTHON_UNUSED_VAR(b);
14248 return __Pyx_NewRef(Py_None);
14250static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b) {
14251 return __Pyx_NewRef(b ? Py_True: Py_False);
14253static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(
size_t ival) {
14254 return PyLong_FromSize_t(ival);
14259#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
14260#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14261#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
14262 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
14264 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
14267#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
14268#error "Module state with PEP489 requires atomics. Currently that's one of\
14269 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
14271#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14272#define __Pyx_ModuleStateLookup_Lock()
14273#define __Pyx_ModuleStateLookup_Unlock()
14274#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
14275static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
14276#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
14277#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
14278#elif defined(__cplusplus) && __cplusplus >= 201103L
14280static std::mutex __Pyx_ModuleStateLookup_mutex;
14281#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
14282#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
14283#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
14284#include <threads.h>
14285static mtx_t __Pyx_ModuleStateLookup_mutex;
14286static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
14287static void __Pyx_ModuleStateLookup_initialize_mutex(
void) {
14288 mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
14290#define __Pyx_ModuleStateLookup_Lock()\
14291 call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
14292 mtx_lock(&__Pyx_ModuleStateLookup_mutex)
14293#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
14294#elif defined(HAVE_PTHREAD_H)
14295#include <pthread.h>
14296static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
14297#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
14298#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
14299#elif defined(_WIN32)
14300#include <Windows.h>
14301static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
14302#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
14303#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
14305#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
14306 Requires C standard >= C11, or C++ standard >= C++11,\
14307 or pthreads, or the Windows 32 API, or Python >= 3.13."
14312} __Pyx_InterpreterIdAndModule;
14314 char interpreter_id_as_index;
14316 Py_ssize_t allocated;
14317 __Pyx_InterpreterIdAndModule table[1];
14318} __Pyx_ModuleStateLookupData;
14319#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
14320#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14321static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
14323#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14324static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
14326static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
14328static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
14329 __Pyx_InterpreterIdAndModule* table,
14331 int64_t interpreterId) {
14332 __Pyx_InterpreterIdAndModule* begin = table;
14333 __Pyx_InterpreterIdAndModule* end = begin + count;
14334 if (begin->id == interpreterId) {
14337 while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
14338 __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
14339 if (halfway->id == interpreterId) {
14342 if (halfway->id < interpreterId) {
14348 for (; begin < end; ++begin) {
14349 if (begin->id >= interpreterId)
return begin;
14353static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED
void* dummy) {
14354 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
14355 if (interpreter_id == -1)
return NULL;
14356#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14357 __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
14359 __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
14360 if (likely(data)) {
14361 __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
14362 if (likely(data == new_data)) {
14363 goto read_finished;
14366 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
14367 __Pyx_ModuleStateLookup_Lock();
14368 __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
14369 data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
14370 __Pyx_ModuleStateLookup_Unlock();
14374 __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
14376 __Pyx_InterpreterIdAndModule* found = NULL;
14377 if (unlikely(!data))
goto end;
14378 if (data->interpreter_id_as_index) {
14379 if (interpreter_id < data->count) {
14380 found = data->table+interpreter_id;
14383 found = __Pyx_State_FindModuleStateLookupTableLowerBound(
14384 data->table, data->count, interpreter_id);
14388 PyObject *result=NULL;
14389 if (found && found->id == interpreter_id) {
14390 result = found->module;
14392#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14393 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
14398#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14399static void __Pyx_ModuleStateLookup_wait_until_no_readers(
void) {
14400 while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
14403#define __Pyx_ModuleStateLookup_wait_until_no_readers()
14405static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
14406 Py_ssize_t to_allocate = (*old_data)->allocated;
14407 while (to_allocate <= interpreter_id) {
14408 if (to_allocate == 0) to_allocate = 1;
14409 else to_allocate *= 2;
14411 __Pyx_ModuleStateLookupData *new_data = *old_data;
14412 if (to_allocate != (*old_data)->allocated) {
14413 new_data = (__Pyx_ModuleStateLookupData *)realloc(
14415 sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*
sizeof(__Pyx_InterpreterIdAndModule));
14420 for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
14421 new_data->table[i].id = i;
14422 new_data->table[i].module = NULL;
14424 new_data->allocated = to_allocate;
14426 new_data->table[interpreter_id].module =
module;
14427 if (new_data->count < interpreter_id+1) {
14428 new_data->count = interpreter_id+1;
14430 *old_data = new_data;
14433static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
14434 __Pyx_InterpreterIdAndModule *read = data->table;
14435 __Pyx_InterpreterIdAndModule *write = data->table;
14436 __Pyx_InterpreterIdAndModule *end = read + data->count;
14437 for (; read<end; ++read) {
14438 if (read->module) {
14439 write->id = read->id;
14440 write->module = read->module;
14444 data->count = write - data->table;
14445 for (; write<end; ++write) {
14447 write->module = NULL;
14449 data->interpreter_id_as_index = 0;
14451static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED
void* dummy) {
14452 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
14453 if (interpreter_id == -1)
return -1;
14455 __Pyx_ModuleStateLookup_Lock();
14456#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14457 __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
14458 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
14460 __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
14462 __Pyx_ModuleStateLookupData *new_data = old_data;
14464 new_data = (__Pyx_ModuleStateLookupData *)calloc(1,
sizeof(__Pyx_ModuleStateLookupData));
14470 new_data->allocated = 1;
14471 new_data->interpreter_id_as_index = 1;
14473 __Pyx_ModuleStateLookup_wait_until_no_readers();
14474 if (new_data->interpreter_id_as_index) {
14475 if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
14476 result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
14479 __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
14482 Py_ssize_t insert_at = 0;
14484 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
14485 new_data->table, new_data->count, interpreter_id);
14486 assert(lower_bound);
14487 insert_at = lower_bound - new_data->table;
14488 if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
14489 lower_bound->module =
module;
14493 if (new_data->count+1 >= new_data->allocated) {
14494 Py_ssize_t to_allocate = (new_data->count+1)*2;
14496 (__Pyx_ModuleStateLookupData*)realloc(
14498 sizeof(__Pyx_ModuleStateLookupData) +
14499 (to_allocate-1)*
sizeof(__Pyx_InterpreterIdAndModule));
14502 new_data = old_data;
14506 new_data->allocated = to_allocate;
14509 int64_t last_id = interpreter_id;
14510 PyObject *last_module =
module;
14511 for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
14512 int64_t current_id = new_data->table[i].id;
14513 new_data->table[i].id = last_id;
14514 last_id = current_id;
14515 PyObject *current_module = new_data->table[i].module;
14516 new_data->table[i].module = last_module;
14517 last_module = current_module;
14521#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14522 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
14524 __Pyx_ModuleStateLookup_data = new_data;
14526 __Pyx_ModuleStateLookup_Unlock();
14529static int __Pyx_State_RemoveModule(CYTHON_UNUSED
void* dummy) {
14530 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
14531 if (interpreter_id == -1)
return -1;
14532 __Pyx_ModuleStateLookup_Lock();
14533#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14534 __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
14535 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
14537 __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
14539 if (data->interpreter_id_as_index) {
14540 if (interpreter_id < data->count) {
14541 data->table[interpreter_id].module = NULL;
14546 __Pyx_ModuleStateLookup_wait_until_no_readers();
14547 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
14548 data->table, data->count, interpreter_id);
14549 if (!lower_bound)
goto done;
14550 if (lower_bound->id != interpreter_id)
goto done;
14551 __Pyx_InterpreterIdAndModule *end = data->table+data->count;
14552 for (;lower_bound<end-1; ++lower_bound) {
14553 lower_bound->id = (lower_bound+1)->
id;
14554 lower_bound->module = (lower_bound+1)->module;
14558 if (data->count == 0) {
14563#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14564 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
14566 __Pyx_ModuleStateLookup_data = data;
14568 __Pyx_ModuleStateLookup_Unlock();
14575#pragma warning( pop )
void computeCockburnDGlimiterArrays2d(int nElements_global, int nElementBoundaries_element, int nSpace, const int *elementBoundariesArray, const int *elementNeighborsArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, double *alphas, int *alphaNeighbors)
void applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, int allowMinWithUndershoot, int enforcePositivity, double vacuumTol, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
void applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, int allowMinWithUndershoot, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
void applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, double vacuumTol, int nElements_global, int nNodes_element, int nElementBoundaries_element, int nDOF_element, int *elementNodesArray, int *elementNeighborsArray, double *nodeArray, double *elementBarycentersArray, int *l2g, int *tag, double *Uin, double *Uout)
void psiTCtteDT(int nPoints, double tau, double dtn, double dtnm1, double *yn, double *ypn, double *ypnm1, double *dtnp1)
void applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, int allowMinWithUndershoot, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
void applyCockburnDGlimiterP1Lagrange2d(double nu, double Mh2, int nElements_global, int nElementBoundaries_element, int nSpace, int nDOF_element, int *elementNeighborsArray, int *l2g, int *tag, double *alphas, int *alphaNeighbors, double *Uin, double *Uout)
void applyDGlimitingP1Lagrange1d(int limiterFlag, int nElements_global, int nNodes_element, int nElementBoundaries_element, int nDOF_element, int *elementNodesArray, int *elementNeighborsArray, double *nodeArray, double *elementBarycentersArray, int *l2g, int *tag, double *Uin, double *Uout)
void computeElementNeighborShapeGradients(int nElements_global, int nElementBoundaries_element, int nSpace, const int *elementBoundariesArray, const int *elementNeighborsArray, double *elementBarycentersArray, double *elementBoundaryBarycentersArray, double *elementNeighborShapeGradients)
c interface for implementation of time discretization algorithms