Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
#include <sched.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#include <libkern/OSAtomic.h>
Go to the source code of this file.
Macros | |
#define | __TBB_Yield() sched_yield() |
#define | __TBB_HardwareConcurrency() __TBB_macos_available_cpu() |
#define | __TBB_UnknownArchitecture 1 |
#define | __TBB_machine_cmpswp8 __TBB_machine_cmpswp8_OsX |
#define | __TBB_WORDSIZE __SIZEOF_POINTER__ |
#define | __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED |
#define | __TBB_control_consistency_helper() OSMemoryBarrier() |
#define | __TBB_acquire_consistency_helper() OSMemoryBarrier() |
#define | __TBB_release_consistency_helper() OSMemoryBarrier() |
#define | __TBB_full_memory_fence() OSMemoryBarrier() |
#define | __TBB_USE_GENERIC_PART_WORD_CAS 1 |
#define | __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 |
#define | __TBB_USE_GENERIC_FETCH_STORE 1 |
#define | __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 |
#define | __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 |
#define | __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 |
Functions | |
static int | __TBB_macos_available_cpu () |
static int64_t | __TBB_machine_cmpswp8_OsX (volatile void *ptr, int64_t value, int64_t comparand) |
static int32_t | __TBB_machine_cmpswp4 (volatile void *ptr, int32_t value, int32_t comparand) |
static int32_t | __TBB_machine_fetchadd4 (volatile void *ptr, int32_t addend) |
static int64_t | __TBB_machine_fetchadd8 (volatile void *ptr, int64_t addend) |
#define __TBB_acquire_consistency_helper | ( | ) | OSMemoryBarrier() |
Definition at line 92 of file macos_common.h.
#define __TBB_control_consistency_helper | ( | ) | OSMemoryBarrier() |
As this generic implementation has absolutely no information about underlying hardware, its performance most likely will be sub-optimal because of full memory fence usages where a more lightweight synchronization means (or none at all) could suffice. Thus if you use this header to enable TBB on a new platform, consider forking it and relaxing below helpers as appropriate.
Definition at line 91 of file macos_common.h.
#define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED |
Definition at line 83 of file macos_common.h.
#define __TBB_full_memory_fence | ( | ) | OSMemoryBarrier() |
Definition at line 94 of file macos_common.h.
#define __TBB_HardwareConcurrency | ( | ) | __TBB_macos_available_cpu() |
Definition at line 39 of file macos_common.h.
#define __TBB_machine_cmpswp8 __TBB_machine_cmpswp8_OsX |
Definition at line 66 of file macos_common.h.
#define __TBB_release_consistency_helper | ( | ) | OSMemoryBarrier() |
Definition at line 93 of file macos_common.h.
#define __TBB_UnknownArchitecture 1 |
Definition at line 44 of file macos_common.h.
#define __TBB_USE_GENERIC_FETCH_STORE 1 |
Definition at line 121 of file macos_common.h.
#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 |
Definition at line 122 of file macos_common.h.
#define __TBB_USE_GENERIC_PART_WORD_CAS 1 |
Definition at line 119 of file macos_common.h.
#define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 |
Definition at line 120 of file macos_common.h.
#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 |
Definition at line 123 of file macos_common.h.
#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 |
Definition at line 127 of file macos_common.h.
#define __TBB_WORDSIZE __SIZEOF_POINTER__ |
Definition at line 73 of file macos_common.h.
#define __TBB_Yield | ( | ) | sched_yield() |
Definition at line 24 of file macos_common.h.
|
inlinestatic |
Definition at line 96 of file macos_common.h.
References __TBB_ASSERT, address, tbb::internal::is_aligned(), and value.
|
inlinestatic |
Definition at line 51 of file macos_common.h.
References __TBB_ASSERT, address, tbb::internal::is_aligned(), and value.
|
inlinestatic |
Definition at line 107 of file macos_common.h.
References __TBB_ASSERT, and tbb::internal::is_aligned().
|
inlinestatic |
Definition at line 113 of file macos_common.h.
References __TBB_ASSERT, and tbb::internal::is_aligned().