From d3d519b21d932a9c77560c0da807624303e9913f Mon Sep 17 00:00:00 2001 From: Stefan714 Date: Thu, 24 Oct 2024 15:52:09 +0200 Subject: [PATCH] update --- pyiga/assemble_tools_cy.pyx | 28 ++++++------- pyiga/assemblers.pyx | 84 ++++++++++++++++++------------------- pyiga/fast_assemble_cy.pyx | 7 ++-- pyiga/genericasm.pxi | 30 ++++++------- 4 files changed, 74 insertions(+), 75 deletions(-) diff --git a/pyiga/assemble_tools_cy.pyx b/pyiga/assemble_tools_cy.pyx index 1e6b0cc3..d0c71f5f 100644 --- a/pyiga/assemble_tools_cy.pyx +++ b/pyiga/assemble_tools_cy.pyx @@ -27,13 +27,13 @@ import itertools @cython.boundscheck(False) @cython.wraparound(False) @cython.cdivision(True) -cdef inline void from_seq1(size_t i, size_t[1] ndofs, size_t[1] out) nogil: +cdef void from_seq1(size_t i, size_t[1] ndofs, size_t[1] out) noexcept nogil: out[0] = i @cython.boundscheck(False) @cython.wraparound(False) @cython.cdivision(True) -cdef inline void from_seq2(size_t i, size_t[2] ndofs, size_t[2] out) nogil: +cdef void from_seq2(size_t i, size_t[2] ndofs, size_t[2] out) noexcept nogil: out[1] = i % ndofs[1] i /= ndofs[1] out[0] = i @@ -41,7 +41,7 @@ cdef inline void from_seq2(size_t i, size_t[2] ndofs, size_t[2] out) nogil: @cython.boundscheck(False) @cython.wraparound(False) @cython.cdivision(True) -cdef inline void from_seq3(size_t i, size_t[3] ndofs, size_t[3] out) nogil: +cdef void from_seq3(size_t i, size_t[3] ndofs, size_t[3] out) noexcept nogil: out[2] = i % ndofs[2] i /= ndofs[2] out[1] = i % ndofs[1] @@ -146,24 +146,24 @@ cdef struct IntInterval: int a int b -cdef IntInterval make_intv(int a, int b) nogil: +cdef IntInterval make_intv(int a, int b) noexcept nogil: cdef IntInterval intv intv.a = a intv.b = b return intv -cdef IntInterval intersect_intervals(IntInterval intva, IntInterval intvb) nogil: +cdef IntInterval intersect_intervals(IntInterval intva, IntInterval intvb) noexcept nogil: return make_intv(max(intva.a, intvb.a), min(intva.b, intvb.b)) -cdef int next_lexicographic1(size_t[1] cur, size_t start[1], size_t end[1]) nogil: +cdef int next_lexicographic1(size_t[1] cur, size_t start[1], size_t end[1]) noexcept nogil: cur[0] += 1 if cur[0] == end[0]: return 0 else: return 1 -cdef int next_lexicographic2(size_t[2] cur, size_t start[2], size_t end[2]) nogil: +cdef int next_lexicographic2(size_t[2] cur, size_t start[2], size_t end[2]) noexcept nogil: cdef size_t i for i in reversed(range(2)): cur[i] += 1 @@ -175,7 +175,7 @@ cdef int next_lexicographic2(size_t[2] cur, size_t start[2], size_t end[2]) nogi else: return 1 -cdef int next_lexicographic3(size_t[3] cur, size_t start[3], size_t end[3]) nogil: +cdef int next_lexicographic3(size_t[3] cur, size_t start[3], size_t end[3]) noexcept nogil: cdef size_t i for i in reversed(range(3)): cur[i] += 1 @@ -189,7 +189,7 @@ cdef int next_lexicographic3(size_t[3] cur, size_t start[3], size_t end[3]) nogi @cython.boundscheck(False) @cython.wraparound(False) -cdef IntInterval find_joint_support_functions(ssize_t[:,::1] meshsupp, long i) nogil: +cdef IntInterval find_joint_support_functions(ssize_t[:,::1] meshsupp, long i) noexcept nogil: cdef long j, n, minj, maxj minj = j = i while j >= 0 and meshsupp[j,1] > meshsupp[i,0]: @@ -251,7 +251,7 @@ def inverses(X): @cython.boundscheck(False) @cython.wraparound(False) @cython.cdivision(True) -cdef double[:,:,:,::1] det_and_inv_2x2(double[:,:,:,::1] X, double[:,::1] det_out): +cdef double[:,:,:,::1] det_and_inv_2x2(double[:,:,:,::1] X, double[:,::1] det_out) noexcept: cdef long m,n, i,j cdef double det, a,b,c,d m,n = X.shape[0], X.shape[1] @@ -271,7 +271,7 @@ cdef double[:,:,:,::1] det_and_inv_2x2(double[:,:,:,::1] X, double[:,::1] det_ou @cython.boundscheck(False) @cython.wraparound(False) @cython.cdivision(True) -cdef double[:,:,:,::1] inverses_2x2(double[:,:,:,::1] X): +cdef double[:,:,:,::1] inverses_2x2(double[:,:,:,::1] X) noexcept: cdef size_t m,n, i,j cdef double det, a,b,c,d m,n = X.shape[0], X.shape[1] @@ -292,7 +292,7 @@ cdef double[:,:,:,::1] inverses_2x2(double[:,:,:,::1] X): @cython.boundscheck(False) @cython.wraparound(False) @cython.cdivision(True) -cdef double[:,:,:,:,::1] det_and_inv_3x3(double[:,:,:,:,::1] X, double[:,:,::1] det_out): +cdef double[:,:,:,:,::1] det_and_inv_3x3(double[:,:,:,:,::1] X, double[:,:,::1] det_out) noexcept: cdef long n0, n1, n2, i0, i1, i2 cdef double det, invdet n0,n1,n2 = X.shape[0], X.shape[1], X.shape[2] @@ -329,7 +329,7 @@ cdef double[:,:,:,:,::1] det_and_inv_3x3(double[:,:,:,:,::1] X, double[:,:,::1] @cython.boundscheck(False) @cython.wraparound(False) -cdef double[:,:,::1] determinants_3x3(double[:,:,:,:,::1] X): +cdef double[:,:,::1] determinants_3x3(double[:,:,:,:,::1] X) noexcept: cdef size_t n0, n1, n2, i0, i1, i2 n0,n1,n2 = X.shape[0], X.shape[1], X.shape[2] @@ -349,7 +349,7 @@ cdef double[:,:,::1] determinants_3x3(double[:,:,:,:,::1] X): @cython.boundscheck(False) @cython.wraparound(False) @cython.cdivision(True) -cdef double[:,:,:,:,::1] inverses_3x3(double[:,:,:,:,::1] X): +cdef double[:,:,:,:,::1] inverses_3x3(double[:,:,:,:,::1] X) noexcept: cdef size_t n0, n1, n2, i0, i1, i2 cdef double det, invdet n0,n1,n2 = X.shape[0], X.shape[1], X.shape[2] diff --git a/pyiga/assemblers.pyx b/pyiga/assemblers.pyx index d1f41c27..2b2312e1 100644 --- a/pyiga/assemblers.pyx +++ b/pyiga/assemblers.pyx @@ -92,7 +92,7 @@ cdef class MassAssembler2D(BaseAssembler2D): double[:, :, ::1] _temp_fields, # output double[:, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double* fields cdef double* temp_fields @@ -120,7 +120,7 @@ cdef class MassAssembler2D(BaseAssembler2D): double* VDu0, double* VDu1, double* VDv0, double* VDv1, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double* fields @@ -137,7 +137,7 @@ cdef class MassAssembler2D(BaseAssembler2D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[2] cdef size_t g_end[2] @@ -240,7 +240,7 @@ cdef class StiffnessAssembler2D(BaseAssembler2D): double[:, :, ::1] _temp_fields, # output double[:, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double _tmp2 cdef double W @@ -285,7 +285,7 @@ cdef class StiffnessAssembler2D(BaseAssembler2D): double* VDu0, double* VDu1, double* VDv0, double* VDv1, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double _du_10 @@ -314,7 +314,7 @@ cdef class StiffnessAssembler2D(BaseAssembler2D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[2] cdef size_t g_end[2] @@ -418,7 +418,7 @@ cdef class HeatAssembler_ST2D(BaseAssembler2D): double[:, :, ::1] _temp_fields, # output double[:, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double _tmp2 cdef double _tmp1 @@ -457,7 +457,7 @@ cdef class HeatAssembler_ST2D(BaseAssembler2D): double* VDu0, double* VDu1, double* VDv0, double* VDv1, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double _du_10 @@ -483,7 +483,7 @@ cdef class HeatAssembler_ST2D(BaseAssembler2D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[2] cdef size_t g_end[2] @@ -587,7 +587,7 @@ cdef class WaveAssembler_ST2D(BaseAssembler2D): double[:, :, ::1] _temp_fields, # output double[:, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double _tmp2 cdef double _tmp1 @@ -626,7 +626,7 @@ cdef class WaveAssembler_ST2D(BaseAssembler2D): double* VDu0, double* VDu1, double* VDv0, double* VDv1, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double _du_02 @@ -655,7 +655,7 @@ cdef class WaveAssembler_ST2D(BaseAssembler2D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[2] cdef size_t g_end[2] @@ -760,7 +760,7 @@ cdef class DivDivAssembler2D(BaseVectorAssembler2D): double[:, :, ::1] _temp_fields, # output double[:, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double _tmp2 cdef double _tmp1 @@ -799,7 +799,7 @@ cdef class DivDivAssembler2D(BaseVectorAssembler2D): double* VDu0, double* VDu1, double* VDv0, double* VDv1, double result[] - ) nogil: + ) noexcept nogil: cdef double* r = [ 0.0, 0.0, 0.0, 0.0 ] cdef double _du_10 @@ -846,7 +846,7 @@ cdef class DivDivAssembler2D(BaseVectorAssembler2D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[2] cdef size_t g_end[2] @@ -952,7 +952,7 @@ cdef class L2FunctionalAssembler2D(BaseAssembler2D): double[:, :, ::1] _temp_fields, # output double[:, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double* fields cdef double* temp_fields @@ -979,7 +979,7 @@ cdef class L2FunctionalAssembler2D(BaseAssembler2D): double[:, :, :] _fields, double* VDu0, double* VDu1, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double* fields @@ -996,7 +996,7 @@ cdef class L2FunctionalAssembler2D(BaseAssembler2D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[2] cdef size_t g_end[2] @@ -1090,7 +1090,7 @@ cdef class L2FunctionalAssemblerPhys2D(BaseAssembler2D): double[:, :, ::1] _temp_fields, # output double[:, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double* fields cdef double* temp_fields @@ -1117,7 +1117,7 @@ cdef class L2FunctionalAssemblerPhys2D(BaseAssembler2D): double[:, :, :] _fields, double* VDu0, double* VDu1, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double* fields @@ -1134,7 +1134,7 @@ cdef class L2FunctionalAssemblerPhys2D(BaseAssembler2D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[2] cdef size_t g_end[2] @@ -1229,7 +1229,7 @@ cdef class MassAssembler3D(BaseAssembler3D): double[:, :, :, ::1] _temp_fields, # output double[:, :, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double* fields cdef double* temp_fields @@ -1259,7 +1259,7 @@ cdef class MassAssembler3D(BaseAssembler3D): double* VDu0, double* VDu1, double* VDu2, double* VDv0, double* VDv1, double* VDv2, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double* fields @@ -1278,7 +1278,7 @@ cdef class MassAssembler3D(BaseAssembler3D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[3] cdef size_t g_end[3] @@ -1395,7 +1395,7 @@ cdef class StiffnessAssembler3D(BaseAssembler3D): double[:, :, :, ::1] _temp_fields, # output double[:, :, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double _tmp3 cdef double _tmp4 @@ -1459,7 +1459,7 @@ cdef class StiffnessAssembler3D(BaseAssembler3D): double* VDu0, double* VDu1, double* VDu2, double* VDv0, double* VDv1, double* VDv2, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double _du_100 @@ -1496,7 +1496,7 @@ cdef class StiffnessAssembler3D(BaseAssembler3D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[3] cdef size_t g_end[3] @@ -1614,7 +1614,7 @@ cdef class HeatAssembler_ST3D(BaseAssembler3D): double[:, :, :, ::1] _temp_fields, # output double[:, :, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double _tmp3 cdef double _tmp4 @@ -1669,7 +1669,7 @@ cdef class HeatAssembler_ST3D(BaseAssembler3D): double* VDu0, double* VDu1, double* VDu2, double* VDv0, double* VDv1, double* VDv2, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double _du_100 @@ -1703,7 +1703,7 @@ cdef class HeatAssembler_ST3D(BaseAssembler3D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[3] cdef size_t g_end[3] @@ -1821,7 +1821,7 @@ cdef class WaveAssembler_ST3D(BaseAssembler3D): double[:, :, :, ::1] _temp_fields, # output double[:, :, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double _tmp3 cdef double _tmp4 @@ -1876,7 +1876,7 @@ cdef class WaveAssembler_ST3D(BaseAssembler3D): double* VDu0, double* VDu1, double* VDu2, double* VDv0, double* VDv1, double* VDv2, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double _du_002 @@ -1913,7 +1913,7 @@ cdef class WaveAssembler_ST3D(BaseAssembler3D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[3] cdef size_t g_end[3] @@ -2032,7 +2032,7 @@ cdef class DivDivAssembler3D(BaseVectorAssembler3D): double[:, :, :, ::1] _temp_fields, # output double[:, :, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double _tmp9 cdef double _tmp10 @@ -2087,7 +2087,7 @@ cdef class DivDivAssembler3D(BaseVectorAssembler3D): double* VDu0, double* VDu1, double* VDu2, double* VDv0, double* VDv1, double* VDv2, double result[] - ) nogil: + ) noexcept nogil: cdef double* r = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] cdef double _du_100 @@ -2158,7 +2158,7 @@ cdef class DivDivAssembler3D(BaseVectorAssembler3D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[3] cdef size_t g_end[3] @@ -2278,7 +2278,7 @@ cdef class L2FunctionalAssembler3D(BaseAssembler3D): double[:, :, :, ::1] _temp_fields, # output double[:, :, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double* fields cdef double* temp_fields @@ -2307,7 +2307,7 @@ cdef class L2FunctionalAssembler3D(BaseAssembler3D): double[:, :, :, :] _fields, double* VDu0, double* VDu1, double* VDu2, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double* fields @@ -2326,7 +2326,7 @@ cdef class L2FunctionalAssembler3D(BaseAssembler3D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[3] cdef size_t g_end[3] @@ -2429,7 +2429,7 @@ cdef class L2FunctionalAssemblerPhys3D(BaseAssembler3D): double[:, :, :, ::1] _temp_fields, # output double[:, :, :, ::1] _fields, - ) nogil: + ) noexcept nogil: cdef double GaussWeight cdef double* fields cdef double* temp_fields @@ -2458,7 +2458,7 @@ cdef class L2FunctionalAssemblerPhys3D(BaseAssembler3D): double[:, :, :, :] _fields, double* VDu0, double* VDu1, double* VDu2, double result[] - ) nogil: + ) noexcept nogil: cdef double r = 0.0 cdef double* fields @@ -2477,7 +2477,7 @@ cdef class L2FunctionalAssemblerPhys3D(BaseAssembler3D): @cython.boundscheck(False) @cython.wraparound(False) @cython.initializedcheck(False) - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: cdef IntInterval intv cdef size_t g_sta[3] cdef size_t g_end[3] diff --git a/pyiga/fast_assemble_cy.pyx b/pyiga/fast_assemble_cy.pyx index 02d99209..6abadc6f 100644 --- a/pyiga/fast_assemble_cy.pyx +++ b/pyiga/fast_assemble_cy.pyx @@ -19,7 +19,7 @@ cdef extern void fast_assemble_2d_cimpl "fast_assemble_2d"( size_t n1, int bw1, double tol, int maxiter, int skipcount, int tolcount, int verbose, - vector[size_t]& entries_i, vector[size_t]& entries_j, vector[double]& entries) + vector[size_t]& entries_i, vector[size_t]& entries_j, vector[double]& entries) noexcept cdef extern void fast_assemble_3d_cimpl "fast_assemble_3d"( MatrixEntryFn entryfunc, void * data, @@ -28,14 +28,13 @@ cdef extern void fast_assemble_3d_cimpl "fast_assemble_3d"( size_t n2, int bw2, double tol, int maxiter, int skipcount, int tolcount, int verbose, - vector[size_t]& entries_i, vector[size_t]& entries_j, vector[double]& entries) + vector[size_t]& entries_i, vector[size_t]& entries_j, vector[double]& entries) noexcept # # Imports end # - # this is so that IPython notebooks can capture the output -cdef void _stdout_log_func(char * s, size_t nbytes): +cdef void _stdout_log_func(const char * s, size_t nbytes) noexcept: import sys sys.stdout.write(s[:nbytes].decode('ascii')) diff --git a/pyiga/genericasm.pxi b/pyiga/genericasm.pxi index 6e69e397..5c76f8c6 100644 --- a/pyiga/genericasm.pxi +++ b/pyiga/genericasm.pxi @@ -27,7 +27,7 @@ cdef class _CommonBase1D: cdef class BaseAssembler1D(_CommonBase1D): - cdef void entry_impl(self, size_t[1] i, size_t[1] j, double result[]) nogil: + cdef void entry_impl(self, size_t[1] i, size_t[1] j, double result[]) noexcept nogil: pass cpdef double entry1(self, size_t i): @@ -55,7 +55,7 @@ cdef class BaseAssembler1D(_CommonBase1D): @cython.boundscheck(False) @cython.wraparound(False) - cdef void multi_entries_chunk(self, size_t[:,::1] idx_arr, double[::1] out) nogil: + cdef void multi_entries_chunk(self, size_t[:,::1] idx_arr, double[::1] out) noexcept nogil: if self.arity != 2: return cdef size_t[1] I, J @@ -158,12 +158,12 @@ cdef class BaseVectorAssembler1D(_CommonBase1D): def num_components(self): return self.numcomp[0], self.numcomp[1] - cdef void entry_impl(self, size_t[1] i, size_t[1] j, double result[]) nogil: + cdef void entry_impl(self, size_t[1] i, size_t[1] j, double result[]) noexcept nogil: pass @cython.boundscheck(False) @cython.wraparound(False) - cdef void multi_blocks_chunk(self, size_t[:,::1] idx_arr, double[:,:,::1] out) nogil: + cdef void multi_blocks_chunk(self, size_t[:,::1] idx_arr, double[:,:,::1] out) noexcept nogil: if self.arity != 2: return cdef size_t[1] I, J @@ -279,7 +279,7 @@ cdef void _asm_core_vec_1d_kernel( size_t[2] numcomp, double[:, ::1] entries, long _mu0 -) nogil: +) noexcept nogil: cdef size_t[1] i, j cdef int diag0 cdef long mu0, MU0 @@ -336,7 +336,7 @@ cdef class _CommonBase2D: cdef class BaseAssembler2D(_CommonBase2D): - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: pass cpdef double entry1(self, size_t i): @@ -364,7 +364,7 @@ cdef class BaseAssembler2D(_CommonBase2D): @cython.boundscheck(False) @cython.wraparound(False) - cdef void multi_entries_chunk(self, size_t[:,::1] idx_arr, double[::1] out) nogil: + cdef void multi_entries_chunk(self, size_t[:,::1] idx_arr, double[::1] out) noexcept nogil: if self.arity != 2: return cdef size_t[2] I, J @@ -467,12 +467,12 @@ cdef class BaseVectorAssembler2D(_CommonBase2D): def num_components(self): return self.numcomp[0], self.numcomp[1] - cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) nogil: + cdef void entry_impl(self, size_t[2] i, size_t[2] j, double result[]) noexcept nogil: pass @cython.boundscheck(False) @cython.wraparound(False) - cdef void multi_blocks_chunk(self, size_t[:,::1] idx_arr, double[:,:,::1] out) nogil: + cdef void multi_blocks_chunk(self, size_t[:,::1] idx_arr, double[:,:,::1] out) noexcept nogil: if self.arity != 2: return cdef size_t[2] I, J @@ -589,7 +589,7 @@ cdef void _asm_core_vec_2d_kernel( size_t[2] numcomp, double[:, :, ::1] entries, long _mu0 -) nogil: +) noexcept nogil: cdef size_t[2] i, j cdef int diag0, diag1 cdef long mu0, mu1, MU0, MU1 @@ -660,7 +660,7 @@ cdef class _CommonBase3D: cdef class BaseAssembler3D(_CommonBase3D): - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: pass cpdef double entry1(self, size_t i): @@ -688,7 +688,7 @@ cdef class BaseAssembler3D(_CommonBase3D): @cython.boundscheck(False) @cython.wraparound(False) - cdef void multi_entries_chunk(self, size_t[:,::1] idx_arr, double[::1] out) nogil: + cdef void multi_entries_chunk(self, size_t[:,::1] idx_arr, double[::1] out) noexcept nogil: if self.arity != 2: return cdef size_t[3] I, J @@ -791,12 +791,12 @@ cdef class BaseVectorAssembler3D(_CommonBase3D): def num_components(self): return self.numcomp[0], self.numcomp[1] - cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) nogil: + cdef void entry_impl(self, size_t[3] i, size_t[3] j, double result[]) noexcept nogil: pass @cython.boundscheck(False) @cython.wraparound(False) - cdef void multi_blocks_chunk(self, size_t[:,::1] idx_arr, double[:,:,::1] out) nogil: + cdef void multi_blocks_chunk(self, size_t[:,::1] idx_arr, double[:,:,::1] out) noexcept nogil: if self.arity != 2: return cdef size_t[3] I, J @@ -914,7 +914,7 @@ cdef void _asm_core_vec_3d_kernel( size_t[2] numcomp, double[:, :, :, ::1] entries, long _mu0 -) nogil: +) noexcept nogil: cdef size_t[3] i, j cdef int diag0, diag1, diag2 cdef long mu0, mu1, mu2, MU0, MU1, MU2