new compute kernel design, less mem read delay

This commit is contained in:
Nitload
2026-04-07 01:04:05 +08:00
parent d702b3224c
commit 12a216d404
47 changed files with 225 additions and 145 deletions
+4 -6
View File
@@ -2,7 +2,7 @@
#ifndef SN_INTERNAL
#define SN_INTERNAL
#include <immintrin.h>
#include <xmmintrin.h>
#define UNSAFE_AS(type, expr) *(type *)&(expr)
@@ -13,17 +13,20 @@
#define SN_MAT_DECL __cdecl __forceinline
#define SN_API __declspec(dllexport)
#define FORCEINLINE __forceinline
#define NOINLINE __declspec(noinline)
#include <windows.h>
#elif defined(__clang__) || defined(__GNUC__)
#define SN_DECL __attribute__((cdecl))
#define SN_MAT_DECL __attribute__((cdecl)) __attribute__((always_inline))
#define SN_API __attribute__((dllexport))
#define FORCEINLINE __attribute__((always_inline))
#define NOINLINE __attribute__((noinline))
#else
#define SN_API
#define SN_DECL
#define SN_MAT_DECL
#define FORCEINLINE
#define NOINLINE
#endif
#if defined(_MSC_VER)
@@ -37,9 +40,4 @@
#define PRIVATE static
#define INTERNAL extern
#define SN_PTR_CAST(type, expr) ((type *)(void *)(expr))
#define SN_CONST_PTR_CAST(type, expr) ((type const *)(void const *)(expr))
#define SN_REF_CAST(type, expr) ((type *)(void *)&(expr))
#define SN_CONST_REF_CAST(type, expr) ((type const *)(void const *)&(expr))
#endif //