aboutsummaryrefslogtreecommitdiff
path: root/MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/mytype.h
diff options
context:
space:
mode:
authorBrian Homerding <homerdin@gmail.com>2018-12-21 16:31:27 +0000
committerBrian Homerding <homerdin@gmail.com>2018-12-21 16:31:27 +0000
commit526c4d85492ba125cece55c4f84fb819568dfa76 (patch)
tree1765f1824b4b0874a70a4a64ae4b4ecbd5a1219c /MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/mytype.h
parent22ef5eb3f99c0850ee1c819707c836083eee3a3e (diff)
[test-suite] Adding CoMD Proxy App
Re-commiting CoMD test after fixing the Makefile build. CoMD is a reference implementation of typical classical molecular dynamics algorithms and workloads. This is a serial build for the test-suite with eam potential. Link: https://github.com/exmatex/CoMD Reviewers: Meinersbur Differential Revision: https://reviews.llvm.org/D55726 git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@349922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/mytype.h')
-rw-r--r--MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/mytype.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/mytype.h b/MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/mytype.h
new file mode 100644
index 00000000..4efaa0ba
--- /dev/null
+++ b/MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/mytype.h
@@ -0,0 +1,29 @@
+/// \file
+/// Frequently needed typedefs.
+
+#ifndef __MYTYPE_H_
+#define __MYTYPE_H_
+
+/// \def SINGLE determines whether single or double precision is built
+#ifdef SINGLE
+typedef float real_t; //!< define native type for CoMD as single precision
+ #define FMT1 "%g" //!< /def format argument for floats
+ #define EMT1 "%e" //!< /def format argument for eng floats
+#else
+typedef double real_t; //!< define native type for CoMD as double precision
+ #define FMT1 "%lg" //!< \def format argument for doubles
+ #define EMT1 "%le" //!< \def format argument for eng doubles
+#endif
+
+typedef real_t real3[3]; //!< a convenience vector with three real_t
+
+static void zeroReal3(real3 a)
+{
+ a[0] = 0.0;
+ a[1] = 0.0;
+ a[2] = 0.0;
+}
+
+#define screenOut stdout
+
+#endif