mod buffer_decl;
mod builder;
mod canonical;
mod core;
#[allow(clippy::expect_used)]
mod meta;
mod scope;
mod stats;
#[cfg(test)]
#[path = "stats_test.rs"]
mod stats_test;
#[cfg(test)]
mod tests;
pub use self::buffer_decl::{BufferDecl, LinearType, ShapePredicate};
pub use self::core::Program;
pub use self::scope::Scope;
pub use self::stats::ProgramStats;
#[non_exhaustive]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub enum MemoryKind {
Global,
Shared,
Uniform,
Local,
Readonly,
Persistent,
Push,
}
#[non_exhaustive]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub enum CacheLocality {
Streaming,
Temporal,
Random,
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub struct MemoryHints {
pub coalesce_axis: Option<u8>,
pub preferred_alignment: u32,
pub cache_locality: CacheLocality,
}
impl Default for MemoryHints {
fn default() -> Self {
Self {
coalesce_axis: None,
preferred_alignment: 0,
cache_locality: CacheLocality::Temporal,
}
}
}