1# @ajax/hist-quantile
23The per-mille quantile of a histogram of unit bins.
45```c
6#include "hist_quantile.h"
7```
89## Ported from
1011[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-abi/src/v2/views.rs (pipedemo::quantile).
1213## Device code
1415The header is freestanding (`<stdint.h>`, `<stddef.h>`, `<stdbool.h>` only): it compiles for the host, `nvptx64-nvidia-cuda` and `wasm32`. Functions the Rust marks `const fn` are `static inline` here.
1617## Tests
1819- `tests/golden.c`: its functions against 54 vectors computed by the Rust on the same inputs
2021## Licence
2223MIT. See the repository's LICENSE.