Statistics
| Revision:

root / trunk / tests / openmp / test_omp.cpp @ 1569

History | View | Annotate | Download (263 Bytes)

1 1 johnoel
#include <gtest/gtest.h>
2
3 1568 johnoel
#ifdef _OPENMP
4
#include <omp.h>
5
#endif
6 1 johnoel
7 1568 johnoel
class test_omp: public ::testing::Test {};
8 1157 johnoel
9 1569 johnoel
TEST_F(test_omp, hello_world)
10 1 johnoel
{
11 1569 johnoel
  #pragma omp parallel
12
  printf("hello_world: thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());
13 1 johnoel
}