Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Karsa Zoltán István
/
politopok
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
676cfe36
authored
Jan 25, 2023
by
Zoltan Karsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
865dbc07
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
epgpu.cu
+8
-7
gpu.py
+1
-0
No files found.
epgpu.cu
View file @
676cfe36
...
@@ -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;
}
}
}
}
...
...
gpu.py
View file @
676cfe36
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment