Commit 676cfe36 by Zoltan Karsa

bugfix

parent 865dbc07
...@@ -201,7 +201,7 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys ...@@ -201,7 +201,7 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
vec3 Sv = K + L*k; vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D); int S = stabil_ep(Sv, C, D);
int U = instabil_ep(Sv, C, D); int U = instabil_ep(Sv, C, D);
int H = nyereg_ep(Sv, C, D);; int H = nyereg_ep(Sv, C, D);
if (S > 0 && U > 0 && S + U - H == 2) if (S > 0 && U > 0 && S + U - H == 2)
egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1; egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1;
...@@ -228,9 +228,9 @@ __device__ void BCD_oldal(int v, int w, const vec3& C, const vec3& D, char* egys ...@@ -228,9 +228,9 @@ __device__ void BCD_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
vec3 Sv = K + L*k; vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D); int S = stabil_ep(Sv, C, D);
int U = instabil_ep(Sv, C, D); int U = instabil_ep(Sv, C, D);
int H = 0; int H = nyereg_ep(Sv, C, D);
if (S > 0 && U > 0) if (S > 0 && U > 0 && S + U - H == 2)
egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1; egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1;
} }
} }
...@@ -255,9 +255,9 @@ __device__ void CDA_oldal(int v, int w, const vec3& C, const vec3& D, char* egys ...@@ -255,9 +255,9 @@ __device__ void CDA_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
vec3 Sv = K + L*k; vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D); int S = stabil_ep(Sv, C, D);
int U = instabil_ep(Sv, C, D); int U = instabil_ep(Sv, C, D);
int H = 0; int H = nyereg_ep(Sv, C, D);
if (S > 0 && U > 0) if (S > 0 && U > 0 && S + U - H == 2)
egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1; egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1;
} }
} }
...@@ -282,8 +282,9 @@ __device__ void DAB_oldal(int v, int w, const vec3& C, const vec3& D, char* egys ...@@ -282,8 +282,9 @@ __device__ void DAB_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
vec3 Sv = K + L*k; vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D); int S = stabil_ep(Sv, C, D);
int U = instabil_ep(Sv, C, D); int U = instabil_ep(Sv, C, D);
int H = 0; int H = nyereg_ep(Sv, C, D);
if (S > 0 && U > 0)
if (S > 0 && U > 0 && S + U - H == 2)
egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1; egysulyi_mtx[pos*16+(S-1)*4+(U-1)] = 1;
} }
} }
......
...@@ -10,6 +10,7 @@ fun = ep_pontok_module.get_function(kers[0]) ...@@ -10,6 +10,7 @@ fun = ep_pontok_module.get_function(kers[0])
def start_kernel(Cx, Cy, Dx, Dy, Dz, v, w): def start_kernel(Cx, Cy, Dx, Dy, Dz, v, w):
print("Res size (byte): ", Cx.size*Dx.size*4*4) print("Res size (byte): ", Cx.size*Dx.size*4*4)
print(Cx.size, ",", Cy.size, ",", Dx.size, ",", Dy.size, ",", Dz.size)
egyensulyi_mtx = cp.zeros((Cx.size*Dx.size, 4, 4), dtype=cp.int8) egyensulyi_mtx = cp.zeros((Cx.size*Dx.size, 4, 4), dtype=cp.int8)
numBlock = int((Cx.size*Dx.size + 256 - 1) / 256) numBlock = int((Cx.size*Dx.size + 256 - 1) / 256)
fun((numBlock,), (256,), (v, w, Cx, Cy, Dx, Dy, Dz, Cx.size, Dx.size, egyensulyi_mtx)) fun((numBlock,), (256,), (v, w, Cx, Cy, Dx, Dy, Dz, Cx.size, Dx.size, egyensulyi_mtx))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment