summaryrefslogtreecommitdiffstats
path: root/Tests/FindOpenMP/Test/scaltest.c
blob: 4678b87a4dfb7aa7f0a3ec70a1ffdc65a007d098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
}