mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
Update cosmotool 2nd part
This commit is contained in:
parent
64e05fc180
commit
003bc39d4a
70 changed files with 8708 additions and 0 deletions
22
external/cosmotool/python/copy.pxd
vendored
Normal file
22
external/cosmotool/python/copy.pxd
vendored
Normal file
|
@ -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
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue