Files
CMake/Tests/FindOpenMP/Test/scaltest.c
Kitware Robot d7204e649e Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2018-06-01 09:53:42 -04:00

21 lines
363 B
C

#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
}