text: #include <iostream>
  #include <cstdlib>
  #include <cmath>
  bool almost_equal(float x, float gold, float tol) {
    return gold * (1-tol) <= x && x <= gold * (1 + tol);
  }
  void test_target_parallel_for() {
    const int N0 { 262144 };
    const float expected_value { N0 };
    float counter_N0{};
    #pragma omp target parallel for map(tofrom: counter_N0) reduction(+: counter_N0)
    for (int i0 = 0 ; i0 < N0 ; i0++ )
    {
      counter_N0 = counter_N0 +  1. ;
    }
    if (!almost_equal(counter_N0, expected_value, 0.1)) {
      std::cerr << "Expected: " << expected_value << " Got: " << counter_N0 << std::endl;
      std::exit(112);
    }
  }
  int main()
  {
      test_target_parallel_for();
  }
  