Platform#

group platform

Hyperion provides an assortment of platform detection macros to detect operating system, compiler, little vs big endianness, and architecture.

Note

while Hyperion provides many different platform detection macros, it has currently only been tested on x86_64 Windows, x86_64 linux, and ARM64 (M1) MacOs

Defines

HYPERION_PLATFORM_IS_WINDOWS#

Whether the compiled-for platform is WINDOWS.

HYPERION_PLATFORM_IS_APPLE#

Whether the compiled-for platform is APPLE (MacOS, IOS)

HYPERION_PLATFORM_IS_UNIX#

Whether the compiled-for platform is a variant of UNIX.

HYPERION_PLATFORM_IS_LINUX#

Whether the compiled-for platform is LINUX.

HYPERION_PLATFORM_IS_BSD#

Whether the compiled-for platform is a BSD.

HYPERION_PLATFORM_IS_ANDROID#

Whether the compiled-for platform is Android.

HYPERION_PLATFORM_COMPILER_IS_CLANG#

Whether the current compiler is CLANG.

HYPERION_PLATFORM_COMPILER_IS_GCC#

Whether the current compiler is GCC.

HYPERION_PLATFORM_COMPILER_IS_MSVC#

Whether the current compiler is GCC.

HYPERION_PLATFORM_STD_LIB_IS_LIBCPP#

Whether the used standard library is libc++ (llvm)

HYPERION_PLATFORM_STD_LIB_IS_LIBSTDCPP#

Whether the used standard library is libstdc++ (gcc)

HYPERION_PLATFORM_STD_LIB_IS_MSVC#

Whether the used standard library is MSVC.

HYPERION_PLATFORM_MODE_IS_DEBUG#

Whether the current build mode is DEBUG.

HYPERION_PLATFORM_MODE_IS_RELEASE#

Whether the current build mode is RELEASE.

HYPERION_PLATFORM_X86_64#

x86_64 architecture tag

HYPERION_PLATFORM_X86#

x86 architecture tag

HYPERION_PLATFORM_ARM_V6#

ARM v6 architecture tag.

HYPERION_PLATFORM_ARM_V7#

ARM v7 architecture tag.

HYPERION_PLATFORM_ARM_V7A#

ARM v7a architecture tag.

HYPERION_PLATFORM_ARM_V7R#

ARM v7r architecture tag.

HYPERION_PLATFORM_ARM_V7M#

ARM v7m architecture tag.

HYPERION_PLATFORM_ARM_V7S#

ARM v7s architecture tag.

HYPERION_PLATFORM_ARM_V8#

ARM v8 architecture tag.

HYPERION_PLATFORM_ARM_64#

ARM 64 architecture tag.

HYPERION_PLATFORM_UNKNOWN#

Unknown architecture tag.

HYPERION_PLATFORM_ARCHITECTURE#

The CPU architecture family being compiled for.

Can be any HYPERION_PLATFORM_ARCHITECTURE_<ARCH> tag macro

HYPERION_PLATFORM_IS_ARCHITECTURE(arch)#

Determines if the compiled-for architecture is the given one.

This will determine if the architecture being compiled for matches or is a super set of the given architecture to check for.

Parameters:
  • arch – - The platform architecture to check against. Must be one of the enum HyperionPlatformArchitecture

Returns:

whether the compiled-for architecture is the given one

HYPERION_PLATFORM_IS_LITTLE_ENDIAN#

Whether the compiled-for architecture is a little endian architecture.

HYPERION_PLATFORM_IS_BIG_ENDIAN#

Whether the compiled-for architecture is a big endian architecture.

HYPERION_PLATFORM_CACHE_LINE_SIZE#

The architecture cache-line size.