new compute kernel design, less mem read delay
This commit is contained in:
@@ -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 //
|
||||
|
||||
Reference in New Issue
Block a user