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
31748d0b
Commit
31748d0b
authored
Nov 11, 2011
by
Peter Eastman
Browse files
Workaround for compiler bug on Lion
parent
fd233276
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+3
-0
platforms/opencl/src/kernels/gbsaObc_nvidia.cl
platforms/opencl/src/kernels/gbsaObc_nvidia.cl
+4
-0
No files found.
platforms/opencl/src/OpenCLKernels.cpp
View file @
31748d0b
...
...
@@ -1530,6 +1530,9 @@ double OpenCLCalcGBSAOBCForceKernel::execute(ContextImpl& context, bool includeF
defines["PADDED_NUM_ATOMS"] = intToString(cl.getPaddedNumAtoms());
defines["NUM_BLOCKS"] = OpenCLExpressionUtilities::intToString(cl.getNumAtomBlocks());
defines["FORCE_WORK_GROUP_SIZE"] = OpenCLExpressionUtilities::intToString(nb.getForceThreadBlockSize());
string platformVendor = cl::Platform(cl.getDevice().getInfo<CL_DEVICE_PLATFORM>()).getInfo<CL_PLATFORM_VENDOR>();
if (platformVendor == "Apple")
defines["USE_APPLE_WORKAROUND"] = "1";
string file;
if (deviceIsCpu)
file = OpenCLKernelSources::gbsaObc_cpu;
...
...
platforms/opencl/src/kernels/gbsaObc_nvidia.cl
View file @
31748d0b
...
...
@@ -457,6 +457,9 @@ __kernel void computeGBSAForce1(
#ifdef USE_CUTOFF
unsigned int flags = (numTiles <= maxTiles ? interactionFlags[pos] : 0xFFFFFFFF);
bool computeSubset = false;
#ifdef USE_APPLE_WORKAROUND
computeSubset = (flags == 0); // Workaround for a compiler bug in Apple's OpenCL on Lion
#else
if (flags != 0xFFFFFFFF) {
if (tgx < 2)
exclusionRange[2*localGroupIndex+tgx] = exclusionRowIndices[x+tgx];
...
...
@@ -467,6 +470,7 @@ __kernel void computeGBSAForce1(
exclusionIndex[localGroupIndex] = i*TILE_SIZE;
computeSubset = (exclusionIndex[localGroupIndex] == -1);
}
#endif
if (computeSubset) {
if (flags == 0) {
// No interactions in this tile.
...
...
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