Skip to content

Commit 2dce119

Browse files
committed
ggml-cpu: bring back ggml_table_f32_f16
Signed-off-by: Aaron Teo <[email protected]>
1 parent 176e1db commit 2dce119

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ggml/src/ggml-cpu/simd-mappings.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#include <immintrin.h>
1919
#endif
2020

21+
#ifdef __cplusplus
22+
extern "C" {
23+
#endif
24+
2125
//
2226
// simd mappings
2327
//
@@ -139,11 +143,7 @@
139143

140144
// precomputed f32 table for f16 (256 KB)
141145
// defined in ggml-cpu.c, initialized in ggml_cpu_init()
142-
#ifdef __cplusplus
143-
extern "C" float ggml_table_f32_f16[1 << 16];
144-
#else
145-
extern float ggml_table_f32_f16[1 << 16];
146-
#endif
146+
float ggml_table_f32_f16[1 << 16];
147147

148148
// On ARM NEON, it's quicker to directly convert x -> x instead of calling into ggml_lookup_fp16_to_fp32,
149149
// so we define GGML_CPU_FP16_TO_FP32 and GGML_CPU_FP32_TO_FP16 elsewhere for NEON.
@@ -1178,3 +1178,7 @@ static inline void __lzs_f16cx4_store(ggml_fp16_t * x, float32x4_t v_y) {
11781178
#define GGML_F32_ARR (GGML_F32_STEP/GGML_F32_EPR)
11791179
#define GGML_F16_ARR (GGML_F16_STEP/GGML_F16_EPR)
11801180
#endif
1181+
1182+
#ifdef __cplusplus
1183+
} // extern "C"
1184+
#endif

0 commit comments

Comments
 (0)