Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
2f024f11
"openmmapi/vscode:/vscode.git/clone" did not exist on "a5e42f57289b654368ba91183cb8f4a3649a5f68"
Commit
2f024f11
authored
Aug 05, 2016
by
peastman
Browse files
Fixed compilation error with OpenCL on CPU
parent
5782cb5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
platforms/opencl/src/kernels/nonbonded_cpu.cl
platforms/opencl/src/kernels/nonbonded_cpu.cl
+6
-0
No files found.
platforms/opencl/src/kernels/nonbonded_cpu.cl
View file @
2f024f11
...
@@ -28,6 +28,7 @@ __kernel void computeNonbonded(
...
@@ -28,6 +28,7 @@ __kernel void computeNonbonded(
#
endif
#
endif
PARAMETER_ARGUMENTS
)
{
PARAMETER_ARGUMENTS
)
{
mixed
energy
=
0
;
mixed
energy
=
0
;
INIT_DERIVATIVES
__local
AtomData
localData[TILE_SIZE]
;
__local
AtomData
localData[TILE_SIZE]
;
//
First
loop:
process
tiles
that
contain
exclusions.
//
First
loop:
process
tiles
that
contain
exclusions.
...
@@ -87,6 +88,7 @@ __kernel void computeNonbonded(
...
@@ -87,6 +88,7 @@ __kernel void computeNonbonded(
bool
isExcluded
=
(
atom1
>=
NUM_ATOMS
|
| atom2 >= NUM_ATOMS || !(excl & 0x1));
bool
isExcluded
=
(
atom1
>=
NUM_ATOMS
|
| atom2 >= NUM_ATOMS || !(excl & 0x1));
#endif
#endif
real tempEnergy = 0;
real tempEnergy = 0;
const real interactionScale = 0.5f;
COMPUTE_INTERACTION
COMPUTE_INTERACTION
energy += 0.5f*tempEnergy;
energy += 0.5f*tempEnergy;
#ifdef USE_SYMMETRIC
#ifdef USE_SYMMETRIC
...
@@ -155,6 +157,7 @@ __kernel void computeNonbonded(
...
@@ -155,6 +157,7 @@ __kernel void computeNonbonded(
bool isExcluded = (atom1 >= NUM_ATOMS || atom2 >= NUM_ATOMS || !(excl & 0x1));
bool isExcluded = (atom1 >= NUM_ATOMS || atom2 >= NUM_ATOMS || !(excl & 0x1));
#endif
#endif
real tempEnergy = 0;
real tempEnergy = 0;
const real interactionScale = 1.0f;
COMPUTE_INTERACTION
COMPUTE_INTERACTION
energy += tempEnergy;
energy += tempEnergy;
#ifdef USE_SYMMETRIC
#ifdef USE_SYMMETRIC
...
@@ -318,6 +321,7 @@ __kernel void computeNonbonded(
...
@@ -318,6 +321,7 @@ __kernel void computeNonbonded(
bool isExcluded = (atom1 >= NUM_ATOMS || atom2 >= NUM_ATOMS);
bool isExcluded = (atom1 >= NUM_ATOMS || atom2 >= NUM_ATOMS);
#endif
#endif
real tempEnergy = 0;
real tempEnergy = 0;
const real interactionScale = 1.0f;
COMPUTE_INTERACTION
COMPUTE_INTERACTION
energy += tempEnergy;
energy += tempEnergy;
#ifdef USE_SYMMETRIC
#ifdef USE_SYMMETRIC
...
@@ -382,6 +386,7 @@ __kernel void computeNonbonded(
...
@@ -382,6 +386,7 @@ __kernel void computeNonbonded(
bool isExcluded = (atom1 >= NUM_ATOMS |
|
atom2
>=
NUM_ATOMS
)
;
bool isExcluded = (atom1 >= NUM_ATOMS |
|
atom2
>=
NUM_ATOMS
)
;
#
endif
#
endif
real
tempEnergy
=
0
;
real
tempEnergy
=
0
;
const
real
interactionScale
=
1.0f
;
COMPUTE_INTERACTION
COMPUTE_INTERACTION
energy
+=
tempEnergy
;
energy
+=
tempEnergy
;
#
ifdef
USE_SYMMETRIC
#
ifdef
USE_SYMMETRIC
...
@@ -441,4 +446,5 @@ __kernel void computeNonbonded(
...
@@ -441,4 +446,5 @@ __kernel void computeNonbonded(
pos++
;
pos++
;
}
}
energyBuffer[get_global_id
(
0
)
]
+=
energy
;
energyBuffer[get_global_id
(
0
)
]
+=
energy
;
SAVE_DERIVATIVES
}
}
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