Skip to content

Commit

Permalink
Merge pull request #74 from quanteda/fix-old-tbb
Browse files Browse the repository at this point in the history
Fix old tbb
  • Loading branch information
kbenoit authored Apr 8, 2024
2 parents 69e3d4e + f40246f commit 09359f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/collocations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ float GLOBAL_PATTERN_MAX_LOAD_FACTOR = 0.05;
float GLOBAL_NGRAMS_MAX_LOAD_FACTOR = 0.25;
#endif

typedef std::atomic<unsigned int> UintAtomic;
#if TBB_VERSION_MAJOR >= 2021
typedef std::atomic<unsigned int> UintAtomic; //oneAPI TBB
#else
typedef tbb::atomic<unsigned int> UintAtomic; //old TBB
#endif

#if QUANTEDA_USE_TBB
typedef tbb::concurrent_unordered_map<Ngram, std::pair<UintAtomic, UintAtomic>, hash_ngram, equal_ngram> MapNgramsPair;
#else
Expand Down

0 comments on commit 09359f3

Please sign in to comment.