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

Minor fixes and cleanup

parent 772a6850
...@@ -272,8 +272,9 @@ const string& Platform::getDefaultPluginsDirectory() { ...@@ -272,8 +272,9 @@ const string& Platform::getDefaultPluginsDirectory() {
} }
#else #else
if (dir == NULL) if (dir == NULL)
dir = "/usr/local/openmm/lib/plugins"; directory = "/usr/local/openmm/lib/plugins";
directory = string(dir); else
directory = string(dir);
#endif #endif
return directory; return directory;
} }
......
...@@ -101,14 +101,13 @@ CudaPlatform::CudaPlatform() { ...@@ -101,14 +101,13 @@ CudaPlatform::CudaPlatform() {
string nvcc = (compiler == NULL ? "/usr/local/cuda/bin/nvcc" : string(compiler)); string nvcc = (compiler == NULL ? "/usr/local/cuda/bin/nvcc" : string(compiler));
setPropertyDefaultValue(CudaCompiler(), nvcc); setPropertyDefaultValue(CudaCompiler(), nvcc);
char* tmpdir = getenv("TMPDIR"); char* tmpdir = getenv("TMPDIR");
if (tmpdir == NULL) string tmp = (tmpdir == NULL ? string(P_tmpdir) : string(tmpdir));
tmpdir = P_tmpdir; setPropertyDefaultValue(CudaTempDirectory(), tmp);
setPropertyDefaultValue(CudaTempDirectory(), string(tmpdir));
#endif #endif
} }
bool CudaPlatform::supportsDoublePrecision() const { bool CudaPlatform::supportsDoublePrecision() const {
return false; return true;
} }
const string& CudaPlatform::getPropertyValue(const Context& context, const string& property) const { const string& CudaPlatform::getPropertyValue(const Context& context, const string& property) const {
......
...@@ -101,6 +101,8 @@ private: ...@@ -101,6 +101,8 @@ private:
*/ */
class CudaSort::SortTrait { class CudaSort::SortTrait {
public: public:
virtual ~SortTrait() {
}
/** /**
* Get the size of each data value in bytes. * Get the size of each data value in bytes.
*/ */
......
...@@ -83,7 +83,7 @@ OpenCLPlatform::OpenCLPlatform() { ...@@ -83,7 +83,7 @@ OpenCLPlatform::OpenCLPlatform() {
} }
bool OpenCLPlatform::supportsDoublePrecision() const { bool OpenCLPlatform::supportsDoublePrecision() const {
return false; return true;
} }
const string& OpenCLPlatform::getPropertyValue(const Context& context, const string& property) const { const string& OpenCLPlatform::getPropertyValue(const Context& context, const string& property) const {
......
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