"openmmapi/vscode:/vscode.git/clone" did not exist on "0fe7612bdaa99f73a66addabb396cdb73dfbcc0e"
Unverified Commit b2d3359a authored by David Clark's avatar David Clark Committed by GitHub
Browse files

Adds change for duplicate variables (#3065)


Co-authored-by: default avatarDavid Clark <daclark@nvidia.com>
parent 59b8afb1
......@@ -489,11 +489,14 @@ CUmodule CudaContext::createModule(const string source, const map<string, string
if (!options.empty())
src << "// Compilation Options: " << options << endl << endl;
for (auto& pair : compilationDefines) {
// Query defines to avoid duplicate variables
if (defines.find(pair.first) == defines.end()) {
src << "#define " << pair.first;
if (!pair.second.empty())
src << " " << pair.second;
src << endl;
}
}
if (!compilationDefines.empty())
src << endl;
if (useDoublePrecision) {
......
......@@ -572,11 +572,14 @@ cl::Program OpenCLContext::createProgram(const string source, const map<string,
if (!options.empty())
src << "// Compilation Options: " << options << endl << endl;
for (auto& pair : compilationDefines) {
// Query defines to avoid duplicate variables
if (defines.find(pair.first) == defines.end()) {
src << "#define " << pair.first;
if (!pair.second.empty())
src << " " << pair.second;
src << endl;
}
}
if (!compilationDefines.empty())
src << endl;
if (supportsDoublePrecision)
......
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