Skip to main content

compile_to_cuda

Function compile_to_cuda 

Source
pub fn compile_to_cuda(source: &str) -> Result<CudaArtifact, ParseError>
Expand description

Compile to a single-file CUDA program — the LOGOS → CUDA AOT tier. Lifts the C tier’s program body (compile_to_c, byte-for-byte ≡ the VM) onto one GPU thread as __device__ code, over a printf-based Show preamble, plus a host launcher. Uses the SAME Oracle-optimized bytecode to refuse anything outside the integer/bool scalar fragment (a GPU thread has no dynamic C runtime), returning a Custom ParseError — a sound refusal, never wrong code. Returns the emitted crate::codegen_cuda::CudaArtifact.