Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions fp16.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

#ifndef FP16_h
#define FP16_h
#ifdef __cplusplus
extern "C" {
#endif
float from_half(uint16_t h);
uint16_t to_half(float f);
#ifdef __cplusplus
}
#endif // __cplusplus
#endif
8 changes: 8 additions & 0 deletions gguflib.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ typedef struct {

/* =============================== Prototypes =============================== */

#ifdef __cplusplus
extern "C" {
#endif

gguf_ctx *gguf_open(const char *filename);
gguf_ctx *gguf_create(const char *filename, int flags);
int gguf_remap(gguf_ctx *ctx);
Expand All @@ -198,4 +202,8 @@ float *gguf_tensor_to_float(gguf_tensor *tensor);
int16_t *gguf_tensor_to_f16(gguf_tensor *tensor);
int16_t *gguf_tensor_to_bf16(gguf_tensor *tensor);

#ifdef __cplusplus
}
#endif

#endif