"docs/ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "4233befd9d173e5035f7b905922790fb1ee4c78f"
Unverified Commit a1a32466 authored by Philip Turner's avatar Philip Turner Committed by GitHub
Browse files

Update OpenCLContext.cpp (#3917)

parent 6b51520c
...@@ -211,7 +211,11 @@ OpenCLContext::OpenCLContext(const System& system, int platformIndex, int device ...@@ -211,7 +211,11 @@ OpenCLContext::OpenCLContext(const System& system, int platformIndex, int device
throw OpenMMException("This device does not support double precision"); throw OpenMMException("This device does not support double precision");
string vendor = device.getInfo<CL_DEVICE_VENDOR>(); string vendor = device.getInfo<CL_DEVICE_VENDOR>();
int numThreadBlocksPerComputeUnit = 6; int numThreadBlocksPerComputeUnit = 6;
if (vendor.size() >= 6 && vendor.substr(0, 6) == "NVIDIA") {
if (vendor.size() >= 5 && vendor.substr(0, 5) == "Apple") {
simdWidth = 32;
}
else if (vendor.size() >= 6 && vendor.substr(0, 6) == "NVIDIA") {
compilationDefines["WARPS_ARE_ATOMIC"] = ""; compilationDefines["WARPS_ARE_ATOMIC"] = "";
simdWidth = 32; simdWidth = 32;
if (device.getInfo<CL_DEVICE_EXTENSIONS>().find("cl_nv_device_attribute_query") != string::npos) { if (device.getInfo<CL_DEVICE_EXTENSIONS>().find("cl_nv_device_attribute_query") != string::npos) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment