Skip to content

Commit

Permalink
thread local variables need to be declared thread local with the new …
Browse files Browse the repository at this point in the history
…openmp alloator
  • Loading branch information
gregrodgers committed Oct 7, 2019
1 parent 6cf45ac commit cceca82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/smoke/math_modff/math_modff.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#include <cmath>
#include <omp.h>
using namespace std;

int main(int argc, char **argv)
{
#pragma omp target
{
float intpart, res;
#pragma omp allocate(intpart) allocator(omp_thread_mem_alloc)
res = modff(1.1f, &intpart);
}

#pragma omp target
{
double intpart, res;
#pragma omp allocate(intpart) allocator(omp_thread_mem_alloc)
res = modf(1.1, &intpart);
}
return 0;
Expand Down

0 comments on commit cceca82

Please sign in to comment.