/* Native quantized tensor projection helpers. */
#ifndef BIO_QUANT_H_
#define BIO_QUANT_H_

#include <stddef.h>
#include <stdint.h>

#include "bio/bio.h"
#include "bio/bio_gguf.h"

typedef bio_v1_status (*bio_quant_project_fn)(const bio_gguf_tensor_span *tensor,
                                              const uint32_t *tokens,
                                              uint32_t token_count,
                                              float *logits,
                                              uint32_t logit_count);

bio_v1_status bio_quant_project_scalar(const bio_gguf_tensor_span *tensor,
                                       const uint32_t *tokens,
                                       uint32_t token_count,
                                       float *logits,
                                       uint32_t logit_count);
bio_v1_status bio_quant_project_avx2(const bio_gguf_tensor_span *tensor,
                                     const uint32_t *tokens,
                                     uint32_t token_count,
                                     float *logits,
                                     uint32_t logit_count);
float bio_quant_decode_sample(const uint8_t *data, uint64_t len, uint64_t index,
                              uint32_t ggml_type);

#endif /* BIO_QUANT_H_ */
