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
31cd86f8
Commit
31cd86f8
authored
Aug 24, 2009
by
Christopher Bruns
Browse files
Merge up changes from PreviewRelease4 branch, revisions 1600:1621
parent
e7813ee0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
36 deletions
+37
-36
examples/CMakeLists.txt
examples/CMakeLists.txt
+32
-31
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+2
-2
platforms/cuda/src/kernels/cudaKernels.h
platforms/cuda/src/kernels/cudaKernels.h
+1
-1
platforms/cuda/src/kernels/kCalculateCustomNonbondedForces.cu
...forms/cuda/src/kernels/kCalculateCustomNonbondedForces.cu
+2
-2
No files found.
examples/CMakeLists.txt
View file @
31cd86f8
...
@@ -50,35 +50,36 @@ FOREACH(EX_ROOT ${CPP_EXAMPLES})
...
@@ -50,35 +50,36 @@ FOREACH(EX_ROOT ${CPP_EXAMPLES})
ENDFOREACH
(
EX_ROOT
${
CPP_EXAMPLES
}
)
ENDFOREACH
(
EX_ROOT
${
CPP_EXAMPLES
}
)
# Only build wrapper examples if wrappers have been built
IF
(
OPENMM_BUILD_API_WRAPPERS
)
IF
(
OPENMM_BUILD_API_WRAPPERS
)
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_BINARY_DIR
}
/wrappers
)
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_BINARY_DIR
}
/wrappers
)
FOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
IF
(
BUILD_TESTING_SHARED
)
FOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
# Link with shared library
IF
(
BUILD_TESTING_SHARED
)
# We need at least one .cpp here to get CMake to include
# Link with shared library
# C++ libraries on the link line.
# We need at least one .cpp here to get CMake to include
ADD_EXECUTABLE
(
${
EX_ROOT
}
${
EX_ROOT
}
.c Empty.cpp
)
# C++ libraries on the link line.
SET_TARGET_PROPERTIES
(
${
EX_ROOT
}
ADD_EXECUTABLE
(
${
EX_ROOT
}
${
EX_ROOT
}
.c Empty.cpp
)
PROPERTIES
SET_TARGET_PROPERTIES
(
${
EX_ROOT
}
PROJECT_LABEL
"Example C -
${
EX_ROOT
}
"
)
PROPERTIES
TARGET_LINK_LIBRARIES
(
${
EX_ROOT
}
${
SHARED_TARGET
}
)
PROJECT_LABEL
"Example C -
${
EX_ROOT
}
"
)
ADD_DEPENDENCIES
(
${
EX_ROOT
}
ApiWrappers
)
TARGET_LINK_LIBRARIES
(
${
EX_ROOT
}
${
SHARED_TARGET
}
)
ENDIF
(
BUILD_TESTING_SHARED
)
ADD_DEPENDENCIES
(
${
EX_ROOT
}
ApiWrappers
)
ENDIF
(
BUILD_TESTING_SHARED
)
IF
(
BUILD_TESTING_STATIC
)
# Link with static library
IF
(
BUILD_TESTING_STATIC
)
SET
(
EX_STATIC
${
EX_ROOT
}
Static
)
# Link with static library
# We need at least one .cpp here to get CMake to include
SET
(
EX_STATIC
${
EX_ROOT
}
Static
)
# C++ libraries on the static link line.
# We need at least one .cpp here to get CMake to include
ADD_EXECUTABLE
(
${
EX_STATIC
}
${
EX_ROOT
}
.c Empty.cpp
)
# C++ libraries on the static link line.
SET_TARGET_PROPERTIES
(
${
EX_STATIC
}
ADD_EXECUTABLE
(
${
EX_STATIC
}
${
EX_ROOT
}
.c Empty.cpp
)
PROPERTIES
SET_TARGET_PROPERTIES
(
${
EX_STATIC
}
COMPILE_FLAGS
"-DOPENMM_USE_STATIC_LIBRAR
IES
"
PROPERT
IES
PROJECT_LABEL
"Example C -
${
EX_STATIC
}
"
)
COMPILE_FLAGS
"-DOPENMM_USE_STATIC_LIBRARIES"
TARGET_LINK_LIBRARIES
(
${
EX_STATIC
}
${
STATIC_TARGET
}
)
PROJECT_LABEL
"Example C -
${
EX_STATIC
}
"
)
ADD_DEPENDENC
IES
(
${
EX_STATIC
}
ApiWrappers
)
TARGET_LINK_LIBRAR
IES
(
${
EX_STATIC
}
${
STATIC_TARGET
}
)
ENDIF
(
BUILD_TESTING_STATIC
)
ADD_DEPENDENCIES
(
${
EX_STATIC
}
ApiWrappers
)
ENDIF
(
BUILD_TESTING_STATIC
)
ENDFOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
ENDFOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
ENDIF
(
OPENMM_BUILD_API_WRAPPERS
)
ENDIF
(
OPENMM_BUILD_API_WRAPPERS
)
...
@@ -90,6 +91,9 @@ FOREACH(EX_ROOT ${F_EXAMPLES})
...
@@ -90,6 +91,9 @@ FOREACH(EX_ROOT ${F_EXAMPLES})
INSTALL
(
FILES
${
EX_ROOT
}
.f90 DESTINATION examples
)
INSTALL
(
FILES
${
EX_ROOT
}
.f90 DESTINATION examples
)
ENDFOREACH
(
EX_ROOT
${
F_EXAMPLES
}
)
ENDFOREACH
(
EX_ROOT
${
F_EXAMPLES
}
)
INSTALL
(
FILES HelloArgonInCVS8/HelloArgonInC.vcproj
HelloArgonInCVS8/HelloArgonInC.sln
DESTINATION examples/VisualStudio2005
)
INSTALL
(
FILES README.txt DESTINATION examples
)
INSTALL
(
FILES README.txt DESTINATION examples
)
INSTALL
(
FILES Makefile NMakefile DESTINATION examples
)
INSTALL
(
FILES Makefile NMakefile DESTINATION examples
)
...
@@ -97,8 +101,5 @@ INSTALL(FILES Makefile NMakefile DESTINATION examples)
...
@@ -97,8 +101,5 @@ INSTALL(FILES Makefile NMakefile DESTINATION examples)
INSTALL
(
FILES HelloArgonVS8/HelloArgon.vcproj
INSTALL
(
FILES HelloArgonVS8/HelloArgon.vcproj
HelloArgonVS8/HelloArgon.sln
HelloArgonVS8/HelloArgon.sln
DESTINATION examples/VisualStudio2005
)
DESTINATION examples/VisualStudio2005
)
INSTALL
(
FILES HelloArgonInCVS8/HelloArgonInC.vcproj
HelloArgonInCVS8/HelloArgonInC.sln
DESTINATION examples/VisualStudio2005
)
INSTALL
(
FILES HelloOpenMM.ppt
INSTALL
(
FILES HelloOpenMM.ppt
DESTINATION examples
)
DESTINATION examples
)
platforms/cuda/src/CudaKernels.cpp
View file @
31cd86f8
...
@@ -451,7 +451,7 @@ void CudaCalcCustomNonbondedForceKernel::initialize(const System& system, const
...
@@ -451,7 +451,7 @@ void CudaCalcCustomNonbondedForceKernel::initialize(const System& system, const
gpuSetCustomNonbondedParameters
(
gpu
,
parameters
,
exclusionList
,
exceptionParticle1
,
exceptionParticle2
,
exceptionParams
,
method
,
gpuSetCustomNonbondedParameters
(
gpu
,
parameters
,
exclusionList
,
exceptionParticle1
,
exceptionParticle2
,
exceptionParams
,
method
,
(
float
)
force
.
getCutoffDistance
(),
force
.
getEnergyFunction
(),
combiningRules
,
paramNames
,
globalParamNames
);
(
float
)
force
.
getCutoffDistance
(),
force
.
getEnergyFunction
(),
combiningRules
,
paramNames
,
globalParamNames
);
if
(
globalParamValues
.
size
()
>
0
)
if
(
globalParamValues
.
size
()
>
0
)
SetCustomNonbondedGlobalParams
(
globalParamValues
);
SetCustomNonbondedGlobalParams
(
&
globalParamValues
[
0
]
);
}
}
void
CudaCalcCustomNonbondedForceKernel
::
executeForces
(
ContextImpl
&
context
)
{
void
CudaCalcCustomNonbondedForceKernel
::
executeForces
(
ContextImpl
&
context
)
{
...
@@ -478,7 +478,7 @@ void CudaCalcCustomNonbondedForceKernel::updateGlobalParams(ContextImpl& context
...
@@ -478,7 +478,7 @@ void CudaCalcCustomNonbondedForceKernel::updateGlobalParams(ContextImpl& context
globalParamValues
[
i
]
=
value
;
globalParamValues
[
i
]
=
value
;
}
}
if
(
changed
)
if
(
changed
)
SetCustomNonbondedGlobalParams
(
globalParamValues
);
SetCustomNonbondedGlobalParams
(
&
globalParamValues
[
0
]
);
}
}
CudaCalcGBSAOBCForceKernel
::~
CudaCalcGBSAOBCForceKernel
()
{
CudaCalcGBSAOBCForceKernel
::~
CudaCalcGBSAOBCForceKernel
()
{
...
...
platforms/cuda/src/kernels/cudaKernels.h
View file @
31cd86f8
...
@@ -96,4 +96,4 @@ extern void GetRandomSim(gpuContext gpu);
...
@@ -96,4 +96,4 @@ extern void GetRandomSim(gpuContext gpu);
extern
void
SetCustomNonbondedForceExpression
(
const
Expression
<
128
>&
expression
);
extern
void
SetCustomNonbondedForceExpression
(
const
Expression
<
128
>&
expression
);
extern
void
SetCustomNonbondedEnergyExpression
(
const
Expression
<
128
>&
expression
);
extern
void
SetCustomNonbondedEnergyExpression
(
const
Expression
<
128
>&
expression
);
extern
void
SetCustomNonbondedCombiningRules
(
const
Expression
<
64
>*
expressions
);
extern
void
SetCustomNonbondedCombiningRules
(
const
Expression
<
64
>*
expressions
);
extern
void
SetCustomNonbondedGlobalParams
(
const
std
::
vector
<
float
>&
paramValues
);
extern
void
SetCustomNonbondedGlobalParams
(
float
*
paramValues
);
platforms/cuda/src/kernels/kCalculateCustomNonbondedForces.cu
View file @
31cd86f8
...
@@ -90,10 +90,10 @@ void SetCustomNonbondedCombiningRules(const Expression<64>* expressions)
...
@@ -90,10 +90,10 @@ void SetCustomNonbondedCombiningRules(const Expression<64>* expressions)
RTERROR
(
status
,
"SetCustomNonbondedCombiningRules: cudaMemcpyToSymbol failed"
);
RTERROR
(
status
,
"SetCustomNonbondedCombiningRules: cudaMemcpyToSymbol failed"
);
}
}
void
SetCustomNonbondedGlobalParams
(
const
vector
<
float
>&
paramValues
)
void
SetCustomNonbondedGlobalParams
(
float
*
paramValues
)
{
{
cudaError_t
status
;
cudaError_t
status
;
status
=
cudaMemcpyToSymbol
(
globalParams
,
&
paramValues
[
0
]
,
sizeof
(
globalParams
));
status
=
cudaMemcpyToSymbol
(
globalParams
,
paramValues
,
sizeof
(
globalParams
));
RTERROR
(
status
,
"SetCustomNonbondedGlobalParams: cudaMemcpyToSymbol failed"
);
RTERROR
(
status
,
"SetCustomNonbondedGlobalParams: cudaMemcpyToSymbol failed"
);
}
}
...
...
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