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})
ENDFOREACH
(
EX_ROOT
${
CPP_EXAMPLES
}
)
# Only build wrapper examples if wrappers have been built
IF
(
OPENMM_BUILD_API_WRAPPERS
)
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_BINARY_DIR
}
/wrappers
)
FOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
IF
(
BUILD_TESTING_SHARED
)
# Link with shared library
# We need at least one .cpp here to get CMake to include
# C++ libraries on the link line.
ADD_EXECUTABLE
(
${
EX_ROOT
}
${
EX_ROOT
}
.c Empty.cpp
)
SET_TARGET_PROPERTIES
(
${
EX_ROOT
}
PROPERTIES
PROJECT_LABEL
"Example C -
${
EX_ROOT
}
"
)
TARGET_LINK_LIBRARIES
(
${
EX_ROOT
}
${
SHARED_TARGET
}
)
ADD_DEPENDENCIES
(
${
EX_ROOT
}
ApiWrappers
)
ENDIF
(
BUILD_TESTING_SHARED
)
IF
(
BUILD_TESTING_STATIC
)
# Link with static library
SET
(
EX_STATIC
${
EX_ROOT
}
Static
)
# We need at least one .cpp here to get CMake to include
# C++ libraries on the static link line.
ADD_EXECUTABLE
(
${
EX_STATIC
}
${
EX_ROOT
}
.c Empty.cpp
)
SET_TARGET_PROPERTIES
(
${
EX_STATIC
}
PROPERTIES
COMPILE_FLAGS
"-DOPENMM_USE_STATIC_LIBRAR
IES
"
PROJECT_LABEL
"Example C -
${
EX_STATIC
}
"
)
TARGET_LINK_LIBRARIES
(
${
EX_STATIC
}
${
STATIC_TARGET
}
)
ADD_DEPENDENC
IES
(
${
EX_STATIC
}
ApiWrappers
)
ENDIF
(
BUILD_TESTING_STATIC
)
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_BINARY_DIR
}
/wrappers
)
FOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
IF
(
BUILD_TESTING_SHARED
)
# Link with shared library
# We need at least one .cpp here to get CMake to include
# C++ libraries on the link line.
ADD_EXECUTABLE
(
${
EX_ROOT
}
${
EX_ROOT
}
.c Empty.cpp
)
SET_TARGET_PROPERTIES
(
${
EX_ROOT
}
PROPERTIES
PROJECT_LABEL
"Example C -
${
EX_ROOT
}
"
)
TARGET_LINK_LIBRARIES
(
${
EX_ROOT
}
${
SHARED_TARGET
}
)
ADD_DEPENDENCIES
(
${
EX_ROOT
}
ApiWrappers
)
ENDIF
(
BUILD_TESTING_SHARED
)
IF
(
BUILD_TESTING_STATIC
)
# Link with static library
SET
(
EX_STATIC
${
EX_ROOT
}
Static
)
# We need at least one .cpp here to get CMake to include
# C++ libraries on the static link line.
ADD_EXECUTABLE
(
${
EX_STATIC
}
${
EX_ROOT
}
.c Empty.cpp
)
SET_TARGET_PROPERTIES
(
${
EX_STATIC
}
PROPERT
IES
COMPILE_FLAGS
"-DOPENMM_USE_STATIC_LIBRARIES"
PROJECT_LABEL
"Example C -
${
EX_STATIC
}
"
)
TARGET_LINK_LIBRAR
IES
(
${
EX_STATIC
}
${
STATIC_TARGET
}
)
ADD_DEPENDENCIES
(
${
EX_STATIC
}
ApiWrappers
)
ENDIF
(
BUILD_TESTING_STATIC
)
ENDFOREACH
(
EX_ROOT
${
C_EXAMPLES
}
)
ENDIF
(
OPENMM_BUILD_API_WRAPPERS
)
...
...
@@ -90,6 +91,9 @@ FOREACH(EX_ROOT ${F_EXAMPLES})
INSTALL
(
FILES
${
EX_ROOT
}
.f90 DESTINATION 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 Makefile NMakefile DESTINATION examples
)
...
...
@@ -97,8 +101,5 @@ INSTALL(FILES Makefile NMakefile DESTINATION examples)
INSTALL
(
FILES HelloArgonVS8/HelloArgon.vcproj
HelloArgonVS8/HelloArgon.sln
DESTINATION examples/VisualStudio2005
)
INSTALL
(
FILES HelloArgonInCVS8/HelloArgonInC.vcproj
HelloArgonInCVS8/HelloArgonInC.sln
DESTINATION examples/VisualStudio2005
)
INSTALL
(
FILES HelloOpenMM.ppt
DESTINATION examples
)
platforms/cuda/src/CudaKernels.cpp
View file @
31cd86f8
...
...
@@ -451,7 +451,7 @@ void CudaCalcCustomNonbondedForceKernel::initialize(const System& system, const
gpuSetCustomNonbondedParameters
(
gpu
,
parameters
,
exclusionList
,
exceptionParticle1
,
exceptionParticle2
,
exceptionParams
,
method
,
(
float
)
force
.
getCutoffDistance
(),
force
.
getEnergyFunction
(),
combiningRules
,
paramNames
,
globalParamNames
);
if
(
globalParamValues
.
size
()
>
0
)
SetCustomNonbondedGlobalParams
(
globalParamValues
);
SetCustomNonbondedGlobalParams
(
&
globalParamValues
[
0
]
);
}
void
CudaCalcCustomNonbondedForceKernel
::
executeForces
(
ContextImpl
&
context
)
{
...
...
@@ -478,7 +478,7 @@ void CudaCalcCustomNonbondedForceKernel::updateGlobalParams(ContextImpl& context
globalParamValues
[
i
]
=
value
;
}
if
(
changed
)
SetCustomNonbondedGlobalParams
(
globalParamValues
);
SetCustomNonbondedGlobalParams
(
&
globalParamValues
[
0
]
);
}
CudaCalcGBSAOBCForceKernel
::~
CudaCalcGBSAOBCForceKernel
()
{
...
...
platforms/cuda/src/kernels/cudaKernels.h
View file @
31cd86f8
...
...
@@ -96,4 +96,4 @@ extern void GetRandomSim(gpuContext gpu);
extern
void
SetCustomNonbondedForceExpression
(
const
Expression
<
128
>&
expression
);
extern
void
SetCustomNonbondedEnergyExpression
(
const
Expression
<
128
>&
expression
);
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)
RTERROR
(
status
,
"SetCustomNonbondedCombiningRules: cudaMemcpyToSymbol failed"
);
}
void
SetCustomNonbondedGlobalParams
(
const
vector
<
float
>&
paramValues
)
void
SetCustomNonbondedGlobalParams
(
float
*
paramValues
)
{
cudaError_t
status
;
status
=
cudaMemcpyToSymbol
(
globalParams
,
&
paramValues
[
0
]
,
sizeof
(
globalParams
));
status
=
cudaMemcpyToSymbol
(
globalParams
,
paramValues
,
sizeof
(
globalParams
));
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