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