#ifndef KMP_PLATFORM_H
#define KMP_PLATFORM_H
#define KMP_OS_LINUX …
#define KMP_OS_DRAGONFLY …
#define KMP_OS_FREEBSD …
#define KMP_OS_NETBSD …
#define KMP_OS_OPENBSD …
#define KMP_OS_DARWIN …
#define KMP_OS_WINDOWS …
#define KMP_OS_HURD …
#define KMP_OS_SOLARIS …
#define KMP_OS_WASI …
#define KMP_OS_EMSCRIPTEN …
#define KMP_OS_UNIX …
#ifdef _WIN32
#undef KMP_OS_WINDOWS
#define KMP_OS_WINDOWS …
#endif
#if (defined __APPLE__ && defined __MACH__)
#undef KMP_OS_DARWIN
#define KMP_OS_DARWIN …
#endif
#if (defined __linux)
#undef KMP_OS_LINUX
#define KMP_OS_LINUX …
#elif (defined __linux__)
#undef KMP_OS_LINUX
#define KMP_OS_LINUX …
#elif defined(__EMSCRIPTEN__)
#undef KMP_OS_LINUX
#undef KMP_OS_EMSCRIPTEN
#define KMP_OS_LINUX …
#define KMP_OS_EMSCRIPTEN …
#else
#endif
#if (defined __DragonFly__)
#undef KMP_OS_DRAGONFLY
#define KMP_OS_DRAGONFLY …
#endif
#if (defined __FreeBSD__)
#undef KMP_OS_FREEBSD
#define KMP_OS_FREEBSD …
#endif
#if (defined __NetBSD__)
#undef KMP_OS_NETBSD
#define KMP_OS_NETBSD …
#endif
#if (defined __OpenBSD__)
#undef KMP_OS_OPENBSD
#define KMP_OS_OPENBSD …
#endif
#if (defined __GNU__)
#undef KMP_OS_HURD
#define KMP_OS_HURD …
#endif
#if (defined __sun__ && defined __svr4__)
#undef KMP_OS_SOLARIS
#define KMP_OS_SOLARIS …
#endif
#if (defined __wasi__)
#undef KMP_OS_WASI
#define KMP_OS_WASI …
#endif
#if (defined _AIX)
#undef KMP_OS_AIX
#define KMP_OS_AIX …
#endif
#if (1 != KMP_OS_LINUX + KMP_OS_DRAGONFLY + KMP_OS_FREEBSD + KMP_OS_NETBSD + \
KMP_OS_OPENBSD + KMP_OS_DARWIN + KMP_OS_WINDOWS + KMP_OS_HURD + \
KMP_OS_SOLARIS + KMP_OS_WASI + KMP_OS_AIX)
#error Unknown OS
#endif
#if KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || \
KMP_OS_OPENBSD || KMP_OS_DARWIN || KMP_OS_HURD || KMP_OS_SOLARIS || \
KMP_OS_WASI || KMP_OS_AIX
#undef KMP_OS_UNIX
#define KMP_OS_UNIX …
#endif
#define KMP_ARCH_X86 …
#define KMP_ARCH_X86_64 …
#define KMP_ARCH_AARCH64 …
#define KMP_ARCH_AARCH64_32 …
#define KMP_ARCH_PPC64_ELFv1 …
#define KMP_ARCH_PPC64_ELFv2 …
#define KMP_ARCH_PPC64_XCOFF …
#define KMP_ARCH_PPC_XCOFF …
#define KMP_ARCH_MIPS …
#define KMP_ARCH_MIPS64 …
#define KMP_ARCH_RISCV64 …
#define KMP_ARCH_LOONGARCH64 …
#define KMP_ARCH_VE …
#define KMP_ARCH_S390X …
#if KMP_OS_WINDOWS
#if defined(_M_AMD64) || defined(__x86_64)
#undef KMP_ARCH_X86_64
#define KMP_ARCH_X86_64 …
#elif defined(__aarch64__) || defined(_M_ARM64)
#undef KMP_ARCH_AARCH64
#define KMP_ARCH_AARCH64 …
#elif defined(__arm__) || defined(_M_ARM)
#undef KMP_ARCH_ARMV7
#define KMP_ARCH_ARMV7 …
#else
#undef KMP_ARCH_X86
#define KMP_ARCH_X86 …
#endif
#endif
#if KMP_OS_UNIX
#if defined __x86_64
#undef KMP_ARCH_X86_64
#define KMP_ARCH_X86_64 …
#elif defined __i386
#undef KMP_ARCH_X86
#define KMP_ARCH_X86 …
#elif defined __powerpc64__
#if defined(_CALL_ELF)
#if _CALL_ELF == 2
#undef KMP_ARCH_PPC64_ELFv2
#define KMP_ARCH_PPC64_ELFv2 …
#else
#undef KMP_ARCH_PPC64_ELFv1
#define KMP_ARCH_PPC64_ELFv1 …
#endif
#elif defined KMP_OS_AIX
#undef KMP_ARCH_PPC64_XCOFF
#define KMP_ARCH_PPC64_XCOFF …
#endif
#elif defined(__powerpc__) && defined(KMP_OS_AIX)
#undef KMP_ARCH_PPC_XCOFF
#define KMP_ARCH_PPC_XCOFF …
#undef KMP_ARCH_PPC
#define KMP_ARCH_PPC …
#elif defined __ARM64_ARCH_8_32__
#undef KMP_ARCH_AARCH64_32
#define KMP_ARCH_AARCH64_32 …
#elif defined __aarch64__
#undef KMP_ARCH_AARCH64
#define KMP_ARCH_AARCH64 …
#elif defined __mips__
#if defined __mips64
#undef KMP_ARCH_MIPS64
#define KMP_ARCH_MIPS64 …
#else
#undef KMP_ARCH_MIPS
#define KMP_ARCH_MIPS …
#endif
#elif defined __riscv && __riscv_xlen == 64
#undef KMP_ARCH_RISCV64
#define KMP_ARCH_RISCV64 …
#elif defined __loongarch__ && __loongarch_grlen == 64
#undef KMP_ARCH_LOONGARCH64
#define KMP_ARCH_LOONGARCH64 …
#elif defined __ve__
#undef KMP_ARCH_VE
#define KMP_ARCH_VE …
#elif defined __s390x__
#undef KMP_ARCH_S390X
#define KMP_ARCH_S390X …
#endif
#endif
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7R__) || \
defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7VE__)
#define KMP_ARCH_ARMV7 …
#endif
#if defined(KMP_ARCH_ARMV7) || defined(__ARM_ARCH_6__) || \
defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || \
defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6T2__) || \
defined(__ARM_ARCH_6ZK__)
#define KMP_ARCH_ARMV6 …
#endif
#if defined(KMP_ARCH_ARMV6) || defined(__ARM_ARCH_5T__) || \
defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) || \
defined(__ARM_ARCH_5TEJ__)
#define KMP_ARCH_ARMV5 …
#endif
#if defined(KMP_ARCH_ARMV5) || defined(__ARM_ARCH_4__) || \
defined(__ARM_ARCH_4T__)
#define KMP_ARCH_ARMV4 …
#endif
#if defined(KMP_ARCH_ARMV4) || defined(__ARM_ARCH_3__) || \
defined(__ARM_ARCH_3M__)
#define KMP_ARCH_ARMV3 …
#endif
#if defined(KMP_ARCH_ARMV3) || defined(__ARM_ARCH_2__)
#define KMP_ARCH_ARMV2 …
#endif
#if defined(KMP_ARCH_ARMV2)
#define KMP_ARCH_ARM …
#endif
#if defined(__wasm32__)
#define KMP_ARCH_WASM …
#endif
#define KMP_ARCH_PPC64 …
#if defined(__MIC__) || defined(__MIC2__)
#define KMP_MIC …
#if __MIC2__ || __KNC__
#define KMP_MIC1 …
#define KMP_MIC2 …
#else
#define KMP_MIC1 …
#define KMP_MIC2 …
#endif
#else
#define KMP_MIC …
#define KMP_MIC1 …
#define KMP_MIC2 …
#endif
#define KMP_32_BIT_ARCH …
#define KMP_MIC_SUPPORTED …
#if (1 != KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_ARM + KMP_ARCH_PPC64 + \
KMP_ARCH_AARCH64 + KMP_ARCH_MIPS + KMP_ARCH_MIPS64 + \
KMP_ARCH_RISCV64 + KMP_ARCH_LOONGARCH64 + KMP_ARCH_VE + \
KMP_ARCH_S390X + KMP_ARCH_WASM + KMP_ARCH_PPC + \
KMP_ARCH_AARCH64_32)
#error Unknown or unsupported architecture
#endif
#endif