pub trait Compiler: Sync + Send + 'static + Clone + Default + Debug {
type Representation: Display;
type Float: FloatElement;
type Int: IntElement;
type FullPrecisionCompiler: Compiler<Representation = Self::Representation, Float = f32, Int = i32>;
// Required methods
fn compile(shader: ComputeShader) -> Self::Representation;
fn elem_size(elem: Elem) -> usize;
fn max_shared_memory_size() -> usize;
}Expand description
Compiles the gpu representation into its own representation that can be formatted into tokens.
Required Associated Types§
sourcetype Representation: Display
type Representation: Display
The representation for the compiled code.
sourcetype Float: FloatElement
type Float: FloatElement
The float element type used for compilation.
sourcetype Int: IntElement
type Int: IntElement
The int element type used for compilation.
sourcetype FullPrecisionCompiler: Compiler<Representation = Self::Representation, Float = f32, Int = i32>
type FullPrecisionCompiler: Compiler<Representation = Self::Representation, Float = f32, Int = i32>
The compiler that can be used to generate full precision shaders.
Required Methods§
sourcefn compile(shader: ComputeShader) -> Self::Representation
fn compile(shader: ComputeShader) -> Self::Representation
Compiles the gpu shader into the compiler’s representation.
The maximal size of a shared memory
Object Safety§
This trait is not object safe.