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
c9d720bb
Commit
c9d720bb
authored
Oct 22, 2012
by
Peter Eastman
Browse files
Bug fixes
parent
53fec1af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
+5
-3
No files found.
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernels.cpp
View file @
c9d720bb
...
@@ -846,7 +846,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
...
@@ -846,7 +846,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
double
fixedThreadMemory
=
19
*
elementSize
+
2
*
sizeof
(
float
)
+
3
*
sizeof
(
int
)
/
(
double
)
cu
.
TileSize
;
double
fixedThreadMemory
=
19
*
elementSize
+
2
*
sizeof
(
float
)
+
3
*
sizeof
(
int
)
/
(
double
)
cu
.
TileSize
;
double
inducedThreadMemory
=
15
*
elementSize
+
2
*
sizeof
(
float
);
double
inducedThreadMemory
=
15
*
elementSize
+
2
*
sizeof
(
float
);
double
electrostaticsThreadMemory
=
0
;
double
electrostaticsThreadMemory
=
0
;
if
(
useShuffle
)
if
(
!
useShuffle
)
fixedThreadMemory
+=
3
*
elementSize
;
fixedThreadMemory
+=
3
*
elementSize
;
map
<
string
,
string
>
defines
;
map
<
string
,
string
>
defines
;
defines
[
"NUM_ATOMS"
]
=
cu
.
intToString
(
numMultipoles
);
defines
[
"NUM_ATOMS"
]
=
cu
.
intToString
(
numMultipoles
);
...
@@ -855,6 +855,8 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
...
@@ -855,6 +855,8 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
defines
[
"ENERGY_SCALE_FACTOR"
]
=
cu
.
doubleToString
(
138.9354558456
/
innerDielectric
);
defines
[
"ENERGY_SCALE_FACTOR"
]
=
cu
.
doubleToString
(
138.9354558456
/
innerDielectric
);
if
(
force
.
getPolarizationType
()
==
AmoebaMultipoleForce
::
Direct
)
if
(
force
.
getPolarizationType
()
==
AmoebaMultipoleForce
::
Direct
)
defines
[
"DIRECT_POLARIZATION"
]
=
""
;
defines
[
"DIRECT_POLARIZATION"
]
=
""
;
if
(
useShuffle
)
defines
[
"USE_SHUFFLE"
]
=
""
;
double
alpha
=
force
.
getAEwald
();
double
alpha
=
force
.
getAEwald
();
int
gridSizeX
,
gridSizeY
,
gridSizeZ
;
int
gridSizeX
,
gridSizeY
,
gridSizeZ
;
if
(
usePME
)
{
if
(
usePME
)
{
...
@@ -915,7 +917,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
...
@@ -915,7 +917,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
electrostaticsSource
<<
"#define APPLY_SCALE
\n
"
;
electrostaticsSource
<<
"#define APPLY_SCALE
\n
"
;
electrostaticsSource
<<
CudaAmoebaKernelSources
::
pmeElectrostaticPairForce
;
electrostaticsSource
<<
CudaAmoebaKernelSources
::
pmeElectrostaticPairForce
;
electrostaticsThreadMemory
=
24
*
elementSize
+
3
*
sizeof
(
float
)
+
3
*
sizeof
(
int
)
/
(
double
)
cu
.
TileSize
;
electrostaticsThreadMemory
=
24
*
elementSize
+
3
*
sizeof
(
float
)
+
3
*
sizeof
(
int
)
/
(
double
)
cu
.
TileSize
;
if
(
useShuffle
)
if
(
!
useShuffle
)
electrostaticsThreadMemory
+=
3
*
elementSize
;
electrostaticsThreadMemory
+=
3
*
elementSize
;
}
}
else
{
else
{
...
@@ -930,7 +932,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
...
@@ -930,7 +932,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
electrostaticsSource
<<
"#define T3
\n
"
;
electrostaticsSource
<<
"#define T3
\n
"
;
electrostaticsSource
<<
CudaAmoebaKernelSources
::
electrostaticPairForce
;
electrostaticsSource
<<
CudaAmoebaKernelSources
::
electrostaticPairForce
;
electrostaticsThreadMemory
=
21
*
elementSize
+
2
*
sizeof
(
float
)
+
3
*
sizeof
(
int
)
/
(
double
)
cu
.
TileSize
;
electrostaticsThreadMemory
=
21
*
elementSize
+
2
*
sizeof
(
float
)
+
3
*
sizeof
(
int
)
/
(
double
)
cu
.
TileSize
;
if
(
useShuffle
)
if
(
!
useShuffle
)
electrostaticsThreadMemory
+=
3
*
elementSize
;
electrostaticsThreadMemory
+=
3
*
elementSize
;
if
(
gk
!=
NULL
)
if
(
gk
!=
NULL
)
electrostaticsThreadMemory
+=
4
*
elementSize
;
electrostaticsThreadMemory
+=
4
*
elementSize
;
...
...
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