microflow-macros 0.1.1

Macro crate of the MicroFlow inference engine, namely, the MicroFlow compiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use byterepr::ByteReprNum;
use nalgebra::Scalar;
use quote::ToTokens;
use simba::scalar::SubsetOf;

/// Represents the trait to constrain a type to be quantized and tokenized.
pub(crate) trait TokenQuantized:
    Scalar + ByteReprNum + ToTokens + SubsetOf<i32> + SubsetOf<f32> + SubsetOf<i64>
{
}

impl<T: Scalar + ByteReprNum + ToTokens + SubsetOf<i32> + SubsetOf<f32> + SubsetOf<i64>>
    TokenQuantized for T
{
}