/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/Foundation/Basics/Platform/DetectArchitecture.h
55 строк
1 KB
Jan Krassnigg
Various smaller changes (#1387)
25 сен 2024, 14:29
25 сен 2024, 14:29
4e72013
Код
Авторство
О чём код?
#pragma once #if defined(__clang__) || defined(__GNUC__) # if defined(__x86_64__) || defined(__i386__) # undef EZ_PLATFORM_ARCH_X86 # define EZ_PLATFORM_ARCH_X86 EZ_ON # elif defined(__arm__) || defined(__aarch64__) # undef EZ_PLATFORM_ARCH_ARM # define EZ_PLATFORM_ARCH_ARM EZ_ON # elif (__EMSCRIPTEN__) # undef EZ_PLATFORM_ARCH_WEB # define EZ_PLATFORM_ARCH_WEB EZ_ON # else # error unhandled target architecture # endif # if defined(__x86_64__) || defined(__aarch64__) # undef EZ_PLATFORM_64BIT # define EZ_PLATFORM_64BIT EZ_ON # elif defined(__i386__) || defined(__arm__) # undef EZ_PLATFORM_32BIT # define EZ_PLATFORM_32BIT EZ_ON # elif (__EMSCRIPTEN__) # undef EZ_PLATFORM_32BIT # define EZ_PLATFORM_32BIT EZ_ON # else # error unhandled platform bit count # endif #elif defined(_MSC_VER) # if defined(_M_AMD64) || defined(_M_IX86) # undef EZ_PLATFORM_ARCH_X86 # define EZ_PLATFORM_ARCH_X86 EZ_ON # elif defined(_M_ARM) || defined(_M_ARM64) # undef EZ_PLATFORM_ARCH_ARM # define EZ_PLATFORM_ARCH_ARM EZ_ON # else # error unhandled target architecture # endif # if defined(_M_AMD64) || defined(_M_ARM64) # undef EZ_PLATFORM_64BIT # define EZ_PLATFORM_64BIT EZ_ON # elif defined(_M_IX86) || defined(_M_ARM) # undef EZ_PLATFORM_32BIT # define EZ_PLATFORM_32BIT EZ_ON # else # error unhandled platform bit count # endif #else # error unhandled compiler #endif