pub fn validate_function(func: &ItemFn) -> Result<(), ValidationError>Expand description
Validate that a function conforms to the stencil kernel DSL.
§Constraints
- No loops (
for,while,loop) - use parallel threads - No closures
- No async/await
- No heap allocations (Vec, Box, String, etc.)
- No recursion
- No trait objects
§Returns
Ok(()) if validation passes, Err with the first validation error otherwise.