pub(crate) const WORKGROUP_SIZE: [u32; 3] = [64, 1, 1];
pub mod math;
pub(crate) use binary_f32_program::binary_f32_program;
pub(crate) use binary_u32_program::binary_u32_program;
pub use bitwise::{
and, clz, ctz, extract_bits, insert_bits, not, or, popcount, popcount_sw, reverse_bits, rotl,
rotr, shl, shr, xor,
};
pub use math::mod_op;
pub use math::{abs, add, add_sat, div, lcm, mul, neg, negate, sign, sub, sub_sat};
pub(crate) use ternary_f32_program::ternary_f32_program;
pub(crate) use unary_f32_program::unary_f32_program;
pub(crate) use unary_u32_program::unary_u32_program;
automod::dir!(pub "src/ops/primitive");
macro_rules! category_a_cpu {
($($ty:path),+ $(,)?) => {
$(
impl crate::ops::CategoryAOp for $ty {
fn program() -> crate::ir::Program {
<$ty>::program()
}
}
)+
};
}
category_a_cpu!(
bitwise::and::And,
bitwise::clz::Clz,
bitwise::ctz::Ctz,
bitwise::extract_bits::ExtractBits,
bitwise::insert_bits::InsertBits,
bitwise::not::Not,
bitwise::or::Or,
bitwise::popcount::Popcount,
bitwise::reverse_bits::ReverseBits,
bitwise::rotl::Rotl,
bitwise::rotr::Rotr,
bitwise::shl::Shl,
bitwise::shr::Shr,
bitwise::xor::Xor,
clamp::Clamp,
compare::eq::Eq,
compare::ge::Ge,
compare::gt::Gt,
compare::le::Le,
compare::logical_not::LogicalNot,
compare::lt::Lt,
compare::ne::Ne,
float::f32_abs::F32Abs,
float::f32_add::F32Add,
float::f32_ceil::F32Ceil,
float::f32_clamp::F32Clamp,
float::f32_cmp::F32Cmp,
float::f32_cos::F32Cos,
float::f32_div::F32Div,
float::f32_eq::F32Eq,
float::f32_floor::F32Floor,
float::f32_fma::F32Fma,
float::f32_is_finite::F32IsFinite,
float::f32_is_inf::F32IsInf,
float::f32_is_nan::F32IsNan,
float::f32_le::F32Le,
float::f32_lt::F32Lt,
float::f32_max::F32Max,
float::f32_min::F32Min,
float::f32_mul::F32Mul,
float::f32_neg::F32Neg,
float::f32_rem::F32Rem,
float::f32_round::F32Round,
float::f32_sign::F32Sign,
float::f32_sin::F32Sin,
float::f32_sqrt::F32Sqrt,
float::f32_sub::F32Sub,
float::f32_trunc::F32Trunc,
math::abs::Abs,
math::abs_diff::AbsDiff,
math::add::Add,
math::add_sat::AddSat,
math::div::Div,
math::gcd::Gcd,
math::lcm::Lcm,
math::mod_op::Mod,
math::mul::Mul,
math::neg::Neg,
math::negate::Negate,
math::sign::Sign,
math::sub::Sub,
math::sub_sat::SubSat,
max::Max,
min::Min,
select_op::SelectOp,
);