summaryrefslogtreecommitdiffstats
path: root/Tests/FindOpenMP/Test/scaltest.c
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/FindOpenMP/Test/scaltest.c')
-rw-r--r--Tests/FindOpenMP/Test/scaltest.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/FindOpenMP/Test/scaltest.c b/Tests/FindOpenMP/Test/scaltest.c
new file mode 100644
index 0000000..2ee57f8
--- /dev/null
+++ b/Tests/FindOpenMP/Test/scaltest.c
@@ -0,0 +1,20 @@
+#ifdef __cplusplus
+#include <iostream>
+extern "C"
+#else
+#include <stdio.h>
+#endif
+int scalprod(int n, double* x, double* y, double* res);
+
+int main()
+{
+ double a[5] = { 1., 2., 3., 4., 5. };
+ double b[5] = { 2., 3., 4., 5., 6. };
+ double rk;
+ scalprod(5, a, b, &rk);
+#ifdef __cplusplus
+ std::cout << rk << std::endl;
+#else
+ printf("%f\n", rk);
+#endif
+}