refactor: rename common_math.h to mconfig.h

This commit is contained in:
2025-06-21 22:11:45 +02:00
parent 3f005a2bbb
commit 3415dc15a3
5 changed files with 30 additions and 28 deletions

31
src/math/mconfig.h Normal file
View File

@@ -0,0 +1,31 @@
// Common math library
#ifndef MCONFIG_H
#define MCONFIG_H
#include <stdlib.h>
#include <string.h>
#include <math.h>
#if defined(__x86_64__) || defined(__i386__)
#define SIMD_X86
#include <xmmintrin.h>
#elif defined(__aarch64__) || defined(__arm64__)
#define SIMD_ARCH
#include <arm_neon.h>
#else
#define SIMD_NONE
#endif
#ifdef _MSC_VER
#define ALIGN16 __declspec(align(16))
#define RESTRICT __restrict__
#else
#define ALIGN16 __attribute__((aligned(16)))
#define RESTRICT __restrict
#endif
#endif // MCONFIG_H