vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
//! Compile-time parameters for the Shannon-entropy over a fixed byte window.
//!
//! All scalar constants used by the entropy kernel live here so the
//! relationship between them (bucket count, fixed-point scale, and the
//! spec-table witness values) stays legible in one place.

use crate::ir::DataType;

/// Number of histogram buckets — one per byte value, so 256.
pub const HISTOGRAM_BUCKETS: u32 = 256;

/// Spec-table check value for an all-same-byte distribution.
pub const ALL_SAME_BYTE_ENTROPY: u32 = 0;

/// Fixed-point scale used for entropy values (results are reported as
/// `entropy * ENTROPY_SCALE` rounded to `u32`).
pub const ENTROPY_SCALE: u32 = 1_000;

/// Input type declaration: a single `Bytes` buffer to compute entropy over.
pub const INPUTS: &[DataType] = &[DataType::Bytes];