new compute kernel design, less mem read delay
This commit is contained in:
@@ -12,30 +12,13 @@
|
||||
#include "../lib/stbi/stb_image.h"
|
||||
|
||||
#include "gl.h"
|
||||
#include "wgl.h"
|
||||
// #include "wgl.h"
|
||||
#define GLFWAPI INTERNAL
|
||||
#include "glfw\glfw3.h"
|
||||
#include <immintrin.h>
|
||||
#include <assert.h>
|
||||
#include <glfw_function.h>
|
||||
|
||||
#ifndef SN_APIDEF
|
||||
|
||||
#ifdef _WIN32
|
||||
#define SN_API __declspec(dllexport)
|
||||
#elif defined _LINUX_
|
||||
#define SN_API __attribute__((dllexport))
|
||||
#elif defined _APPLE_
|
||||
#define SN_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define SN_API
|
||||
#endif
|
||||
|
||||
#endif // ! SN_APIDEF
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define byte char
|
||||
#define cs_char uint16_t
|
||||
#define sn_null_assert(ptr) assert(ptr != NULL)
|
||||
@@ -65,21 +48,12 @@ SN_API void SN_DECL unloadImageData(Image *out);
|
||||
SN_API char *SN_DECL readLog(void);
|
||||
SN_API void SN_DECL load_glfw_functions(GLFWFunctionTable *table);
|
||||
SN_API void SN_DECL load_intrinsic_function(void *intrinsic_context, uint64_t id);
|
||||
|
||||
#pragma region numa
|
||||
SN_API SIMDID SN_DECL sn_get_unite_simd(SIMDID left, SIMDID right);
|
||||
SN_API int SN_DECL sn_compare_simd(SIMDID left, SIMDID right);
|
||||
SN_API void SN_DECL sn_set_thread_affinity(int core_id);
|
||||
SN_API int SN_DECL sn_get_numa_overall(int *out_numa_count, int *count_of_each_numa);
|
||||
SN_API int SN_DECL sn_get_numa_each(int numa_id, uint64_t *in_numa_cpuid, uint64_t *global_cpuid);
|
||||
SN_API SIMDID SN_DECL sn_get_simd_level_global();
|
||||
/* Per-core variant: always re-executes CPUID, never caches.
|
||||
* Must be called on the target core (after affinity is set). */
|
||||
SN_API SIMDID SN_DECL sn_get_simd_level_local();
|
||||
SN_API SIMDID SN_DECL sn_get_simd_level_global();
|
||||
|
||||
#pragma endregion
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SN_API SIMDID SN_DECL sn_get_unite_simd(SIMDID left, SIMDID right);
|
||||
SN_API int SN_DECL sn_compare_simd(SIMDID left, SIMDID right);
|
||||
SN_API void SN_DECL sn_set_thread_affinity(int core_id);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user