Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
mic_common.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2019 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 
17 
18 
19 */
20 
21 #ifndef __TBB_mic_common_H
22 #define __TBB_mic_common_H
23 
24 #ifndef __TBB_machine_H
25 #error Do not #include this internal file directly; use public TBB headers instead.
26 #endif
27 
28 #if ! __TBB_DEFINE_MIC
29  #error mic_common.h should be included only when building for Intel(R) Many Integrated Core Architecture
30 #endif
31 
32 #ifndef __TBB_PREFETCHING
33 #define __TBB_PREFETCHING 1
34 #endif
35 #if __TBB_PREFETCHING
36 #include <immintrin.h>
37 #define __TBB_cl_prefetch(p) _mm_prefetch((const char*)p, _MM_HINT_T1)
38 #define __TBB_cl_evict(p) _mm_clevict(p, _MM_HINT_T1)
39 #endif
40 
42 #define __TBB_full_memory_fence() __asm__ __volatile__("lock; addl $0,(%%rsp)":::"memory")
43 #define __TBB_Pause(x) _mm_delay_32(16*(x))
44 #define __TBB_STEALING_PAUSE 1500/16
45 #include <sched.h>
46 #define __TBB_Yield() sched_yield()
47 
49 #define __TBB_STEALING_ABORT_ON_CONTENTION 1
50 #define __TBB_YIELD2P 1
51 #define __TBB_HOARD_NONLOCAL_TASKS 1
52 
53 #if ! ( __FreeBSD__ || __linux__ )
54  #error Intel(R) Many Integrated Core Compiler does not define __FreeBSD__ or __linux__ anymore. Check for the __TBB_XXX_BROKEN defined under __FreeBSD__ or __linux__.
55 #endif /* ! ( __FreeBSD__ || __linux__ ) */
56 
57 #endif /* __TBB_mic_common_H */

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.