|
libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
Go to the source code of this file.
Macros | |
| #define | JMMCG_MSVC_STDCALL_HACK __stdcall |
| Work arounds for the older MSVC++ compilers being very broken regarding the use of various keywords. More... | |
| #define | JMMCG_MSVC_FASTCALL_HACK __fastcall |
| #define | _CRT_SECURE_NO_WARNINGS |
| #define | _WIN32_WINNT 0x0501 |
| #define | WINVER _WIN32_WINNT |
| #define | __fastcall |
| #define | __stdcall |
| #define | __cdecl |
| #define | __CLR_OR_THIS_CALL |
| #define | __declspec(dllexport) |
| #define | LIKELY(x) __builtin_expect(!!(x), 1) |
| #define | UNLIKELY(x) __builtin_expect(!!(x), 0) |
| #define | REALLY_FORCE_INLINE __attribute__((always_inline)) |
| #define | FORCE_INLINE |
| #define | NEVER_INLINE __attribute__((cold, noinline)) |
| #define | POPCOUNTLL(x) __builtin_popcountll(x) |
| #define | PREFETCH_READ(addr, locality) __builtin_prefetch(reinterpret_cast<void const *>(addr), 0, (locality)) |
| #define | _MM_HINT_NTA 0 |
| #define | PREFETCH_WRITE(addr, locality) __builtin_prefetch(reinterpret_cast<void const *>(addr), 1, (locality)) |
| #define | ALIGN_TO_L1_CACHE alignas(64 /* TODO std::hardware_constructive_interference_size */) |
| #define | LIBJMMCG_ENQUOTE_INTERNAL(x) #x |
| #define | LIBJMMCG_ENQUOTE(x) LIBJMMCG_ENQUOTE_INTERNAL(x) |
Typedefs | |
| typedef long long | __int64 |
| Yup: MSVC++ doesn't support "long long" properly.... Better use the MSVC++-special types. More... | |
| typedef unsigned long long | __uint64 |
This file contains some of the more blatant, nasty, evil hacks that need to be done to work-around the venerable MSVC++ v6.0 sp5 compiler's "features". Note that this compiler should really be referred to as "cl.exe" v12.00.8168.
Definition in file blatant_old_msvc_compiler_hacks.hpp.
| #define __cdecl |
Definition at line 168 of file blatant_old_msvc_compiler_hacks.hpp.
| #define __CLR_OR_THIS_CALL |
Definition at line 171 of file blatant_old_msvc_compiler_hacks.hpp.
| __declspec | ( | dllexport | ) |
Definition at line 174 of file blatant_old_msvc_compiler_hacks.hpp.
| #define __fastcall |
Definition at line 160 of file blatant_old_msvc_compiler_hacks.hpp.
| #define __stdcall |
Definition at line 164 of file blatant_old_msvc_compiler_hacks.hpp.
| #define _CRT_SECURE_NO_WARNINGS |
Definition at line 43 of file blatant_old_msvc_compiler_hacks.hpp.
| #define _MM_HINT_NTA 0 |
Definition at line 202 of file blatant_old_msvc_compiler_hacks.hpp.
| #define _WIN32_WINNT 0x0501 |
Definition at line 46 of file blatant_old_msvc_compiler_hacks.hpp.
| #define ALIGN_TO_L1_CACHE alignas(64 /* TODO std::hardware_constructive_interference_size */) |
Definition at line 214 of file blatant_old_msvc_compiler_hacks.hpp.
| #define FORCE_INLINE |
Definition at line 183 of file blatant_old_msvc_compiler_hacks.hpp.
| #define JMMCG_MSVC_FASTCALL_HACK __fastcall |
Definition at line 40 of file blatant_old_msvc_compiler_hacks.hpp.
| #define JMMCG_MSVC_STDCALL_HACK __stdcall |
Work arounds for the older MSVC++ compilers being very broken regarding the use of various keywords.
Definition at line 39 of file blatant_old_msvc_compiler_hacks.hpp.
| #define LIBJMMCG_ENQUOTE | ( | x | ) | LIBJMMCG_ENQUOTE_INTERNAL(x) |
Definition at line 217 of file blatant_old_msvc_compiler_hacks.hpp.
| #define LIBJMMCG_ENQUOTE_INTERNAL | ( | x | ) | #x |
Definition at line 216 of file blatant_old_msvc_compiler_hacks.hpp.
| #define LIKELY | ( | x | ) | __builtin_expect(!!(x), 1) |
GCC has "quirks" in it's static branch-prediction: Branch prediction in gcc. Use these to ensure that if-statements are generated reliably.
Definition at line 179 of file blatant_old_msvc_compiler_hacks.hpp.
| #define NEVER_INLINE __attribute__((cold, noinline)) |
Definition at line 184 of file blatant_old_msvc_compiler_hacks.hpp.
| #define POPCOUNTLL | ( | x | ) | __builtin_popcountll(x) |
Definition at line 190 of file blatant_old_msvc_compiler_hacks.hpp.
| #define PREFETCH_READ | ( | addr, | |
| locality | |||
| ) | __builtin_prefetch(reinterpret_cast<void const *>(addr), 0, (locality)) |
See GCC Intrinsics and Prefetching strides for more information.
| addr | Prefetch a cache line from the address addr for reading. See the kernel marco L1_CACHE_BYTES for an approximation. |
| locality | A compile-time integer constant in [1 .. 3], default 3. 1 means low locality, 3 highest. |
Definition at line 198 of file blatant_old_msvc_compiler_hacks.hpp.
| #define PREFETCH_WRITE | ( | addr, | |
| locality | |||
| ) | __builtin_prefetch(reinterpret_cast<void const *>(addr), 1, (locality)) |
See GCC Intrinsics and Prefetching strides for more information.
| addr | Prefetch a cache line from the address addr for writing. See the kernel marco L1_CACHE_BYTES for an approximation. |
| locality | A compile-time integer constant in [1 .. 3], default 3. 1 means low locality, 3 highest. |
Definition at line 210 of file blatant_old_msvc_compiler_hacks.hpp.
| #define REALLY_FORCE_INLINE __attribute__((always_inline)) |
Definition at line 181 of file blatant_old_msvc_compiler_hacks.hpp.
| #define UNLIKELY | ( | x | ) | __builtin_expect(!!(x), 0) |
Definition at line 180 of file blatant_old_msvc_compiler_hacks.hpp.
| #define WINVER _WIN32_WINNT |
Definition at line 49 of file blatant_old_msvc_compiler_hacks.hpp.
| typedef long long __int64 |
Yup: MSVC++ doesn't support "long long" properly.... Better use the MSVC++-special types.
Definition at line 187 of file blatant_old_msvc_compiler_hacks.hpp.
| typedef unsigned long long __uint64 |
Definition at line 188 of file blatant_old_msvc_compiler_hacks.hpp.