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
59e00d79
"vscode:/vscode.git/clone" did not exist on "fb44b646b5700552ea3db0fc7968d545a5d7bd2c"
Commit
59e00d79
authored
Jul 28, 2010
by
Peter Eastman
Browse files
Fixed error in previous checkin
parent
df5654ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
platforms/opencl/src/OpenCLContext.cpp
platforms/opencl/src/OpenCLContext.cpp
+4
-1
No files found.
platforms/opencl/src/OpenCLContext.cpp
View file @
59e00d79
...
@@ -45,6 +45,10 @@
...
@@ -45,6 +45,10 @@
using
namespace
OpenMM
;
using
namespace
OpenMM
;
using
namespace
std
;
using
namespace
std
;
#ifndef CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
#endif
OpenCLContext
::
OpenCLContext
(
int
numParticles
,
int
deviceIndex
)
:
time
(
0.0
),
stepCount
(
0
),
computeForceCount
(
0
),
posq
(
NULL
),
velm
(
NULL
),
OpenCLContext
::
OpenCLContext
(
int
numParticles
,
int
deviceIndex
)
:
time
(
0.0
),
stepCount
(
0
),
computeForceCount
(
0
),
posq
(
NULL
),
velm
(
NULL
),
forceBuffers
(
NULL
),
energyBuffer
(
NULL
),
atomIndex
(
NULL
),
integration
(
NULL
),
nonbonded
(
NULL
)
{
forceBuffers
(
NULL
),
energyBuffer
(
NULL
),
atomIndex
(
NULL
),
integration
(
NULL
),
nonbonded
(
NULL
)
{
try
{
try
{
...
@@ -63,7 +67,6 @@ OpenCLContext::OpenCLContext(int numParticles, int deviceIndex) : time(0.0), ste
...
@@ -63,7 +67,6 @@ OpenCLContext::OpenCLContext(int numParticles, int deviceIndex) : time(0.0), ste
int
processingElementsPerComputeUnit
=
1
;
int
processingElementsPerComputeUnit
=
1
;
if
(
devices
[
i
].
getInfo
<
CL_DEVICE_EXTENSIONS
>
().
find
(
"cl_nv_device_attribute_query"
)
!=
string
::
npos
)
{
if
(
devices
[
i
].
getInfo
<
CL_DEVICE_EXTENSIONS
>
().
find
(
"cl_nv_device_attribute_query"
)
!=
string
::
npos
)
{
cl_uint
computeCapabilityMajor
;
cl_uint
computeCapabilityMajor
;
const
cl_device_info
CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
=
0x4000
;
clGetDeviceInfo
(
devices
[
i
](),
CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
,
sizeof
(
cl_uint
),
&
computeCapabilityMajor
,
NULL
);
clGetDeviceInfo
(
devices
[
i
](),
CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
,
sizeof
(
cl_uint
),
&
computeCapabilityMajor
,
NULL
);
processingElementsPerComputeUnit
=
(
computeCapabilityMajor
<
2
?
8
:
32
);
processingElementsPerComputeUnit
=
(
computeCapabilityMajor
<
2
?
8
:
32
);
}
}
...
...
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