pub struct WgslTranspiler {
pub shared_vars: HashMap<String, SharedVarInfo>,
/* private fields */
}Expand description
WGSL code transpiler.
Fields§
Variables that are SharedTile or SharedArray types.
Implementations§
Source§impl WgslTranspiler
impl WgslTranspiler
Sourcepub fn new_stencil(config: StencilConfig) -> Self
pub fn new_stencil(config: StencilConfig) -> Self
Create a new transpiler with stencil configuration.
Sourcepub fn new_generic() -> Self
pub fn new_generic() -> Self
Create a new transpiler without stencil configuration.
Sourcepub fn new_ring_kernel(config: RingKernelConfig) -> Self
pub fn new_ring_kernel(config: RingKernelConfig) -> Self
Create a new transpiler for ring kernel generation.
Sourcepub fn with_workgroup_size(self, x: u32, y: u32, z: u32) -> Self
pub fn with_workgroup_size(self, x: u32, y: u32, z: u32) -> Self
Set the workgroup size for generic kernels.
Sourcepub fn transpile_stencil(&mut self, func: &ItemFn) -> Result<String>
pub fn transpile_stencil(&mut self, func: &ItemFn) -> Result<String>
Transpile a stencil kernel function.
Sourcepub fn transpile_global_kernel(&mut self, func: &ItemFn) -> Result<String>
pub fn transpile_global_kernel(&mut self, func: &ItemFn) -> Result<String>
Transpile a generic (non-stencil) kernel function.
Sourcepub fn transpile_ring_kernel(
&mut self,
handler: &ItemFn,
config: &RingKernelConfig,
) -> Result<String>
pub fn transpile_ring_kernel( &mut self, handler: &ItemFn, config: &RingKernelConfig, ) -> Result<String>
Transpile a handler function into a ring kernel.
Auto Trait Implementations§
impl !Freeze for WgslTranspiler
impl !RefUnwindSafe for WgslTranspiler
impl Send for WgslTranspiler
impl !Sync for WgslTranspiler
impl Unpin for WgslTranspiler
impl UnwindSafe for WgslTranspiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more