Skip to content

Commit

Permalink
Fix compiling without openmp.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaklin committed Aug 20, 2024
1 parent b92a3d7 commit ef2d9fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/mGEMS_alignment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,16 @@ class Alignment {
hash ^= j + 0x517cc1b727220a95 + (hash << 6) + (hash >> 2);
}
}
#if defined(MGEMS_OPENMP_SUPPORT) && (MGEMS_OPENMP_SUPPORT) == 1
auto got = mymap[omp_get_thread_num()].find(hash);
if (got == mymap[omp_get_thread_num()].end()) {
mymap[omp_get_thread_num()].insert(std::make_pair(hash, std::vector<uint32_t>({(uint32_t)i})));
#else
auto got = mymap[0].find(hash);
if (got == mymap[0].end()) {
mymap[0].insert(std::make_pair(hash, std::vector<uint32_t>({(uint32_t)i})));

#endif
} else {
got->second.emplace_back(i);
}
Expand Down

0 comments on commit ef2d9fb

Please sign in to comment.