Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
docking
ocladock
Commits
2c03e800
Commit
2c03e800
authored
Feb 13, 2019
by
Leonardo Solis
Browse files
corrected data types: this removes undeterministic segfaults on cpus
parent
6cbe3302
Changes
3
Hide whitespace changes
Inline
Side-by-side
device/calcMergedEneGra.cl
View file @
2c03e800
...
...
@@ -448,12 +448,12 @@ partial_interE[get_local_id(0)] += 16777216.0f;
else
{
// Getting coordinates
int x_low = (int)floor(x);
int y_low = (int)floor(y);
int z_low = (int)floor(z);
int x_high = (int)ceil(x);
int y_high = (int)ceil(y);
int z_high = (int)ceil(z);
u
int x_low = (
u
int)floor(x);
u
int y_low = (
u
int)floor(y);
u
int z_low = (
u
int)floor(z);
u
int x_high = (
u
int)ceil(x);
u
int y_high = (
u
int)ceil(y);
u
int z_high = (
u
int)ceil(z);
float dx = x - x_low;
float dy = y - y_low;
float dz = z - z_low;
...
...
device/calcenergy.cl
View file @
2c03e800
...
...
@@ -314,12 +314,12 @@ void gpu_calc_energy(
else
{
//
Getting
coordinates
int
x_low
=
(
int
)
floor
(
x
)
;
int
y_low
=
(
int
)
floor
(
y
)
;
int
z_low
=
(
int
)
floor
(
z
)
;
int
x_high
=
(
int
)
ceil
(
x
)
;
int
y_high
=
(
int
)
ceil
(
y
)
;
int
z_high
=
(
int
)
ceil
(
z
)
;
u
int
x_low
=
(
u
int
)
floor
(
x
)
;
u
int
y_low
=
(
u
int
)
floor
(
y
)
;
u
int
z_low
=
(
u
int
)
floor
(
z
)
;
u
int
x_high
=
(
u
int
)
ceil
(
x
)
;
u
int
y_high
=
(
u
int
)
ceil
(
y
)
;
u
int
z_high
=
(
u
int
)
ceil
(
z
)
;
float
dx
=
x
-
x_low
;
float
dy
=
y
-
y_low
;
float
dz
=
z
-
z_low
;
...
...
device/calcgradient.cl
View file @
2c03e800
...
...
@@ -381,12 +381,12 @@ void gpu_calc_gradient(
else
{
// Getting coordinates
int x_low = (int)floor(x);
int y_low = (int)floor(y);
int z_low = (int)floor(z);
int x_high = (int)ceil(x);
int y_high = (int)ceil(y);
int z_high = (int)ceil(z);
u
int x_low = (
u
int)floor(x);
u
int y_low = (
u
int)floor(y);
u
int z_low = (
u
int)floor(z);
u
int x_high = (
u
int)ceil(x);
u
int y_high = (
u
int)ceil(y);
u
int z_high = (
u
int)ceil(z);
float dx = x - x_low;
float dy = y - y_low;
float dz = z - z_low;
...
...
Write
Preview
Supports
Markdown
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