mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 15:03:34 +00:00
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
22 lines
589 B
C
22 lines
589 B
C
#ifndef COSMOPOLITAN_THIRD_PARTY_GGML_F16_H_
|
|
#define COSMOPOLITAN_THIRD_PARTY_GGML_F16_H_
|
|
COSMOPOLITAN_C_START_
|
|
|
|
#ifdef __ARM_NEON
|
|
// we use the built-in 16-bit float type
|
|
typedef __fp16 ggml_fp16_t;
|
|
#else
|
|
typedef uint16_t ggml_fp16_t;
|
|
#endif
|
|
|
|
void ggml_fp16_init(void);
|
|
|
|
// convert FP16 <-> FP32
|
|
float ggml_fp16_to_fp32(ggml_fp16_t x);
|
|
ggml_fp16_t ggml_fp32_to_fp16(float x);
|
|
|
|
void ggml_fp16_to_fp32_row(const ggml_fp16_t* x, float* y, size_t n);
|
|
void ggml_fp32_to_fp16_row(const float* x, ggml_fp16_t* y, size_t n);
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* COSMOPOLITAN_THIRD_PARTY_GGML_F16_H_ */
|