|
spy v2.0.0
Denise Bloch
|
Variables | |
| constexpr bool | spy::supports::address_sanitizers_status = spy_implementation_defined {} |
| Thread sanitizer status indicator. | |
| constexpr arch_type | spy::architecture |
| Architecture reporting value. | |
| constexpr compiler_type | spy::compiler |
| Compiler reporting value. | |
| constexpr spy_implementation_defined | spy::cpp_standard {} |
| C++ standard version reporting value. | |
| constexpr auto | spy::supports::cuda = spy_implementation_defined {} |
| CUDA usage indicator. | |
| constexpr auto | spy::data_model = data_model_type {} |
| Data Model reporting value. | |
| constexpr auto | spy::libc = libc_type {} |
| LIBC version reporting value. | |
| constexpr os_type | spy::operating_system |
| OS reporting value. | |
| constexpr auto | spy::supports::posix_ = spy_implementation_defined {} |
| POSIX supports indicator. | |
| constexpr bool | spy::supports::sanitizers_status = address_sanitizers_status || thread_sanitizers_status |
| Sanitizers status indicator. | |
| constexpr auto | spy::simd_instruction_set = spy_implementation_defined {} |
| SIMD extensions set reporting value. | |
| constexpr auto | spy::stdlib = stdlib_type {} |
| C++ Standard Library version reporting value. | |
| constexpr auto | spy::supports::sycl = spy_implementation_defined {} |
| SYCL usage indicator. | |
| constexpr bool | spy::supports::thread_sanitizers_status = spy_implementation_defined {} |
| Thread sanitizer status indicator. | |
|
constexpr |
#include <spy/sanitizers.hpp>
Thread sanitizer status indicator.
Indicate if current code is compile using -fsanitize=address.
|
inlineconstexpr |
#include <spy/arch.hpp>
Architecture reporting value.
The spy::architecture object can be compared to any other architecture related value to verify if the code being compiled is compiled for a given CPU architecture.
Additionally, any of the architecture related value are convertible to bool. They evaluates to true if they matches the correct architecture currently targeted.
| Name | Architecture |
|---|---|
| spy::amd64 | Intel X86-64 and similar architectures. |
| spy::arm | ARM. |
| spy::ppc | PowerPC. |
| spy::riscv | RISC-V. |
| spy::wasm | WASM pseudo-architecture. |
| spy::x86 | Intel X86. |
|
inlineconstexpr |
#include <spy/compiler.hpp>
Compiler reporting value.
The spy::compiler object can be compared to any other compiler related value to verify if the code being compiled with a specific compiler.
Any compiler related value can be checked for equality or ordering for a given version. The targeted version is then specified using a compiler-dependent literal.
Additionally, any of the compiler related value are convertible to bool. They evaluates to true if they matches the correct compiler currently used.
| Name | Compiler |
|---|---|
| spy::clang | Clang |
| spy::dpcpp | Intel DPC++/ICPX |
| spy::emscripten | Emscripten |
| spy::gcc | G++ |
| spy::intel | Intel ICC |
| spy::msvc | Microsoft Visual Studio |
| spy::nvcc | NVIDIA NVCC |
| spy::mingw32 | MINGW32 |
| spy::mingw64 | MINGW64 |
|
inlineconstexpr |
#include <spy/standard.hpp>
C++ standard version reporting value.
The spy::current_standard object can be compared to any other current_standard related value to verify if the code being compiled with a specific version of the C++ standard.
|
inlineconstexpr |
#include <spy/accelerator.hpp>
CUDA usage indicator.
Retrieves the information about wether or not current file is compiled using NVCC. Note that this indicator works in both .cpp and .cu files.
|
inlineconstexpr |
#include <spy/data_model.hpp>
Data Model reporting value.
The spy::data_model object can be compared to any other data model related value to verify if the code being compiled for a specific data model
Additionally, any of the data model related value are convertible to bool. They evaluates to true if they matches the correct data model currently used.
| Name | Data Model |
|---|---|
| spy::ilp32 | ILP32 |
| spy::lp32 | LP32 |
| spy::silp64 | SILP64 |
| spy::ilp64 | ILP64 |
| spy::llp64 | LLP64 |
| spy::lp64 | LP64 |
|
inlineconstexpr |
#include <spy/libc.hpp>
LIBC version reporting value.
The spy::libc object can be compared to any other libc related value to verify if the code being compiled with a specific version of the libc.
Any libc related value can be checked for equality or ordering for a given version. The targeted version is then specified using a libc-dependent literal.
Additionally, any of the libc related value are convertible to bool. They evaluates to true if they matches the correct libc currently used.
| Name | Vendor |
|---|---|
| spy::cloudabi_ | CloudABI |
| spy::uc_ | uClibc |
| spy::vms_ | VMS |
| spy::zos_ | zOS |
| spy::gnu_ | GNU |
|
inlineconstexpr |
#include <spy/os.hpp>
OS reporting value.
The spy::operating_system object can be compared to any other OS related value to verify if the code being compiled is compiled on a given Operating Systems.
Additionally, any of the OS related value are convertible to bool. They evaluates to true if they matches the correct OS currently used.
| Name | Operating System |
|---|---|
| spy::android_ | Android |
| spy::bsd | BSD |
| spy::cygwin_ | CYGWIN |
| spy::ios_ | iOS |
| spy::linux_ | Linux |
| spy::macos_ | MacOS |
| spy::unix_ | UNIX |
| spy::windows_ | Windows |
|
inlineconstexpr |
#include <spy/os.hpp>
POSIX supports indicator.
Evaluates to true if current OS supports POSIX system calls and functions.
|
constexpr |
#include <spy/sanitizers.hpp>
Sanitizers status indicator.
Aggregate the status of all detected sanitizers
|
inlineconstexpr |
#include <spy/simd.hpp>
SIMD extensions set reporting value.
SIMD extensions set detection is made so that one can ask if the current SIMD extension is exactly, below or above a given reference instruction set. Detectable instructions sets depends on SIMD hardware vendor
| Architecture | Supported SIMD instructions sets |
|---|---|
| X86 SSE | spy::sse1_, spy::sse2_, spy::sse3_, spy::ssse3_, spy::sse41_, spy::sse42_ |
| X86 AVX | spy::avx_, spy::avx2_, spy::avx512_ |
| Power PC VMX | spy::vmx_, spy::vmx_2_03_, spy::vmx_2_05_, spy::vmx_2_06_, spy::vmx_2_07_, spy::vmx_3_00_, spy::vmx_3_01_ |
| Power PC VSX | spy::vsx_, spy::vsx_2_06_, spy::vsx_2_07_, spy::vsx_3_00_, spy::vsx_3_01_ |
| ARM NEON | spy::neon_, spy::asimd_ |
| ARM SVE | spy::sve_, spy::sve128_, spy::sve256_, spy::sve512_, spy::sve1024_ |
| WASM | spy::simd128_ |
| RISC-V | spy::rvv_ |
Complete set of comparison operators is provided for those sets. Order of instructions sets are built so that if an instructions set supersedes another, it is considered greater than. For example, spy::avx_ is greater than spy::sse41_ as the former is a super-set of the later. Comparing SIMD descriptors across architecture is undefined behavior.
Moreover, the spy::simd_instruction_set object exposes a constexpr width static field that contains the size in bits of the current SIMD instructions set registers.
One can also simply asks if a given family of instructions set is available.
| Architecture | Generic indicator |
|---|---|
| X86 | spy::x86_simd_ |
| Power PC | spy::ppc_simd_ |
| ARM | spy::arm_simd_ |
| WASM | spy::wasm_simd_ |
| RISC-V | spy::riscv_simd_ |
Some SIMD instructions set provides supplemental instructions on top of existing system. Those supplemental instruction set can be checked using the spy::supports namespace.
| Architecture | Supported SIMD instructions sets |
|---|---|
| X86 AVX | xop_, fma_, fma4_ |
| X86 AVX512 | bw_, cd_, dq_, er_, ifma_, pf_, vl_, popcntdq_, _4fmaps_, vnniw_, vbmi_ |
| bf16_, bitalg_, vbmi2_, vnni_, vpintersect_ |
|
inlineconstexpr |
#include <spy/stdlib.hpp>
C++ Standard Library version reporting value.
The spy::stdlib object can be compared to any other stdlib related value to verify if the code being compiled with a specific version of the C++ standard library.
Any stdlib related value can be checked for equality or ordering for a given version. The targeted version is then specified using a stdlib-dependent literal.
Additionally, any of the stdlib related value are convertible to bool. They evaluates to true if they matches the correct standard library currently used.
| Name | Vendor |
|---|---|
| spy::libcpp_ | Clang libcpp |
| spy::gnucpp_ | GNU C++ standard library |
|
inlineconstexpr |
#include <spy/accelerator.hpp>
SYCL usage indicator.
Retrieves the information about wether or not current file is compiled with SYCL supports.
|
constexpr |
#include <spy/sanitizers.hpp>
Thread sanitizer status indicator.
Indicate if current code is compile using -fsanitize=threads.