File Config.h¶
File List > Amplitude > Core > Common > Config.h
Go to the documentation of this file
// Copyright (c) 2021-present Sparky Studios. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#ifndef _AM_CORE_COMMON_CONFIG_H
#define _AM_CORE_COMMON_CONFIG_H
#if AM_COMPILER_GCC || AM_COMPILER_CLANG
#define AM_DEPRECATED(msg) __attribute__((deprecated(msg)))
#elif AM_COMPILER_MSVC
#define AM_DEPRECATED(msg) __declspec(deprecated(msg))
#else
#define AM_DEPRECATED(msg)
#endif
#if AM_PLATFORM_WIN
#include <SparkyStudios/Audio/Amplitude/Core/Common/Platforms/Windows/Config.h>
#elif AM_PLATFORM_ANDROID
#include <SparkyStudios/Audio/Amplitude/Core/Common/Platforms/Android/Config.h>
#elif AM_PLATFORM_APPLE
#include <SparkyStudios/Audio/Amplitude/Core/Common/Platforms/Apple/Config.h>
#elif AM_PLATFORM_LINUX
#include <SparkyStudios/Audio/Amplitude/Core/Common/Platforms/Linux/Config.h>
#endif
#if !defined(AM_VALUE_ALIGN)
#define AM_VALUE_ALIGN(_value_, _alignment_) (((_value_) + ((_alignment_) - 1)) & ~((_alignment_) - 1))
#endif
#if !defined(AM_CALL_POLICY)
#define AM_CALL_POLICY
#endif
#if defined(AM_BUILDSYSTEM_SHARED)
#if defined(AM_BUILDSYSTEM_BUILDING_AMPLITUDE)
#define AM_API_PUBLIC AM_LIB_EXPORT
#else
#define AM_API_PUBLIC AM_LIB_IMPORT
#endif
#define AM_API_PRIVATE AM_LIB_PRIVATE
#if defined(AM_BUILDSYSTEM_BUILDING_PLUGIN)
#define AM_API_PLUGIN AM_LIB_EXPORT
#else
#define AM_API_PLUGIN AM_LIB_IMPORT
#endif
#else // AM_BUILDSYSTEM_STATIC
#define AM_API_PUBLIC
#define AM_API_PRIVATE static
#define AM_API_PLUGIN
#endif
#if !defined(AM_RESTRICT)
#define AM_RESTRICT
#endif
#if defined(_DEBUG) || defined(DEBUG) || (defined(__GNUC__) && !defined(__OPTIMIZE__))
#define AM_DEBUG
#endif
#if !defined(AMPLITUDE_DISABLE_SIMD)
#if AM_ARCH_X86 || AM_ARCH_X86_64 || AM_ARCH_ARM_V7 || AM_ARCH_ARM_64
#define AM_SIMD_INTRINSICS
#include <SparkyStudios/Audio/Amplitude/Core/Common/SIMD.h>
#endif // AM_ARCH_X86 || AM_ARCH_X86_64 || AM_ARCH_ARM_V7 || AM_ARCH_ARM_64
#else
#define PFFFT_SIMD_DISABLE
#define MA_NO_NEON
#define MA_NO_AVX2
#define MA_NO_AVX
#define MA_NO_SSE2
#define EIGEN_DONT_VECTORIZE
#endif // AMPLITUDE_DISABLE_SIMD
// Default alignment if no SIMD architecture is detected
#ifndef AM_SIMD_ALIGNMENT
#define AM_SIMD_ALIGNMENT 16
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846264f // from CRC
#endif
// Configuration defines
// --------------------------------------------------------------
#if !defined(AM_MAX_THREAD_POOL_TASKS)
#define AM_MAX_THREAD_POOL_TASKS 1024
#endif
#endif // _AM_CORE_COMMON_CONFIG_H