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
b2d3359a
Unverified
Commit
b2d3359a
authored
Mar 16, 2021
by
David Clark
Committed by
GitHub
Mar 16, 2021
Browse files
Adds change for duplicate variables (#3065)
Co-authored-by:
David Clark
<
daclark@nvidia.com
>
parent
59b8afb1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+7
-4
platforms/opencl/src/OpenCLContext.cpp
platforms/opencl/src/OpenCLContext.cpp
+7
-4
No files found.
platforms/cuda/src/CudaContext.cpp
View file @
b2d3359a
...
...
@@ -489,10 +489,13 @@ CUmodule CudaContext::createModule(const string source, const map<string, string
if
(
!
options
.
empty
())
src
<<
"// Compilation Options: "
<<
options
<<
endl
<<
endl
;
for
(
auto
&
pair
:
compilationDefines
)
{
src
<<
"#define "
<<
pair
.
first
;
if
(
!
pair
.
second
.
empty
())
src
<<
" "
<<
pair
.
second
;
src
<<
endl
;
// 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
;
...
...
platforms/opencl/src/OpenCLContext.cpp
View file @
b2d3359a
...
...
@@ -572,10 +572,13 @@ cl::Program OpenCLContext::createProgram(const string source, const map<string,
if
(
!
options
.
empty
())
src
<<
"// Compilation Options: "
<<
options
<<
endl
<<
endl
;
for
(
auto
&
pair
:
compilationDefines
)
{
src
<<
"#define "
<<
pair
.
first
;
if
(
!
pair
.
second
.
empty
())
src
<<
" "
<<
pair
.
second
;
src
<<
endl
;
// 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
;
...
...
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