Overte C++ Documentation
TBBHelpers.h
1 //
2 // Created by Bradley Austin Davis on 2017/06/06
3 // Copyright 2013-2017 High Fidelity, Inc.
4 //
5 // Distributed under the Apache License, Version 2.0.
6 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7 //
8 
9 #pragma once
10 #ifndef hifi_TBBHelpers_h
11 #define hifi_TBBHelpers_h
12 
13 #ifdef _WIN32
14 #pragma warning( push )
15 #pragma warning( disable : 4334 )
16 #endif
17 
18 #if !defined(Q_MOC_RUN)
19 // Work around https://bugreports.qt.io/browse/QTBUG-80990
20 
21 // This causes a compile error in profiling.h:
22 // profiling.h:229:15: error: expected unqualified-id before ‘)’ token
23 // 229 | void emit() { }
24 //
25 // 'emit' is defined to nothing in qt and is just syntactic sugar, so get rid of it
26 #undef emit
27 
28 #include <tbb/concurrent_queue.h>
29 #include <tbb/concurrent_unordered_map.h>
30 #include <tbb/concurrent_unordered_set.h>
31 #include <tbb/concurrent_vector.h>
32 #include <tbb/parallel_for.h>
33 #include <tbb/blocked_range2d.h>
34 
35 
36 // and re-add later.
37 #define emit
38 
39 #endif
40 
41 #ifdef _WIN32
42 #pragma warning( pop )
43 #endif
44 
45 #endif // hifi_TBBHelpers_h