Commit f12cb008 authored by Peter Eastman's avatar Peter Eastman
Browse files

Unified names of platform properties

parent 95584c96
......@@ -328,7 +328,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaPiTorsionForce running test..." << std::endl;
registerAmoebaCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testOnePiTorsion();
testPeriodic();
} catch(const std::exception& e) {
......
......@@ -306,7 +306,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaStretchBendForce running test..." << std::endl;
registerAmoebaCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testOneStretchBend();
testPeriodic();
} catch(const std::exception& e) {
......
......@@ -2711,7 +2711,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaTorsionTorsionForce running test..." << std::endl;
registerAmoebaCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testTorsionTorsion(1);
testPeriodic();
} catch(const std::exception& e) {
......
......@@ -2015,7 +2015,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaVdwForce running test..." << std::endl;
registerAmoebaCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testVdw();
......
......@@ -172,7 +172,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaWcaDispersionForce running test..." << std::endl;
registerAmoebaCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
// test Wca dispersion force using two ammonia molecules
......
......@@ -197,7 +197,7 @@ int main(int argc, char* argv[]) {
try {
registerDrudeCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testSingleParticle();
testAnisotropicParticle();
testThole();
......
......@@ -183,7 +183,7 @@ int main(int argc, char* argv[]) {
try {
registerDrudeCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", string(argv[1]));
testSinglePair();
testWater();
}
......
......@@ -110,7 +110,7 @@ void testWater() {
State state = context.getState(State::Energy);
double initialEnergy;
int numSteps = 1000;
double maxNorm = (platform.getPropertyValue(context, "CudaPrecision") == "double" ? 1.0 : 5.0);
double maxNorm = (platform.getPropertyValue(context, "Precision") == "double" ? 1.0 : 5.0);
for (int i = 0; i < numSteps; i++) {
integ.step(1);
state = context.getState(State::Energy | State::Forces);
......@@ -131,7 +131,7 @@ int main(int argc, char* argv[]) {
try {
registerDrudeCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", string(argv[1]));
testWater();
}
catch(const std::exception& e) {
......
......@@ -197,7 +197,7 @@ int main(int argc, char* argv[]) {
try {
registerDrudeOpenCLKernelFactories();
if (argc > 1)
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("OpenCLPrecision", std::string(argv[1]));
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("Precision", std::string(argv[1]));
testSingleParticle();
testAnisotropicParticle();
testThole();
......
......@@ -183,7 +183,7 @@ int main(int argc, char* argv[]) {
try {
registerDrudeOpenCLKernelFactories();
if (argc > 1)
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("OpenCLPrecision", string(argv[1]));
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("Precision", string(argv[1]));
testSinglePair();
testWater();
}
......
......@@ -110,7 +110,7 @@ void testWater() {
State state = context.getState(State::Energy);
double initialEnergy;
int numSteps = 1000;
double maxNorm = (platform.getPropertyValue(context, "OpenCLPrecision") == "double" ? 1.0 : 5.0);
double maxNorm = (platform.getPropertyValue(context, "Precision") == "double" ? 1.0 : 5.0);
for (int i = 0; i < numSteps; i++) {
integ.step(1);
state = context.getState(State::Energy | State::Forces);
......@@ -131,7 +131,7 @@ int main(int argc, char* argv[]) {
try {
registerDrudeOpenCLKernelFactories();
if (argc > 1)
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("OpenCLPrecision", string(argv[1]));
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("Precision", string(argv[1]));
testWater();
}
catch(const std::exception& e) {
......
......@@ -554,7 +554,7 @@ int main(int argc, char* argv[]) {
try {
registerRPMDCudaKernelFactories();
if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", string(argv[1]));
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", string(argv[1]));
testFreeParticles();
testParaHydrogen();
testCMMotionRemoval();
......
......@@ -555,7 +555,7 @@ int main(int argc, char* argv[]) {
try {
registerRPMDOpenCLKernelFactories();
if (argc > 1)
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("OpenCLPrecision", string(argv[1]));
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("Precision", string(argv[1]));
testFreeParticles();
testParaHydrogen();
testCMMotionRemoval();
......
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