Skip to content

Commit 6ee19f7

Browse files
Marcus GroeberMarcus Groeber
authored andcommitted
Use GGML_RESTRICT instead of "restrict" keyword everywhere, and use "__restrict" in MSVC plain C mode
1 parent 3936879 commit 6ee19f7

File tree

5 files changed

+531
-527
lines changed

5 files changed

+531
-527
lines changed

ggml/include/ggml.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,7 +2140,11 @@ extern "C" {
21402140
# define GGML_RESTRICT
21412141
# endif
21422142
#else
2143-
# define GGML_RESTRICT restrict
2143+
# if defined(_MSC_VER)
2144+
# define GGML_RESTRICT __restrict
2145+
# else
2146+
# define GGML_RESTRICT restrict
2147+
# endif
21442148
#endif
21452149
typedef void (*ggml_to_float_t) (const void * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
21462150
typedef void (*ggml_from_float_t)(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);

0 commit comments

Comments
 (0)