pub struct KernelTranslator { /* private fields */ }
Expand description
Translator for common CUDA kernel patterns
Implementations§
Source§impl KernelTranslator
impl KernelTranslator
Sourcepub fn with_block_dims(self, x: u32, y: u32, z: u32) -> Self
pub fn with_block_dims(self, x: u32, y: u32, z: u32) -> Self
Set block dimensions for optimization
Sourcepub fn with_grid_dims(self, x: u32, y: u32, z: u32) -> Self
pub fn with_grid_dims(self, x: u32, y: u32, z: u32) -> Self
Set grid dimensions for optimization
Sourcepub fn translate_vector_add(&self, kernel: &KernelDef) -> Result<TokenStream>
pub fn translate_vector_add(&self, kernel: &KernelDef) -> Result<TokenStream>
Translate a vector addition kernel pattern
Sourcepub fn translate_matrix_mul(&self, kernel: &KernelDef) -> Result<TokenStream>
pub fn translate_matrix_mul(&self, kernel: &KernelDef) -> Result<TokenStream>
Translate a matrix multiplication kernel pattern
Sourcepub fn translate_reduction(&self, kernel: &KernelDef) -> Result<TokenStream>
pub fn translate_reduction(&self, kernel: &KernelDef) -> Result<TokenStream>
Translate a reduction kernel pattern
Sourcepub fn translate_stencil(&self, kernel: &KernelDef) -> Result<TokenStream>
pub fn translate_stencil(&self, kernel: &KernelDef) -> Result<TokenStream>
Translate a stencil computation kernel pattern
Sourcepub fn detect_pattern(&self, kernel: &KernelDef) -> KernelPattern
pub fn detect_pattern(&self, kernel: &KernelDef) -> KernelPattern
Detect kernel pattern from AST
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelTranslator
impl RefUnwindSafe for KernelTranslator
impl Send for KernelTranslator
impl Sync for KernelTranslator
impl Unpin for KernelTranslator
impl UnwindSafe for KernelTranslator
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