cgen – C-Generation Reference Documentation

Data and Functions

Preprocessor Code

Declarators

Nested Declarators

Declaration Specifiers

Statements

cgen.cuda – Extensions to generate CUDA-compatible C Sources

This module adds a few Nvidia CUDA features to cgen’s repertoire. This makes cgen a perfect complement to PyCuda: cgen generates the code, PyCuda compiles it, uploads it to the GPU and executes it.

The PyCuda manual has a tutorial on using the two together.

cgen.opencl – Extensions to generate OpenCL-compatible C Sources

Kernels and Kernel Arguments

Function Attributes

Vector PODs