Compilation fixes
This commit is contained in:
parent
bf0874bbd3
commit
e80cf11f92
@ -389,7 +389,8 @@ cdef void INTERNAL_project_cic_no_mass(npx.ndarray[DTYPE_t, ndim=3] g,
|
||||
npx.ndarray[DTYPE_t, ndim=2] x, int Ngrid, double Lbox, double shifter):
|
||||
cdef double delta_Box = Ngrid/Lbox
|
||||
cdef int i
|
||||
cdef double a[3], c[3]
|
||||
cdef double a[3]
|
||||
cdef double c[3]
|
||||
cdef int b[3]
|
||||
cdef int do_not_put
|
||||
|
||||
@ -421,8 +422,10 @@ cdef void INTERNAL_project_cic_no_mass_periodic(npx.ndarray[DTYPE_t, ndim=3] g,
|
||||
npx.ndarray[DTYPE_t, ndim=2] x, int Ngrid, double Lbox, double shifter):
|
||||
cdef double delta_Box = Ngrid/Lbox
|
||||
cdef int i
|
||||
cdef double a[3], c[3]
|
||||
cdef int b[3], b1[3]
|
||||
cdef double a[3]
|
||||
cdef double c[3]
|
||||
cdef int b[3]
|
||||
cdef int b1[3]
|
||||
cdef int do_not_put
|
||||
cdef DTYPE_t[:,:] ax
|
||||
cdef DTYPE_t[:,:,:] ag
|
||||
@ -462,7 +465,8 @@ cdef void INTERNAL_project_cic_with_mass(npx.ndarray[DTYPE_t, ndim=3] g,
|
||||
int Ngrid, double Lbox, double shifter):
|
||||
cdef double delta_Box = Ngrid/Lbox
|
||||
cdef int i
|
||||
cdef double a[3], c[3]
|
||||
cdef double a[3]
|
||||
cdef double c[3]
|
||||
cdef DTYPE_t m0
|
||||
cdef int b[3]
|
||||
|
||||
@ -499,8 +503,10 @@ cdef void INTERNAL_project_cic_with_mass_periodic(npx.ndarray[DTYPE_t, ndim=3] g
|
||||
cdef double half_Box = 0.5*Lbox, m0
|
||||
cdef double delta_Box = Ngrid/Lbox
|
||||
cdef int i
|
||||
cdef double a[3], c[3]
|
||||
cdef int b[3], b1[3]
|
||||
cdef double a[3]
|
||||
cdef double c[3]
|
||||
cdef int b[3]
|
||||
cdef int b1[3]
|
||||
|
||||
for i in range(x.shape[0]):
|
||||
|
||||
@ -547,18 +553,18 @@ def project_cic(npx.ndarray[DTYPE_t, ndim=2] x not None, npx.ndarray[DTYPE_t, nd
|
||||
if x.shape[1] != 3:
|
||||
raise ValueError("Invalid shape for x array")
|
||||
|
||||
if mass != None and mass.shape[0] != x.shape[0]:
|
||||
if mass is not None and mass.shape[0] != x.shape[0]:
|
||||
raise ValueError("Mass array and coordinate array must have the same number of elements")
|
||||
|
||||
g = np.zeros((Ngrid,Ngrid,Ngrid),dtype=DTYPE)
|
||||
|
||||
if not periodic:
|
||||
if mass == None:
|
||||
if mass is None:
|
||||
INTERNAL_project_cic_no_mass(g, x, Ngrid, Lbox, shifter)
|
||||
else:
|
||||
INTERNAL_project_cic_with_mass(g, x, mass, Ngrid, Lbox, shifter)
|
||||
else:
|
||||
if mass == None:
|
||||
if mass is None:
|
||||
INTERNAL_project_cic_no_mass_periodic(g, x, Ngrid, Lbox, shifter)
|
||||
else:
|
||||
INTERNAL_project_cic_with_mass_periodic(g, x, mass, Ngrid, Lbox, shifter)
|
||||
@ -626,7 +632,8 @@ cdef DTYPE_t cube_integral(DTYPE_t u[3], DTYPE_t u0[3], int r[1], DTYPE_t alpha_
|
||||
@cython.cdivision(True)
|
||||
cdef DTYPE_t cube_integral_trilin(DTYPE_t u[3], DTYPE_t u0[3], int r[1], DTYPE_t vertex_value[8], DTYPE_t alpha_max) nogil:
|
||||
cdef DTYPE_t I, tmp_a
|
||||
cdef DTYPE_t v[3], term[4]
|
||||
cdef DTYPE_t v[3]
|
||||
cdef DTYPE_t term[4]
|
||||
cdef int i, j, q
|
||||
|
||||
j = 0
|
||||
@ -668,7 +675,8 @@ cdef DTYPE_t integrator1(DTYPE_t[:,:,:] density,
|
||||
DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) nogil:
|
||||
cdef DTYPE_t vertex_value[8]
|
||||
cdef DTYPE_t d
|
||||
cdef int a[3][2], i
|
||||
cdef int a[3][2]
|
||||
cdef int i
|
||||
|
||||
for i in xrange(3):
|
||||
a[i][0] = iu0[i]
|
||||
@ -694,7 +702,10 @@ cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density,
|
||||
DTYPE_t min_distance,
|
||||
DTYPE_t max_distance, DTYPE_t[:] shifter, int integrator_id) nogil except? 0:
|
||||
|
||||
cdef DTYPE_t u[3], ifu0[3], u0[3], utot[3]
|
||||
cdef DTYPE_t u[3]
|
||||
cdef DTYPE_t ifu0[3]
|
||||
cdef DTYPE_t u0[3]
|
||||
cdef DTYPE_t utot[3]
|
||||
cdef int u_delta[3]
|
||||
cdef int iu0[3]
|
||||
cdef int i
|
||||
|
Loading…
Reference in New Issue
Block a user