Skip to main content

gpu_define_parse

Function gpu_define_parse 

Source
pub fn gpu_define_parse(num_tokens: u32, source_len: u32) -> Program
Expand description

Build the #define row parser Program.

num_tokens is kept ONLY to size the host-allocated output buffers (the CUDA backend rejects readback when output buffers don’t have a static byte length). The kernel BODY itself uses Expr::buf_len() for every per-thread bound - so the program AST is independent of the host’s input/source size and the dispatcher’s pipeline cache hits