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
0307a0db
"plugins/amoeba/vscode:/vscode.git/clone" did not exist on "c22f00cf7c701538f25101ad7aa7c7ea96b3c675"
Commit
0307a0db
authored
Apr 15, 2013
by
Yutong Zhao
Browse files
Context constructor now uses const System&, guaranteeing that System won't be modified.
parent
19757775
Changes
138
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
120 additions
and
120 deletions
+120
-120
openmmapi/src/PeriodicTorsionForceImpl.cpp
openmmapi/src/PeriodicTorsionForceImpl.cpp
+1
-1
openmmapi/src/RBTorsionForce.cpp
openmmapi/src/RBTorsionForce.cpp
+1
-1
openmmapi/src/RBTorsionForceImpl.cpp
openmmapi/src/RBTorsionForceImpl.cpp
+1
-1
platforms/cuda/src/CudaKernels.h
platforms/cuda/src/CudaKernels.h
+27
-27
platforms/cuda/src/CudaParallelKernels.cpp
platforms/cuda/src/CudaParallelKernels.cpp
+13
-13
platforms/cuda/src/CudaParallelKernels.h
platforms/cuda/src/CudaParallelKernels.h
+13
-13
platforms/opencl/src/OpenCLKernels.h
platforms/opencl/src/OpenCLKernels.h
+27
-27
platforms/opencl/src/OpenCLParallelKernels.cpp
platforms/opencl/src/OpenCLParallelKernels.cpp
+13
-13
platforms/opencl/src/OpenCLParallelKernels.h
platforms/opencl/src/OpenCLParallelKernels.h
+13
-13
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
...openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
...amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
...ns/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
...oeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
...ns/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
.../amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
...oeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
+1
-1
plugins/amoeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
...moeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
+1
-1
No files found.
openmmapi/src/PeriodicTorsionForceImpl.cpp
View file @
0307a0db
...
@@ -38,7 +38,7 @@ using std::pair;
...
@@ -38,7 +38,7 @@ using std::pair;
using
std
::
vector
;
using
std
::
vector
;
using
std
::
set
;
using
std
::
set
;
PeriodicTorsionForceImpl
::
PeriodicTorsionForceImpl
(
PeriodicTorsionForce
&
owner
)
:
owner
(
owner
)
{
PeriodicTorsionForceImpl
::
PeriodicTorsionForceImpl
(
const
PeriodicTorsionForce
&
owner
)
:
owner
(
owner
)
{
}
}
PeriodicTorsionForceImpl
::~
PeriodicTorsionForceImpl
()
{
PeriodicTorsionForceImpl
::~
PeriodicTorsionForceImpl
()
{
...
...
openmmapi/src/RBTorsionForce.cpp
View file @
0307a0db
...
@@ -73,7 +73,7 @@ void RBTorsionForce::setTorsionParameters(int index, int particle1, int particle
...
@@ -73,7 +73,7 @@ void RBTorsionForce::setTorsionParameters(int index, int particle1, int particle
rbTorsions
[
index
].
c
[
5
]
=
c5
;
rbTorsions
[
index
].
c
[
5
]
=
c5
;
}
}
ForceImpl
*
RBTorsionForce
::
createImpl
()
{
ForceImpl
*
RBTorsionForce
::
createImpl
()
const
{
return
new
RBTorsionForceImpl
(
*
this
);
return
new
RBTorsionForceImpl
(
*
this
);
}
}
...
...
openmmapi/src/RBTorsionForceImpl.cpp
View file @
0307a0db
...
@@ -38,7 +38,7 @@ using std::pair;
...
@@ -38,7 +38,7 @@ using std::pair;
using
std
::
vector
;
using
std
::
vector
;
using
std
::
set
;
using
std
::
set
;
RBTorsionForceImpl
::
RBTorsionForceImpl
(
RBTorsionForce
&
owner
)
:
owner
(
owner
)
{
RBTorsionForceImpl
::
RBTorsionForceImpl
(
const
RBTorsionForce
&
owner
)
:
owner
(
owner
)
{
}
}
RBTorsionForceImpl
::~
RBTorsionForceImpl
()
{
RBTorsionForceImpl
::~
RBTorsionForceImpl
()
{
...
...
platforms/cuda/src/CudaKernels.h
View file @
0307a0db
...
@@ -230,7 +230,7 @@ private:
...
@@ -230,7 +230,7 @@ private:
*/
*/
class
CudaCalcHarmonicBondForceKernel
:
public
CalcHarmonicBondForceKernel
{
class
CudaCalcHarmonicBondForceKernel
:
public
CalcHarmonicBondForceKernel
{
public:
public:
CudaCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcHarmonicBondForceKernel
(
name
,
platform
),
CudaCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcHarmonicBondForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
)
{
}
}
~
CudaCalcHarmonicBondForceKernel
();
~
CudaCalcHarmonicBondForceKernel
();
...
@@ -261,7 +261,7 @@ private:
...
@@ -261,7 +261,7 @@ private:
int
numBonds
;
int
numBonds
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaArray
*
params
;
CudaArray
*
params
;
};
};
...
@@ -270,7 +270,7 @@ private:
...
@@ -270,7 +270,7 @@ private:
*/
*/
class
CudaCalcCustomBondForceKernel
:
public
CalcCustomBondForceKernel
{
class
CudaCalcCustomBondForceKernel
:
public
CalcCustomBondForceKernel
{
public:
public:
CudaCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCustomBondForceKernel
(
name
,
platform
),
CudaCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCustomBondForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
}
}
~
CudaCalcCustomBondForceKernel
();
~
CudaCalcCustomBondForceKernel
();
...
@@ -301,7 +301,7 @@ private:
...
@@ -301,7 +301,7 @@ private:
int
numBonds
;
int
numBonds
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaParameterSet
*
params
;
CudaParameterSet
*
params
;
CudaArray
*
globals
;
CudaArray
*
globals
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
...
@@ -313,7 +313,7 @@ private:
...
@@ -313,7 +313,7 @@ private:
*/
*/
class
CudaCalcHarmonicAngleForceKernel
:
public
CalcHarmonicAngleForceKernel
{
class
CudaCalcHarmonicAngleForceKernel
:
public
CalcHarmonicAngleForceKernel
{
public:
public:
CudaCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcHarmonicAngleForceKernel
(
name
,
platform
),
CudaCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcHarmonicAngleForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
)
{
}
}
~
CudaCalcHarmonicAngleForceKernel
();
~
CudaCalcHarmonicAngleForceKernel
();
...
@@ -344,7 +344,7 @@ private:
...
@@ -344,7 +344,7 @@ private:
int
numAngles
;
int
numAngles
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaArray
*
params
;
CudaArray
*
params
;
};
};
...
@@ -353,7 +353,7 @@ private:
...
@@ -353,7 +353,7 @@ private:
*/
*/
class
CudaCalcCustomAngleForceKernel
:
public
CalcCustomAngleForceKernel
{
class
CudaCalcCustomAngleForceKernel
:
public
CalcCustomAngleForceKernel
{
public:
public:
CudaCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCustomAngleForceKernel
(
name
,
platform
),
CudaCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCustomAngleForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
}
}
~
CudaCalcCustomAngleForceKernel
();
~
CudaCalcCustomAngleForceKernel
();
...
@@ -384,7 +384,7 @@ private:
...
@@ -384,7 +384,7 @@ private:
int
numAngles
;
int
numAngles
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaParameterSet
*
params
;
CudaParameterSet
*
params
;
CudaArray
*
globals
;
CudaArray
*
globals
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
...
@@ -396,7 +396,7 @@ private:
...
@@ -396,7 +396,7 @@ private:
*/
*/
class
CudaCalcPeriodicTorsionForceKernel
:
public
CalcPeriodicTorsionForceKernel
{
class
CudaCalcPeriodicTorsionForceKernel
:
public
CalcPeriodicTorsionForceKernel
{
public:
public:
CudaCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcPeriodicTorsionForceKernel
(
name
,
platform
),
CudaCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcPeriodicTorsionForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
)
{
}
}
~
CudaCalcPeriodicTorsionForceKernel
();
~
CudaCalcPeriodicTorsionForceKernel
();
...
@@ -427,7 +427,7 @@ private:
...
@@ -427,7 +427,7 @@ private:
int
numTorsions
;
int
numTorsions
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaArray
*
params
;
CudaArray
*
params
;
};
};
...
@@ -436,7 +436,7 @@ private:
...
@@ -436,7 +436,7 @@ private:
*/
*/
class
CudaCalcRBTorsionForceKernel
:
public
CalcRBTorsionForceKernel
{
class
CudaCalcRBTorsionForceKernel
:
public
CalcRBTorsionForceKernel
{
public:
public:
CudaCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcRBTorsionForceKernel
(
name
,
platform
),
CudaCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcRBTorsionForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params1
(
NULL
),
params2
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params1
(
NULL
),
params2
(
NULL
)
{
}
}
~
CudaCalcRBTorsionForceKernel
();
~
CudaCalcRBTorsionForceKernel
();
...
@@ -467,7 +467,7 @@ private:
...
@@ -467,7 +467,7 @@ private:
int
numTorsions
;
int
numTorsions
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaArray
*
params1
;
CudaArray
*
params1
;
CudaArray
*
params2
;
CudaArray
*
params2
;
};
};
...
@@ -477,7 +477,7 @@ private:
...
@@ -477,7 +477,7 @@ private:
*/
*/
class
CudaCalcCMAPTorsionForceKernel
:
public
CalcCMAPTorsionForceKernel
{
class
CudaCalcCMAPTorsionForceKernel
:
public
CalcCMAPTorsionForceKernel
{
public:
public:
CudaCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCMAPTorsionForceKernel
(
name
,
platform
),
CudaCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCMAPTorsionForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
coefficients
(
NULL
),
mapPositions
(
NULL
),
torsionMaps
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
coefficients
(
NULL
),
mapPositions
(
NULL
),
torsionMaps
(
NULL
)
{
}
}
~
CudaCalcCMAPTorsionForceKernel
();
~
CudaCalcCMAPTorsionForceKernel
();
...
@@ -501,7 +501,7 @@ private:
...
@@ -501,7 +501,7 @@ private:
int
numTorsions
;
int
numTorsions
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaArray
*
coefficients
;
CudaArray
*
coefficients
;
CudaArray
*
mapPositions
;
CudaArray
*
mapPositions
;
CudaArray
*
torsionMaps
;
CudaArray
*
torsionMaps
;
...
@@ -512,7 +512,7 @@ private:
...
@@ -512,7 +512,7 @@ private:
*/
*/
class
CudaCalcCustomTorsionForceKernel
:
public
CalcCustomTorsionForceKernel
{
class
CudaCalcCustomTorsionForceKernel
:
public
CalcCustomTorsionForceKernel
{
public:
public:
CudaCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCustomTorsionForceKernel
(
name
,
platform
),
CudaCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCustomTorsionForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
}
}
~
CudaCalcCustomTorsionForceKernel
();
~
CudaCalcCustomTorsionForceKernel
();
...
@@ -543,7 +543,7 @@ private:
...
@@ -543,7 +543,7 @@ private:
int
numTorsions
;
int
numTorsions
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaParameterSet
*
params
;
CudaParameterSet
*
params
;
CudaArray
*
globals
;
CudaArray
*
globals
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
...
@@ -555,7 +555,7 @@ private:
...
@@ -555,7 +555,7 @@ private:
*/
*/
class
CudaCalcNonbondedForceKernel
:
public
CalcNonbondedForceKernel
{
class
CudaCalcNonbondedForceKernel
:
public
CalcNonbondedForceKernel
{
public:
public:
CudaCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcNonbondedForceKernel
(
name
,
platform
),
CudaCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcNonbondedForceKernel
(
name
,
platform
),
cu
(
cu
),
hasInitializedFFT
(
false
),
sigmaEpsilon
(
NULL
),
exceptionParams
(
NULL
),
cosSinSums
(
NULL
),
directPmeGrid
(
NULL
),
reciprocalPmeGrid
(
NULL
),
cu
(
cu
),
hasInitializedFFT
(
false
),
sigmaEpsilon
(
NULL
),
exceptionParams
(
NULL
),
cosSinSums
(
NULL
),
directPmeGrid
(
NULL
),
reciprocalPmeGrid
(
NULL
),
pmeBsplineModuliX
(
NULL
),
pmeBsplineModuliY
(
NULL
),
pmeBsplineModuliZ
(
NULL
),
pmeAtomRange
(
NULL
),
pmeAtomGridIndex
(
NULL
),
sort
(
NULL
)
{
pmeBsplineModuliX
(
NULL
),
pmeBsplineModuliY
(
NULL
),
pmeBsplineModuliZ
(
NULL
),
pmeAtomRange
(
NULL
),
pmeAtomGridIndex
(
NULL
),
sort
(
NULL
)
{
}
}
...
@@ -632,7 +632,7 @@ private:
...
@@ -632,7 +632,7 @@ private:
*/
*/
class
CudaCalcCustomNonbondedForceKernel
:
public
CalcCustomNonbondedForceKernel
{
class
CudaCalcCustomNonbondedForceKernel
:
public
CalcCustomNonbondedForceKernel
{
public:
public:
CudaCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCustomNonbondedForceKernel
(
name
,
platform
),
CudaCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCustomNonbondedForceKernel
(
name
,
platform
),
cu
(
cu
),
params
(
NULL
),
globals
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
cu
(
cu
),
params
(
NULL
),
globals
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
}
}
~
CudaCalcCustomNonbondedForceKernel
();
~
CudaCalcCustomNonbondedForceKernel
();
...
@@ -667,7 +667,7 @@ private:
...
@@ -667,7 +667,7 @@ private:
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
float
>
globalParamValues
;
std
::
vector
<
float
>
globalParamValues
;
std
::
vector
<
CudaArray
*>
tabulatedFunctions
;
std
::
vector
<
CudaArray
*>
tabulatedFunctions
;
System
&
system
;
const
System
&
system
;
};
};
/**
/**
...
@@ -724,7 +724,7 @@ private:
...
@@ -724,7 +724,7 @@ private:
*/
*/
class
CudaCalcCustomGBForceKernel
:
public
CalcCustomGBForceKernel
{
class
CudaCalcCustomGBForceKernel
:
public
CalcCustomGBForceKernel
{
public:
public:
CudaCalcCustomGBForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCustomGBForceKernel
(
name
,
platform
),
CudaCalcCustomGBForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCustomGBForceKernel
(
name
,
platform
),
hasInitializedKernels
(
false
),
cu
(
cu
),
params
(
NULL
),
computedValues
(
NULL
),
energyDerivs
(
NULL
),
longEnergyDerivs
(
NULL
),
globals
(
NULL
),
hasInitializedKernels
(
false
),
cu
(
cu
),
params
(
NULL
),
computedValues
(
NULL
),
energyDerivs
(
NULL
),
longEnergyDerivs
(
NULL
),
globals
(
NULL
),
valueBuffers
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
valueBuffers
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
}
}
...
@@ -767,7 +767,7 @@ private:
...
@@ -767,7 +767,7 @@ private:
std
::
vector
<
float
>
globalParamValues
;
std
::
vector
<
float
>
globalParamValues
;
std
::
vector
<
CudaArray
*>
tabulatedFunctions
;
std
::
vector
<
CudaArray
*>
tabulatedFunctions
;
std
::
vector
<
bool
>
pairValueUsesParam
,
pairEnergyUsesParam
,
pairEnergyUsesValue
;
std
::
vector
<
bool
>
pairValueUsesParam
,
pairEnergyUsesParam
,
pairEnergyUsesValue
;
System
&
system
;
const
System
&
system
;
CUfunction
pairValueKernel
,
perParticleValueKernel
,
pairEnergyKernel
,
perParticleEnergyKernel
,
gradientChainRuleKernel
;
CUfunction
pairValueKernel
,
perParticleValueKernel
,
pairEnergyKernel
,
perParticleEnergyKernel
,
gradientChainRuleKernel
;
std
::
vector
<
void
*>
pairValueArgs
,
perParticleValueArgs
,
pairEnergyArgs
,
perParticleEnergyArgs
,
gradientChainRuleArgs
;
std
::
vector
<
void
*>
pairValueArgs
,
perParticleValueArgs
,
pairEnergyArgs
,
perParticleEnergyArgs
,
gradientChainRuleArgs
;
std
::
string
pairValueSrc
,
pairEnergySrc
;
std
::
string
pairValueSrc
,
pairEnergySrc
;
...
@@ -779,7 +779,7 @@ private:
...
@@ -779,7 +779,7 @@ private:
*/
*/
class
CudaCalcCustomExternalForceKernel
:
public
CalcCustomExternalForceKernel
{
class
CudaCalcCustomExternalForceKernel
:
public
CalcCustomExternalForceKernel
{
public:
public:
CudaCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCustomExternalForceKernel
(
name
,
platform
),
CudaCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCustomExternalForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
hasInitializedKernel
(
false
),
cu
(
cu
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
}
}
~
CudaCalcCustomExternalForceKernel
();
~
CudaCalcCustomExternalForceKernel
();
...
@@ -810,7 +810,7 @@ private:
...
@@ -810,7 +810,7 @@ private:
int
numParticles
;
int
numParticles
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
CudaContext
&
cu
;
CudaContext
&
cu
;
System
&
system
;
const
System
&
system
;
CudaParameterSet
*
params
;
CudaParameterSet
*
params
;
CudaArray
*
globals
;
CudaArray
*
globals
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
...
@@ -822,7 +822,7 @@ private:
...
@@ -822,7 +822,7 @@ private:
*/
*/
class
CudaCalcCustomHbondForceKernel
:
public
CalcCustomHbondForceKernel
{
class
CudaCalcCustomHbondForceKernel
:
public
CalcCustomHbondForceKernel
{
public:
public:
CudaCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCustomHbondForceKernel
(
name
,
platform
),
CudaCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCustomHbondForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cu
(
cu
),
donorParams
(
NULL
),
acceptorParams
(
NULL
),
donors
(
NULL
),
acceptors
(
NULL
),
hasInitializedKernel
(
false
),
cu
(
cu
),
donorParams
(
NULL
),
acceptorParams
(
NULL
),
donors
(
NULL
),
acceptors
(
NULL
),
globals
(
NULL
),
donorExclusions
(
NULL
),
acceptorExclusions
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
globals
(
NULL
),
donorExclusions
(
NULL
),
acceptorExclusions
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
}
}
...
@@ -866,7 +866,7 @@ private:
...
@@ -866,7 +866,7 @@ private:
std
::
vector
<
float
>
globalParamValues
;
std
::
vector
<
float
>
globalParamValues
;
std
::
vector
<
CudaArray
*>
tabulatedFunctions
;
std
::
vector
<
CudaArray
*>
tabulatedFunctions
;
std
::
vector
<
void
*>
donorArgs
,
acceptorArgs
;
std
::
vector
<
void
*>
donorArgs
,
acceptorArgs
;
System
&
system
;
const
System
&
system
;
CUfunction
donorKernel
,
acceptorKernel
;
CUfunction
donorKernel
,
acceptorKernel
;
};
};
...
@@ -875,7 +875,7 @@ private:
...
@@ -875,7 +875,7 @@ private:
*/
*/
class
CudaCalcCustomCompoundBondForceKernel
:
public
CalcCustomCompoundBondForceKernel
{
class
CudaCalcCustomCompoundBondForceKernel
:
public
CalcCustomCompoundBondForceKernel
{
public:
public:
CudaCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
System
&
system
)
:
CalcCustomCompoundBondForceKernel
(
name
,
platform
),
CudaCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaContext
&
cu
,
const
System
&
system
)
:
CalcCustomCompoundBondForceKernel
(
name
,
platform
),
cu
(
cu
),
params
(
NULL
),
globals
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
cu
(
cu
),
params
(
NULL
),
globals
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
}
}
~
CudaCalcCustomCompoundBondForceKernel
();
~
CudaCalcCustomCompoundBondForceKernel
();
...
@@ -912,7 +912,7 @@ private:
...
@@ -912,7 +912,7 @@ private:
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
float
>
globalParamValues
;
std
::
vector
<
float
>
globalParamValues
;
std
::
vector
<
CudaArray
*>
tabulatedFunctions
;
std
::
vector
<
CudaArray
*>
tabulatedFunctions
;
System
&
system
;
const
System
&
system
;
};
};
/**
/**
...
...
platforms/cuda/src/CudaParallelKernels.cpp
View file @
0307a0db
...
@@ -241,7 +241,7 @@ private:
...
@@ -241,7 +241,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcHarmonicBondForceKernel
::
CudaParallelCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcHarmonicBondForceKernel
::
CudaParallelCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcHarmonicBondForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcHarmonicBondForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcHarmonicBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcHarmonicBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -282,7 +282,7 @@ private:
...
@@ -282,7 +282,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcCustomBondForceKernel
::
CudaParallelCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcCustomBondForceKernel
::
CudaParallelCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomBondForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomBondForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -323,7 +323,7 @@ private:
...
@@ -323,7 +323,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcHarmonicAngleForceKernel
::
CudaParallelCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcHarmonicAngleForceKernel
::
CudaParallelCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcHarmonicAngleForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcHarmonicAngleForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcHarmonicAngleForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcHarmonicAngleForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -364,7 +364,7 @@ private:
...
@@ -364,7 +364,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcCustomAngleForceKernel
::
CudaParallelCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcCustomAngleForceKernel
::
CudaParallelCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomAngleForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomAngleForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomAngleForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomAngleForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -405,7 +405,7 @@ private:
...
@@ -405,7 +405,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcPeriodicTorsionForceKernel
::
CudaParallelCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcPeriodicTorsionForceKernel
::
CudaParallelCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcPeriodicTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcPeriodicTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcPeriodicTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcPeriodicTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -446,7 +446,7 @@ private:
...
@@ -446,7 +446,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcRBTorsionForceKernel
::
CudaParallelCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcRBTorsionForceKernel
::
CudaParallelCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcRBTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcRBTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcRBTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcRBTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -487,7 +487,7 @@ private:
...
@@ -487,7 +487,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcCMAPTorsionForceKernel
::
CudaParallelCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcCMAPTorsionForceKernel
::
CudaParallelCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCMAPTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCMAPTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcCMAPTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcCMAPTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -523,7 +523,7 @@ private:
...
@@ -523,7 +523,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcCustomTorsionForceKernel
::
CudaParallelCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcCustomTorsionForceKernel
::
CudaParallelCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -564,7 +564,7 @@ private:
...
@@ -564,7 +564,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcNonbondedForceKernel
::
CudaParallelCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcNonbondedForceKernel
::
CudaParallelCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcNonbondedForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcNonbondedForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcNonbondedForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcNonbondedForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -605,7 +605,7 @@ private:
...
@@ -605,7 +605,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcCustomNonbondedForceKernel
::
CudaParallelCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcCustomNonbondedForceKernel
::
CudaParallelCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomNonbondedForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomNonbondedForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomNonbondedForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomNonbondedForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -646,7 +646,7 @@ private:
...
@@ -646,7 +646,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcCustomExternalForceKernel
::
CudaParallelCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcCustomExternalForceKernel
::
CudaParallelCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomExternalForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomExternalForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomExternalForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomExternalForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -687,7 +687,7 @@ private:
...
@@ -687,7 +687,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcCustomHbondForceKernel
::
CudaParallelCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcCustomHbondForceKernel
::
CudaParallelCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomHbondForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomHbondForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomHbondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomHbondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -728,7 +728,7 @@ private:
...
@@ -728,7 +728,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
CudaParallelCalcCustomCompoundBondForceKernel
::
CudaParallelCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
)
:
CudaParallelCalcCustomCompoundBondForceKernel
::
CudaParallelCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomCompoundBondForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomCompoundBondForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomCompoundBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
CudaCalcCustomCompoundBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
...
platforms/cuda/src/CudaParallelKernels.h
View file @
0307a0db
...
@@ -92,7 +92,7 @@ private:
...
@@ -92,7 +92,7 @@ private:
*/
*/
class
CudaParallelCalcHarmonicBondForceKernel
:
public
CalcHarmonicBondForceKernel
{
class
CudaParallelCalcHarmonicBondForceKernel
:
public
CalcHarmonicBondForceKernel
{
public:
public:
CudaParallelCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcHarmonicBondForceKernel
&
getKernel
(
int
index
)
{
CudaCalcHarmonicBondForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcHarmonicBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcHarmonicBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -130,7 +130,7 @@ private:
...
@@ -130,7 +130,7 @@ private:
*/
*/
class
CudaParallelCalcCustomBondForceKernel
:
public
CalcCustomBondForceKernel
{
class
CudaParallelCalcCustomBondForceKernel
:
public
CalcCustomBondForceKernel
{
public:
public:
CudaParallelCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcCustomBondForceKernel
&
getKernel
(
int
index
)
{
CudaCalcCustomBondForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcCustomBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcCustomBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -168,7 +168,7 @@ private:
...
@@ -168,7 +168,7 @@ private:
*/
*/
class
CudaParallelCalcHarmonicAngleForceKernel
:
public
CalcHarmonicAngleForceKernel
{
class
CudaParallelCalcHarmonicAngleForceKernel
:
public
CalcHarmonicAngleForceKernel
{
public:
public:
CudaParallelCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcHarmonicAngleForceKernel
&
getKernel
(
int
index
)
{
CudaCalcHarmonicAngleForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcHarmonicAngleForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcHarmonicAngleForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -206,7 +206,7 @@ private:
...
@@ -206,7 +206,7 @@ private:
*/
*/
class
CudaParallelCalcCustomAngleForceKernel
:
public
CalcCustomAngleForceKernel
{
class
CudaParallelCalcCustomAngleForceKernel
:
public
CalcCustomAngleForceKernel
{
public:
public:
CudaParallelCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcCustomAngleForceKernel
&
getKernel
(
int
index
)
{
CudaCalcCustomAngleForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcCustomAngleForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcCustomAngleForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -244,7 +244,7 @@ private:
...
@@ -244,7 +244,7 @@ private:
*/
*/
class
CudaParallelCalcPeriodicTorsionForceKernel
:
public
CalcPeriodicTorsionForceKernel
{
class
CudaParallelCalcPeriodicTorsionForceKernel
:
public
CalcPeriodicTorsionForceKernel
{
public:
public:
CudaParallelCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcPeriodicTorsionForceKernel
&
getKernel
(
int
index
)
{
CudaCalcPeriodicTorsionForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcPeriodicTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcPeriodicTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -282,7 +282,7 @@ private:
...
@@ -282,7 +282,7 @@ private:
*/
*/
class
CudaParallelCalcRBTorsionForceKernel
:
public
CalcRBTorsionForceKernel
{
class
CudaParallelCalcRBTorsionForceKernel
:
public
CalcRBTorsionForceKernel
{
public:
public:
CudaParallelCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcRBTorsionForceKernel
&
getKernel
(
int
index
)
{
CudaCalcRBTorsionForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcRBTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcRBTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -320,7 +320,7 @@ private:
...
@@ -320,7 +320,7 @@ private:
*/
*/
class
CudaParallelCalcCMAPTorsionForceKernel
:
public
CalcCMAPTorsionForceKernel
{
class
CudaParallelCalcCMAPTorsionForceKernel
:
public
CalcCMAPTorsionForceKernel
{
public:
public:
CudaParallelCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcCMAPTorsionForceKernel
&
getKernel
(
int
index
)
{
CudaCalcCMAPTorsionForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcCMAPTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcCMAPTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -351,7 +351,7 @@ private:
...
@@ -351,7 +351,7 @@ private:
*/
*/
class
CudaParallelCalcCustomTorsionForceKernel
:
public
CalcCustomTorsionForceKernel
{
class
CudaParallelCalcCustomTorsionForceKernel
:
public
CalcCustomTorsionForceKernel
{
public:
public:
CudaParallelCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcCustomTorsionForceKernel
&
getKernel
(
int
index
)
{
CudaCalcCustomTorsionForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcCustomTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcCustomTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -389,7 +389,7 @@ private:
...
@@ -389,7 +389,7 @@ private:
*/
*/
class
CudaParallelCalcNonbondedForceKernel
:
public
CalcNonbondedForceKernel
{
class
CudaParallelCalcNonbondedForceKernel
:
public
CalcNonbondedForceKernel
{
public:
public:
CudaParallelCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcNonbondedForceKernel
&
getKernel
(
int
index
)
{
CudaCalcNonbondedForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcNonbondedForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcNonbondedForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -429,7 +429,7 @@ private:
...
@@ -429,7 +429,7 @@ private:
*/
*/
class
CudaParallelCalcCustomNonbondedForceKernel
:
public
CalcCustomNonbondedForceKernel
{
class
CudaParallelCalcCustomNonbondedForceKernel
:
public
CalcCustomNonbondedForceKernel
{
public:
public:
CudaParallelCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcCustomNonbondedForceKernel
&
getKernel
(
int
index
)
{
CudaCalcCustomNonbondedForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcCustomNonbondedForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcCustomNonbondedForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -467,7 +467,7 @@ private:
...
@@ -467,7 +467,7 @@ private:
*/
*/
class
CudaParallelCalcCustomExternalForceKernel
:
public
CalcCustomExternalForceKernel
{
class
CudaParallelCalcCustomExternalForceKernel
:
public
CalcCustomExternalForceKernel
{
public:
public:
CudaParallelCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcCustomExternalForceKernel
&
getKernel
(
int
index
)
{
CudaCalcCustomExternalForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcCustomExternalForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcCustomExternalForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -505,7 +505,7 @@ private:
...
@@ -505,7 +505,7 @@ private:
*/
*/
class
CudaParallelCalcCustomHbondForceKernel
:
public
CalcCustomHbondForceKernel
{
class
CudaParallelCalcCustomHbondForceKernel
:
public
CalcCustomHbondForceKernel
{
public:
public:
CudaParallelCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcCustomHbondForceKernel
&
getKernel
(
int
index
)
{
CudaCalcCustomHbondForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcCustomHbondForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcCustomHbondForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -543,7 +543,7 @@ private:
...
@@ -543,7 +543,7 @@ private:
*/
*/
class
CudaParallelCalcCustomCompoundBondForceKernel
:
public
CalcCustomCompoundBondForceKernel
{
class
CudaParallelCalcCustomCompoundBondForceKernel
:
public
CalcCustomCompoundBondForceKernel
{
public:
public:
CudaParallelCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
System
&
system
);
CudaParallelCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
CudaPlatform
::
PlatformData
&
data
,
const
System
&
system
);
CudaCalcCustomCompoundBondForceKernel
&
getKernel
(
int
index
)
{
CudaCalcCustomCompoundBondForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
CudaCalcCustomCompoundBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
CudaCalcCustomCompoundBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
...
platforms/opencl/src/OpenCLKernels.h
View file @
0307a0db
...
@@ -230,7 +230,7 @@ private:
...
@@ -230,7 +230,7 @@ private:
*/
*/
class
OpenCLCalcHarmonicBondForceKernel
:
public
CalcHarmonicBondForceKernel
{
class
OpenCLCalcHarmonicBondForceKernel
:
public
CalcHarmonicBondForceKernel
{
public:
public:
OpenCLCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcHarmonicBondForceKernel
(
name
,
platform
),
OpenCLCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcHarmonicBondForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
)
{
}
}
~
OpenCLCalcHarmonicBondForceKernel
();
~
OpenCLCalcHarmonicBondForceKernel
();
...
@@ -261,7 +261,7 @@ private:
...
@@ -261,7 +261,7 @@ private:
int
numBonds
;
int
numBonds
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLArray
*
params
;
OpenCLArray
*
params
;
};
};
...
@@ -270,7 +270,7 @@ private:
...
@@ -270,7 +270,7 @@ private:
*/
*/
class
OpenCLCalcCustomBondForceKernel
:
public
CalcCustomBondForceKernel
{
class
OpenCLCalcCustomBondForceKernel
:
public
CalcCustomBondForceKernel
{
public:
public:
OpenCLCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCustomBondForceKernel
(
name
,
platform
),
OpenCLCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCustomBondForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
}
}
~
OpenCLCalcCustomBondForceKernel
();
~
OpenCLCalcCustomBondForceKernel
();
...
@@ -301,7 +301,7 @@ private:
...
@@ -301,7 +301,7 @@ private:
int
numBonds
;
int
numBonds
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLParameterSet
*
params
;
OpenCLParameterSet
*
params
;
OpenCLArray
*
globals
;
OpenCLArray
*
globals
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
...
@@ -313,7 +313,7 @@ private:
...
@@ -313,7 +313,7 @@ private:
*/
*/
class
OpenCLCalcHarmonicAngleForceKernel
:
public
CalcHarmonicAngleForceKernel
{
class
OpenCLCalcHarmonicAngleForceKernel
:
public
CalcHarmonicAngleForceKernel
{
public:
public:
OpenCLCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcHarmonicAngleForceKernel
(
name
,
platform
),
OpenCLCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcHarmonicAngleForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
)
{
}
}
~
OpenCLCalcHarmonicAngleForceKernel
();
~
OpenCLCalcHarmonicAngleForceKernel
();
...
@@ -344,7 +344,7 @@ private:
...
@@ -344,7 +344,7 @@ private:
int
numAngles
;
int
numAngles
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLArray
*
params
;
OpenCLArray
*
params
;
};
};
...
@@ -353,7 +353,7 @@ private:
...
@@ -353,7 +353,7 @@ private:
*/
*/
class
OpenCLCalcCustomAngleForceKernel
:
public
CalcCustomAngleForceKernel
{
class
OpenCLCalcCustomAngleForceKernel
:
public
CalcCustomAngleForceKernel
{
public:
public:
OpenCLCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCustomAngleForceKernel
(
name
,
platform
),
OpenCLCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCustomAngleForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
}
}
~
OpenCLCalcCustomAngleForceKernel
();
~
OpenCLCalcCustomAngleForceKernel
();
...
@@ -384,7 +384,7 @@ private:
...
@@ -384,7 +384,7 @@ private:
int
numAngles
;
int
numAngles
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLParameterSet
*
params
;
OpenCLParameterSet
*
params
;
OpenCLArray
*
globals
;
OpenCLArray
*
globals
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
...
@@ -396,7 +396,7 @@ private:
...
@@ -396,7 +396,7 @@ private:
*/
*/
class
OpenCLCalcPeriodicTorsionForceKernel
:
public
CalcPeriodicTorsionForceKernel
{
class
OpenCLCalcPeriodicTorsionForceKernel
:
public
CalcPeriodicTorsionForceKernel
{
public:
public:
OpenCLCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcPeriodicTorsionForceKernel
(
name
,
platform
),
OpenCLCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcPeriodicTorsionForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
)
{
}
}
~
OpenCLCalcPeriodicTorsionForceKernel
();
~
OpenCLCalcPeriodicTorsionForceKernel
();
...
@@ -427,7 +427,7 @@ private:
...
@@ -427,7 +427,7 @@ private:
int
numTorsions
;
int
numTorsions
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLArray
*
params
;
OpenCLArray
*
params
;
};
};
...
@@ -436,7 +436,7 @@ private:
...
@@ -436,7 +436,7 @@ private:
*/
*/
class
OpenCLCalcRBTorsionForceKernel
:
public
CalcRBTorsionForceKernel
{
class
OpenCLCalcRBTorsionForceKernel
:
public
CalcRBTorsionForceKernel
{
public:
public:
OpenCLCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcRBTorsionForceKernel
(
name
,
platform
),
OpenCLCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcRBTorsionForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
)
{
}
}
~
OpenCLCalcRBTorsionForceKernel
();
~
OpenCLCalcRBTorsionForceKernel
();
...
@@ -467,7 +467,7 @@ private:
...
@@ -467,7 +467,7 @@ private:
int
numTorsions
;
int
numTorsions
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLArray
*
params
;
OpenCLArray
*
params
;
};
};
...
@@ -476,7 +476,7 @@ private:
...
@@ -476,7 +476,7 @@ private:
*/
*/
class
OpenCLCalcCMAPTorsionForceKernel
:
public
CalcCMAPTorsionForceKernel
{
class
OpenCLCalcCMAPTorsionForceKernel
:
public
CalcCMAPTorsionForceKernel
{
public:
public:
OpenCLCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCMAPTorsionForceKernel
(
name
,
platform
),
OpenCLCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCMAPTorsionForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
coefficients
(
NULL
),
mapPositions
(
NULL
),
torsionMaps
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
coefficients
(
NULL
),
mapPositions
(
NULL
),
torsionMaps
(
NULL
)
{
}
}
~
OpenCLCalcCMAPTorsionForceKernel
();
~
OpenCLCalcCMAPTorsionForceKernel
();
...
@@ -500,7 +500,7 @@ private:
...
@@ -500,7 +500,7 @@ private:
int
numTorsions
;
int
numTorsions
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLArray
*
coefficients
;
OpenCLArray
*
coefficients
;
OpenCLArray
*
mapPositions
;
OpenCLArray
*
mapPositions
;
OpenCLArray
*
torsionMaps
;
OpenCLArray
*
torsionMaps
;
...
@@ -511,7 +511,7 @@ private:
...
@@ -511,7 +511,7 @@ private:
*/
*/
class
OpenCLCalcCustomTorsionForceKernel
:
public
CalcCustomTorsionForceKernel
{
class
OpenCLCalcCustomTorsionForceKernel
:
public
CalcCustomTorsionForceKernel
{
public:
public:
OpenCLCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCustomTorsionForceKernel
(
name
,
platform
),
OpenCLCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCustomTorsionForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
}
}
~
OpenCLCalcCustomTorsionForceKernel
();
~
OpenCLCalcCustomTorsionForceKernel
();
...
@@ -542,7 +542,7 @@ private:
...
@@ -542,7 +542,7 @@ private:
int
numTorsions
;
int
numTorsions
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLParameterSet
*
params
;
OpenCLParameterSet
*
params
;
OpenCLArray
*
globals
;
OpenCLArray
*
globals
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
...
@@ -554,7 +554,7 @@ private:
...
@@ -554,7 +554,7 @@ private:
*/
*/
class
OpenCLCalcNonbondedForceKernel
:
public
CalcNonbondedForceKernel
{
class
OpenCLCalcNonbondedForceKernel
:
public
CalcNonbondedForceKernel
{
public:
public:
OpenCLCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcNonbondedForceKernel
(
name
,
platform
),
OpenCLCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcNonbondedForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
sigmaEpsilon
(
NULL
),
exceptionParams
(
NULL
),
cosSinSums
(
NULL
),
pmeGrid
(
NULL
),
hasInitializedKernel
(
false
),
cl
(
cl
),
sigmaEpsilon
(
NULL
),
exceptionParams
(
NULL
),
cosSinSums
(
NULL
),
pmeGrid
(
NULL
),
pmeGrid2
(
NULL
),
pmeBsplineModuliX
(
NULL
),
pmeBsplineModuliY
(
NULL
),
pmeBsplineModuliZ
(
NULL
),
pmeBsplineTheta
(
NULL
),
pmeGrid2
(
NULL
),
pmeBsplineModuliX
(
NULL
),
pmeBsplineModuliY
(
NULL
),
pmeBsplineModuliZ
(
NULL
),
pmeBsplineTheta
(
NULL
),
pmeAtomRange
(
NULL
),
pmeAtomGridIndex
(
NULL
),
sort
(
NULL
),
fft
(
NULL
)
{
pmeAtomRange
(
NULL
),
pmeAtomGridIndex
(
NULL
),
sort
(
NULL
),
fft
(
NULL
)
{
...
@@ -633,7 +633,7 @@ private:
...
@@ -633,7 +633,7 @@ private:
*/
*/
class
OpenCLCalcCustomNonbondedForceKernel
:
public
CalcCustomNonbondedForceKernel
{
class
OpenCLCalcCustomNonbondedForceKernel
:
public
CalcCustomNonbondedForceKernel
{
public:
public:
OpenCLCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCustomNonbondedForceKernel
(
name
,
platform
),
OpenCLCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCustomNonbondedForceKernel
(
name
,
platform
),
cl
(
cl
),
params
(
NULL
),
globals
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
cl
(
cl
),
params
(
NULL
),
globals
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
}
}
~
OpenCLCalcCustomNonbondedForceKernel
();
~
OpenCLCalcCustomNonbondedForceKernel
();
...
@@ -668,7 +668,7 @@ private:
...
@@ -668,7 +668,7 @@ private:
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
cl_float
>
globalParamValues
;
std
::
vector
<
cl_float
>
globalParamValues
;
std
::
vector
<
OpenCLArray
*>
tabulatedFunctions
;
std
::
vector
<
OpenCLArray
*>
tabulatedFunctions
;
System
&
system
;
const
System
&
system
;
};
};
/**
/**
...
@@ -727,7 +727,7 @@ private:
...
@@ -727,7 +727,7 @@ private:
*/
*/
class
OpenCLCalcCustomGBForceKernel
:
public
CalcCustomGBForceKernel
{
class
OpenCLCalcCustomGBForceKernel
:
public
CalcCustomGBForceKernel
{
public:
public:
OpenCLCalcCustomGBForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCustomGBForceKernel
(
name
,
platform
),
OpenCLCalcCustomGBForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCustomGBForceKernel
(
name
,
platform
),
hasInitializedKernels
(
false
),
cl
(
cl
),
params
(
NULL
),
computedValues
(
NULL
),
energyDerivs
(
NULL
),
longEnergyDerivs
(
NULL
),
globals
(
NULL
),
hasInitializedKernels
(
false
),
cl
(
cl
),
params
(
NULL
),
computedValues
(
NULL
),
energyDerivs
(
NULL
),
longEnergyDerivs
(
NULL
),
globals
(
NULL
),
valueBuffers
(
NULL
),
longValueBuffers
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
valueBuffers
(
NULL
),
longValueBuffers
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
}
}
...
@@ -771,7 +771,7 @@ private:
...
@@ -771,7 +771,7 @@ private:
std
::
vector
<
cl_float
>
globalParamValues
;
std
::
vector
<
cl_float
>
globalParamValues
;
std
::
vector
<
OpenCLArray
*>
tabulatedFunctions
;
std
::
vector
<
OpenCLArray
*>
tabulatedFunctions
;
std
::
vector
<
bool
>
pairValueUsesParam
,
pairEnergyUsesParam
,
pairEnergyUsesValue
;
std
::
vector
<
bool
>
pairValueUsesParam
,
pairEnergyUsesParam
,
pairEnergyUsesValue
;
System
&
system
;
const
System
&
system
;
cl
::
Kernel
pairValueKernel
,
perParticleValueKernel
,
pairEnergyKernel
,
perParticleEnergyKernel
,
gradientChainRuleKernel
;
cl
::
Kernel
pairValueKernel
,
perParticleValueKernel
,
pairEnergyKernel
,
perParticleEnergyKernel
,
gradientChainRuleKernel
;
std
::
string
pairValueSrc
,
pairEnergySrc
;
std
::
string
pairValueSrc
,
pairEnergySrc
;
std
::
map
<
std
::
string
,
std
::
string
>
pairValueDefines
,
pairEnergyDefines
;
std
::
map
<
std
::
string
,
std
::
string
>
pairValueDefines
,
pairEnergyDefines
;
...
@@ -782,7 +782,7 @@ private:
...
@@ -782,7 +782,7 @@ private:
*/
*/
class
OpenCLCalcCustomExternalForceKernel
:
public
CalcCustomExternalForceKernel
{
class
OpenCLCalcCustomExternalForceKernel
:
public
CalcCustomExternalForceKernel
{
public:
public:
OpenCLCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCustomExternalForceKernel
(
name
,
platform
),
OpenCLCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCustomExternalForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
hasInitializedKernel
(
false
),
cl
(
cl
),
system
(
system
),
params
(
NULL
),
globals
(
NULL
)
{
}
}
~
OpenCLCalcCustomExternalForceKernel
();
~
OpenCLCalcCustomExternalForceKernel
();
...
@@ -813,7 +813,7 @@ private:
...
@@ -813,7 +813,7 @@ private:
int
numParticles
;
int
numParticles
;
bool
hasInitializedKernel
;
bool
hasInitializedKernel
;
OpenCLContext
&
cl
;
OpenCLContext
&
cl
;
System
&
system
;
const
System
&
system
;
OpenCLParameterSet
*
params
;
OpenCLParameterSet
*
params
;
OpenCLArray
*
globals
;
OpenCLArray
*
globals
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
...
@@ -825,7 +825,7 @@ private:
...
@@ -825,7 +825,7 @@ private:
*/
*/
class
OpenCLCalcCustomHbondForceKernel
:
public
CalcCustomHbondForceKernel
{
class
OpenCLCalcCustomHbondForceKernel
:
public
CalcCustomHbondForceKernel
{
public:
public:
OpenCLCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCustomHbondForceKernel
(
name
,
platform
),
OpenCLCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCustomHbondForceKernel
(
name
,
platform
),
hasInitializedKernel
(
false
),
cl
(
cl
),
donorParams
(
NULL
),
acceptorParams
(
NULL
),
donors
(
NULL
),
acceptors
(
NULL
),
hasInitializedKernel
(
false
),
cl
(
cl
),
donorParams
(
NULL
),
acceptorParams
(
NULL
),
donors
(
NULL
),
acceptors
(
NULL
),
donorBufferIndices
(
NULL
),
acceptorBufferIndices
(
NULL
),
globals
(
NULL
),
donorExclusions
(
NULL
),
acceptorExclusions
(
NULL
),
donorBufferIndices
(
NULL
),
acceptorBufferIndices
(
NULL
),
globals
(
NULL
),
donorExclusions
(
NULL
),
acceptorExclusions
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
...
@@ -871,7 +871,7 @@ private:
...
@@ -871,7 +871,7 @@ private:
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
cl_float
>
globalParamValues
;
std
::
vector
<
cl_float
>
globalParamValues
;
std
::
vector
<
OpenCLArray
*>
tabulatedFunctions
;
std
::
vector
<
OpenCLArray
*>
tabulatedFunctions
;
System
&
system
;
const
System
&
system
;
cl
::
Kernel
donorKernel
,
acceptorKernel
;
cl
::
Kernel
donorKernel
,
acceptorKernel
;
};
};
...
@@ -880,7 +880,7 @@ private:
...
@@ -880,7 +880,7 @@ private:
*/
*/
class
OpenCLCalcCustomCompoundBondForceKernel
:
public
CalcCustomCompoundBondForceKernel
{
class
OpenCLCalcCustomCompoundBondForceKernel
:
public
CalcCustomCompoundBondForceKernel
{
public:
public:
OpenCLCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
System
&
system
)
:
CalcCustomCompoundBondForceKernel
(
name
,
platform
),
OpenCLCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLContext
&
cl
,
const
System
&
system
)
:
CalcCustomCompoundBondForceKernel
(
name
,
platform
),
cl
(
cl
),
params
(
NULL
),
globals
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
cl
(
cl
),
params
(
NULL
),
globals
(
NULL
),
tabulatedFunctionParams
(
NULL
),
system
(
system
)
{
}
}
~
OpenCLCalcCustomCompoundBondForceKernel
();
~
OpenCLCalcCustomCompoundBondForceKernel
();
...
@@ -917,7 +917,7 @@ private:
...
@@ -917,7 +917,7 @@ private:
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
std
::
string
>
globalParamNames
;
std
::
vector
<
cl_float
>
globalParamValues
;
std
::
vector
<
cl_float
>
globalParamValues
;
std
::
vector
<
OpenCLArray
*>
tabulatedFunctions
;
std
::
vector
<
OpenCLArray
*>
tabulatedFunctions
;
System
&
system
;
const
System
&
system
;
};
};
/**
/**
...
...
platforms/opencl/src/OpenCLParallelKernels.cpp
View file @
0307a0db
...
@@ -215,7 +215,7 @@ private:
...
@@ -215,7 +215,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcHarmonicBondForceKernel
::
OpenCLParallelCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcHarmonicBondForceKernel
::
OpenCLParallelCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcHarmonicBondForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcHarmonicBondForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcHarmonicBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcHarmonicBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -256,7 +256,7 @@ private:
...
@@ -256,7 +256,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcCustomBondForceKernel
::
OpenCLParallelCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcCustomBondForceKernel
::
OpenCLParallelCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomBondForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomBondForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -297,7 +297,7 @@ private:
...
@@ -297,7 +297,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcHarmonicAngleForceKernel
::
OpenCLParallelCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcHarmonicAngleForceKernel
::
OpenCLParallelCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcHarmonicAngleForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcHarmonicAngleForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcHarmonicAngleForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcHarmonicAngleForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -338,7 +338,7 @@ private:
...
@@ -338,7 +338,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcCustomAngleForceKernel
::
OpenCLParallelCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcCustomAngleForceKernel
::
OpenCLParallelCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomAngleForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomAngleForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomAngleForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomAngleForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -379,7 +379,7 @@ private:
...
@@ -379,7 +379,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcPeriodicTorsionForceKernel
::
OpenCLParallelCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcPeriodicTorsionForceKernel
::
OpenCLParallelCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcPeriodicTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcPeriodicTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcPeriodicTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcPeriodicTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -420,7 +420,7 @@ private:
...
@@ -420,7 +420,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcRBTorsionForceKernel
::
OpenCLParallelCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcRBTorsionForceKernel
::
OpenCLParallelCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcRBTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcRBTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcRBTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcRBTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -461,7 +461,7 @@ private:
...
@@ -461,7 +461,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcCMAPTorsionForceKernel
::
OpenCLParallelCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcCMAPTorsionForceKernel
::
OpenCLParallelCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCMAPTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCMAPTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCMAPTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCMAPTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -497,7 +497,7 @@ private:
...
@@ -497,7 +497,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcCustomTorsionForceKernel
::
OpenCLParallelCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcCustomTorsionForceKernel
::
OpenCLParallelCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomTorsionForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomTorsionForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -538,7 +538,7 @@ private:
...
@@ -538,7 +538,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcNonbondedForceKernel
::
OpenCLParallelCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcNonbondedForceKernel
::
OpenCLParallelCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcNonbondedForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcNonbondedForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcNonbondedForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcNonbondedForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -579,7 +579,7 @@ private:
...
@@ -579,7 +579,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcCustomNonbondedForceKernel
::
OpenCLParallelCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcCustomNonbondedForceKernel
::
OpenCLParallelCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomNonbondedForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomNonbondedForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomNonbondedForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomNonbondedForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -620,7 +620,7 @@ private:
...
@@ -620,7 +620,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcCustomExternalForceKernel
::
OpenCLParallelCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcCustomExternalForceKernel
::
OpenCLParallelCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomExternalForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomExternalForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomExternalForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomExternalForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -661,7 +661,7 @@ private:
...
@@ -661,7 +661,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcCustomHbondForceKernel
::
OpenCLParallelCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcCustomHbondForceKernel
::
OpenCLParallelCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomHbondForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomHbondForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomHbondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomHbondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
@@ -702,7 +702,7 @@ private:
...
@@ -702,7 +702,7 @@ private:
double
&
energy
;
double
&
energy
;
};
};
OpenCLParallelCalcCustomCompoundBondForceKernel
::
OpenCLParallelCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
)
:
OpenCLParallelCalcCustomCompoundBondForceKernel
::
OpenCLParallelCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
)
:
CalcCustomCompoundBondForceKernel
(
name
,
platform
),
data
(
data
)
{
CalcCustomCompoundBondForceKernel
(
name
,
platform
),
data
(
data
)
{
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
data
.
contexts
.
size
();
i
++
)
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomCompoundBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
kernels
.
push_back
(
Kernel
(
new
OpenCLCalcCustomCompoundBondForceKernel
(
name
,
platform
,
*
data
.
contexts
[
i
],
system
)));
...
...
platforms/opencl/src/OpenCLParallelKernels.h
View file @
0307a0db
...
@@ -93,7 +93,7 @@ private:
...
@@ -93,7 +93,7 @@ private:
*/
*/
class
OpenCLParallelCalcHarmonicBondForceKernel
:
public
CalcHarmonicBondForceKernel
{
class
OpenCLParallelCalcHarmonicBondForceKernel
:
public
CalcHarmonicBondForceKernel
{
public:
public:
OpenCLParallelCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcHarmonicBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcHarmonicBondForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcHarmonicBondForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcHarmonicBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcHarmonicBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -131,7 +131,7 @@ private:
...
@@ -131,7 +131,7 @@ private:
*/
*/
class
OpenCLParallelCalcCustomBondForceKernel
:
public
CalcCustomBondForceKernel
{
class
OpenCLParallelCalcCustomBondForceKernel
:
public
CalcCustomBondForceKernel
{
public:
public:
OpenCLParallelCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcCustomBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcCustomBondForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcCustomBondForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcCustomBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcCustomBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -169,7 +169,7 @@ private:
...
@@ -169,7 +169,7 @@ private:
*/
*/
class
OpenCLParallelCalcHarmonicAngleForceKernel
:
public
CalcHarmonicAngleForceKernel
{
class
OpenCLParallelCalcHarmonicAngleForceKernel
:
public
CalcHarmonicAngleForceKernel
{
public:
public:
OpenCLParallelCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcHarmonicAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcHarmonicAngleForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcHarmonicAngleForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcHarmonicAngleForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcHarmonicAngleForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -207,7 +207,7 @@ private:
...
@@ -207,7 +207,7 @@ private:
*/
*/
class
OpenCLParallelCalcCustomAngleForceKernel
:
public
CalcCustomAngleForceKernel
{
class
OpenCLParallelCalcCustomAngleForceKernel
:
public
CalcCustomAngleForceKernel
{
public:
public:
OpenCLParallelCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcCustomAngleForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcCustomAngleForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcCustomAngleForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcCustomAngleForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcCustomAngleForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -245,7 +245,7 @@ private:
...
@@ -245,7 +245,7 @@ private:
*/
*/
class
OpenCLParallelCalcPeriodicTorsionForceKernel
:
public
CalcPeriodicTorsionForceKernel
{
class
OpenCLParallelCalcPeriodicTorsionForceKernel
:
public
CalcPeriodicTorsionForceKernel
{
public:
public:
OpenCLParallelCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcPeriodicTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcPeriodicTorsionForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcPeriodicTorsionForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcPeriodicTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcPeriodicTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -283,7 +283,7 @@ private:
...
@@ -283,7 +283,7 @@ private:
*/
*/
class
OpenCLParallelCalcRBTorsionForceKernel
:
public
CalcRBTorsionForceKernel
{
class
OpenCLParallelCalcRBTorsionForceKernel
:
public
CalcRBTorsionForceKernel
{
public:
public:
OpenCLParallelCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcRBTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcRBTorsionForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcRBTorsionForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcRBTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcRBTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -321,7 +321,7 @@ private:
...
@@ -321,7 +321,7 @@ private:
*/
*/
class
OpenCLParallelCalcCMAPTorsionForceKernel
:
public
CalcCMAPTorsionForceKernel
{
class
OpenCLParallelCalcCMAPTorsionForceKernel
:
public
CalcCMAPTorsionForceKernel
{
public:
public:
OpenCLParallelCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcCMAPTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcCMAPTorsionForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcCMAPTorsionForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcCMAPTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcCMAPTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -352,7 +352,7 @@ private:
...
@@ -352,7 +352,7 @@ private:
*/
*/
class
OpenCLParallelCalcCustomTorsionForceKernel
:
public
CalcCustomTorsionForceKernel
{
class
OpenCLParallelCalcCustomTorsionForceKernel
:
public
CalcCustomTorsionForceKernel
{
public:
public:
OpenCLParallelCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcCustomTorsionForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcCustomTorsionForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcCustomTorsionForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcCustomTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcCustomTorsionForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -390,7 +390,7 @@ private:
...
@@ -390,7 +390,7 @@ private:
*/
*/
class
OpenCLParallelCalcNonbondedForceKernel
:
public
CalcNonbondedForceKernel
{
class
OpenCLParallelCalcNonbondedForceKernel
:
public
CalcNonbondedForceKernel
{
public:
public:
OpenCLParallelCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcNonbondedForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcNonbondedForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcNonbondedForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcNonbondedForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -430,7 +430,7 @@ private:
...
@@ -430,7 +430,7 @@ private:
*/
*/
class
OpenCLParallelCalcCustomNonbondedForceKernel
:
public
CalcCustomNonbondedForceKernel
{
class
OpenCLParallelCalcCustomNonbondedForceKernel
:
public
CalcCustomNonbondedForceKernel
{
public:
public:
OpenCLParallelCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcCustomNonbondedForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcCustomNonbondedForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcCustomNonbondedForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcCustomNonbondedForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcCustomNonbondedForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -468,7 +468,7 @@ private:
...
@@ -468,7 +468,7 @@ private:
*/
*/
class
OpenCLParallelCalcCustomExternalForceKernel
:
public
CalcCustomExternalForceKernel
{
class
OpenCLParallelCalcCustomExternalForceKernel
:
public
CalcCustomExternalForceKernel
{
public:
public:
OpenCLParallelCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcCustomExternalForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcCustomExternalForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcCustomExternalForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcCustomExternalForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcCustomExternalForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -506,7 +506,7 @@ private:
...
@@ -506,7 +506,7 @@ private:
*/
*/
class
OpenCLParallelCalcCustomHbondForceKernel
:
public
CalcCustomHbondForceKernel
{
class
OpenCLParallelCalcCustomHbondForceKernel
:
public
CalcCustomHbondForceKernel
{
public:
public:
OpenCLParallelCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcCustomHbondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcCustomHbondForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcCustomHbondForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcCustomHbondForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcCustomHbondForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
@@ -544,7 +544,7 @@ private:
...
@@ -544,7 +544,7 @@ private:
*/
*/
class
OpenCLParallelCalcCustomCompoundBondForceKernel
:
public
CalcCustomCompoundBondForceKernel
{
class
OpenCLParallelCalcCustomCompoundBondForceKernel
:
public
CalcCustomCompoundBondForceKernel
{
public:
public:
OpenCLParallelCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
System
&
system
);
OpenCLParallelCalcCustomCompoundBondForceKernel
(
std
::
string
name
,
const
Platform
&
platform
,
OpenCLPlatform
::
PlatformData
&
data
,
const
System
&
system
);
OpenCLCalcCustomCompoundBondForceKernel
&
getKernel
(
int
index
)
{
OpenCLCalcCustomCompoundBondForceKernel
&
getKernel
(
int
index
)
{
return
dynamic_cast
<
OpenCLCalcCustomCompoundBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
return
dynamic_cast
<
OpenCLCalcCustomCompoundBondForceKernel
&>
(
kernels
[
index
].
getImpl
());
}
}
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaAngleForce.h
View file @
0307a0db
...
@@ -168,7 +168,7 @@ public:
...
@@ -168,7 +168,7 @@ public:
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
double
_globalCubicK
,
_globalQuarticK
,
_globalPenticK
,
_globalSexticK
;
double
_globalCubicK
,
_globalQuarticK
,
_globalPenticK
,
_globalSexticK
;
private:
private:
class
AngleInfo
;
class
AngleInfo
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaBondForce.h
View file @
0307a0db
...
@@ -141,7 +141,7 @@ public:
...
@@ -141,7 +141,7 @@ public:
protected:
protected:
double
_globalQuarticK
,
_globalCubicK
;
double
_globalQuarticK
,
_globalCubicK
;
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
private:
private:
class
BondInfo
;
class
BondInfo
;
std
::
vector
<
BondInfo
>
bonds
;
std
::
vector
<
BondInfo
>
bonds
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaGeneralizedKirkwoodForce.h
View file @
0307a0db
...
@@ -165,7 +165,7 @@ public:
...
@@ -165,7 +165,7 @@ public:
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
private:
private:
class
ParticleInfo
;
class
ParticleInfo
;
int
includeCavityTerm
;
int
includeCavityTerm
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaInPlaneAngleForce.h
View file @
0307a0db
...
@@ -173,7 +173,7 @@ public:
...
@@ -173,7 +173,7 @@ public:
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
double
_globalCubicK
,
_globalQuarticK
,
_globalPenticK
,
_globalSexticK
;
double
_globalCubicK
,
_globalQuarticK
,
_globalPenticK
,
_globalSexticK
;
private:
private:
class
AngleInfo
;
class
AngleInfo
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaMultipoleForce.h
View file @
0307a0db
...
@@ -343,7 +343,7 @@ public:
...
@@ -343,7 +343,7 @@ public:
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
private:
private:
NonbondedMethod
nonbondedMethod
;
NonbondedMethod
nonbondedMethod
;
PolarizationType
polarizationType
;
PolarizationType
polarizationType
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaOutOfPlaneBendForce.h
View file @
0307a0db
...
@@ -165,7 +165,7 @@ public:
...
@@ -165,7 +165,7 @@ public:
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
double
_globalCubicK
,
_globalQuarticK
,
_globalPenticK
,
_globalSexticK
;
double
_globalCubicK
,
_globalQuarticK
,
_globalPenticK
,
_globalSexticK
;
private:
private:
class
OutOfPlaneBendInfo
;
class
OutOfPlaneBendInfo
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaPiTorsionForce.h
View file @
0307a0db
...
@@ -115,7 +115,7 @@ public:
...
@@ -115,7 +115,7 @@ public:
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
private:
private:
class
PiTorsionInfo
;
class
PiTorsionInfo
;
std
::
vector
<
PiTorsionInfo
>
piTorsions
;
std
::
vector
<
PiTorsionInfo
>
piTorsions
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaStretchBendForce.h
View file @
0307a0db
...
@@ -118,7 +118,7 @@ public:
...
@@ -118,7 +118,7 @@ public:
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
private:
private:
class
StretchBendInfo
;
class
StretchBendInfo
;
std
::
vector
<
StretchBendInfo
>
stretchBends
;
std
::
vector
<
StretchBendInfo
>
stretchBends
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaTorsionTorsionForce.h
View file @
0307a0db
...
@@ -137,7 +137,7 @@ public:
...
@@ -137,7 +137,7 @@ public:
void
setTorsionTorsionGrid
(
int
index
,
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
grid
);
void
setTorsionTorsionGrid
(
int
index
,
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
double
>
>
>&
grid
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
private:
private:
class
TorsionTorsionInfo
;
class
TorsionTorsionInfo
;
class
TorsionTorsionGridInfo
;
class
TorsionTorsionGridInfo
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaVdwForce.h
View file @
0307a0db
...
@@ -214,7 +214,7 @@ public:
...
@@ -214,7 +214,7 @@ public:
void
updateParametersInContext
(
Context
&
context
);
void
updateParametersInContext
(
Context
&
context
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
private:
private:
class
VdwInfo
;
class
VdwInfo
;
...
...
plugins/amoeba/openmmapi/include/openmm/AmoebaWcaDispersionForce.h
View file @
0307a0db
...
@@ -123,7 +123,7 @@ public:
...
@@ -123,7 +123,7 @@ public:
void
setSlevy
(
double
inputValue
);
void
setSlevy
(
double
inputValue
);
protected:
protected:
ForceImpl
*
createImpl
();
ForceImpl
*
createImpl
()
const
;
private:
private:
class
WcaDispersionInfo
;
class
WcaDispersionInfo
;
double
epso
;
double
epso
;
...
...
Prev
1
2
3
4
5
6
7
Next
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