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
6ad6141f
authored
Feb 08, 2023
by
Zoltan Karsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
650b979a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
epgpu.cu
+18
-18
No files found.
epgpu.cu
View file @
6ad6141f
...
...
@@ -86,7 +86,7 @@ __device__ inline bool intriangle(const vec3& Q, const vec3& A, const vec3& B, c
__device__ inline int stabil_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(
0, 0, 1
.0);
vec3 A(0, 0, 0), B(
1.0, 0, 0
.0);
// ABC oldal:
vec3 planeNN = normalize(cross(B-A, C-A));
vec3 P = intersection(planeNN, A, S);
...
...
@@ -128,7 +128,7 @@ __device__ inline bool instabil_ell(const vec3& S, const vec3& X, const vec3& A,
__device__ inline int instabil_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(
0, 0, 1
.0);
vec3 A(0, 0, 0), B(
1.0, 0, 0
.0);
// D CSUCSNAL
if (instabil_ell(S, D, A, B, C))
cnt++;
...
...
@@ -166,7 +166,7 @@ __device__ inline bool nyereg_ell(const vec3& S, const vec3& X1, const vec3& X2,
__device__ inline int nyereg_ep(const vec3& S, const vec3& C, const vec3& D) {
int cnt = 0;
vec3 A(0, 0, 0), B(
0, 0, 1
.0);
vec3 A(0, 0, 0), B(
1.0, 0.0, 0
.0);
if (nyereg_ell(S, A, B, C, D))
cnt++;
...
...
@@ -190,13 +190,13 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
vec3 AB(1.0/v, 0.0, 0.0);
vec3 AC = C/v;
for (double i = 0.0
001
; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0
001
; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = i*AB + j * AC;
vec3 L = (D - K)/w;
for (double k = 0.0
001
; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
...
...
@@ -213,17 +213,17 @@ __device__ void ABC_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void BCD_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(
0.0, 0.0, 1
.0);
vec3 A(0.0, 0.0, 0.0), B(
1.0, 0.0, 0
.0);
vec3 BC = (C - B) / v;
vec3 BD = (D - B) / v;
for (double i = 0.0
001
; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0
001
; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = B + i * BC + j * BD;
vec3 L = (A - K)/w;
for (double k = 0.0
001
; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
...
...
@@ -240,17 +240,17 @@ __device__ void BCD_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void CDA_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(
0.0, 0.0, 1
.0);
vec3 A(0.0, 0.0, 0.0), B(
1.0, 0.0, 0
.0);
vec3 CA = (A - C) / v;
vec3 CD = (D - C) / v;
for (double i = 0.0
001
; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0
001
; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = C + i * CA + j * CD;
vec3 L = (B - K)/w;
for (double k = 0.0
001
; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
...
...
@@ -267,17 +267,17 @@ __device__ void CDA_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
__device__ void DAB_oldal(int v, int w, const vec3& C, const vec3& D, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
vec3 A(0.0, 0.0, 0.0), B(
0.0, 0.0, 1
.0);
vec3 A(0.0, 0.0, 0.0), B(
1.0, 0.0, 0
.0);
vec3 DA = (A - D) / v;
vec3 DB = (B - D) / v;
for (double i = 0.0
001
; i < v; i++)
for (double i = 0.0; i < v; i++)
{
for (double j = 0.0
001
; j < v; j++)
for (double j = 0.0; j < v; j++)
{
vec3 K = D + i * DA + j * DB;
vec3 L = (C - K)/w;
for (double k = 0.0
001
; k < w; k++)
for (double k = 0.0; k < w; k++)
{
vec3 Sv = K + L*k;
int S = stabil_ep(Sv, C, D);
...
...
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