pub struct CudaTranspiler {
pub shared_vars: HashMap<String, SharedVarInfo>,
/* private fields */
}Expand description
CUDA code transpiler.
Fields§
Variables that are SharedTile or SharedArray types.
Implementations§
Source§impl CudaTranspiler
impl CudaTranspiler
Sourcepub fn new(config: StencilConfig) -> Self
pub fn new(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 with_mode(mode: ValidationMode) -> Self
pub fn with_mode(mode: ValidationMode) -> Self
Create a new transpiler with a specific validation mode.
Sourcepub fn for_ring_kernel() -> Self
pub fn for_ring_kernel() -> Self
Create a transpiler configured for ring kernel handler transpilation.
Sourcepub fn set_validation_mode(&mut self, mode: ValidationMode)
pub fn set_validation_mode(&mut self, mode: ValidationMode)
Set the validation mode.
Get the shared memory configuration.
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_generic_kernel(&mut self, func: &ItemFn) -> Result<String>
pub fn transpile_generic_kernel(&mut self, func: &ItemFn) -> Result<String>
Transpile a generic (non-stencil) kernel function.
This generates a __global__ kernel without stencil-specific preamble.
The kernel code can use thread_idx_x(), block_idx_x() etc. to access
CUDA thread indices directly.
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 persistent ring kernel.
This wraps the handler body in a persistent message-processing loop with control block integration, queue operations, and HLC support.