Skip to main content

Module c

Module c 

Source
Expand description

C source code generation backend.

Generates C source code from linearized UOp IR, suitable for compilation with clang -shared -O2 and loading via dlopen.

§Kernel Signature

Emits a single function with typed restrict pointer params and const variable params:

void kernel(float* restrict data0, const int N) { /* body */ }

Modules§

ops
C source code rendering for individual UOp operations.
types
C type mapping and constant rendering for the C codegen backend.

Structs§

CRenderer
C source code renderer for CPU execution via clang.

Functions§

render
Public render function for the C backend.