Debian Codegraph @

Tests/FindOpenMP/Test/scaltest.c

raw
1 #ifdef __cplusplus
2 # include <iostream>
3 extern "C"
4 #else
5 # include <stdio.h>
6 #endif
7 int scalprod(int n, double* x, double* y, double* res);
8
9 int main(void)
10 {
11 double a[5] = { 1., 2., 3., 4., 5. };
12 double b[5] = { 2., 3., 4., 5., 6. };
13 double rk;
14 scalprod(5, a, b, &rk);
15 #ifdef __cplusplus
16 std::cout << rk << std::endl;
17 #else
18 printf("%f\n", rk);
19 #endif
20 }