Commit 31cd86f8 authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Merge up changes from PreviewRelease4 branch, revisions 1600:1621

parent e7813ee0
...@@ -50,8 +50,10 @@ FOREACH(EX_ROOT ${CPP_EXAMPLES}) ...@@ -50,8 +50,10 @@ 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}) FOREACH(EX_ROOT ${C_EXAMPLES})
IF (BUILD_TESTING_SHARED) IF (BUILD_TESTING_SHARED)
# Link with shared library # Link with shared library
...@@ -78,7 +80,6 @@ IF(OPENMM_BUILD_API_WRAPPERS) ...@@ -78,7 +80,6 @@ IF(OPENMM_BUILD_API_WRAPPERS)
TARGET_LINK_LIBRARIES(${EX_STATIC} ${STATIC_TARGET}) TARGET_LINK_LIBRARIES(${EX_STATIC} ${STATIC_TARGET})
ADD_DEPENDENCIES(${EX_STATIC} ApiWrappers) ADD_DEPENDENCIES(${EX_STATIC} ApiWrappers)
ENDIF (BUILD_TESTING_STATIC) 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)
...@@ -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() {
......
...@@ -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);
...@@ -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");
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment