From 138ba3e6fa01769725a7be733f42a1826ecad6ba Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 1 Nov 2024 17:09:39 +0200 Subject: [PATCH] fix: add missing source --- sphereproj/copy.pxd | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sphereproj/copy.pxd diff --git a/sphereproj/copy.pxd b/sphereproj/copy.pxd new file mode 100644 index 0000000..182bbba --- /dev/null +++ b/sphereproj/copy.pxd @@ -0,0 +1,22 @@ +cimport cython +cimport numpy as npx + +ctypedef fused sum_type: + cython.int + cython.float + npx.uint64_t + npx.uint32_t + +@cython.boundscheck(False) +cdef inline sum_type _mysum(sum_type[:] jobs) nogil: + cdef sum_type s + cdef npx.uint64_t N + cdef int i + + s = 0 + N = jobs.shape[0] + for i in xrange(N): + s += jobs[i] + return s + +