- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
According OpenMP 2.5 specification we can't use OpenMP in pure procedures. Why so? I mean, what if I what use PURE procedures also for compiler-checking of purity of my code (not only for parallelization)?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you considered using conditional compilation?
When _OPENMP not defined compile the affected routines with PURE
When _OPENMP defined compile the affected routines without PURE
If you use the Fortran PreProcessor you could define a macro as follows
#ifdef _OPENMP
#define TEST_PURE
#else
#define TEST_PURE pure
#endif
Then use as
TEST_PURE function foo(a,b,c)
...
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page