cgen icon indicating copy to clipboard operation
cgen copied to clipboard

C/C++ source generation from an AST

Results 7 cgen issues
Sort by recently updated
recently updated
newest added

Needs to fix #21 while avoiding all [this](https://gitlab.tiker.net/inducer/loopy/merge_requests/353). cc @kaushikcfd - [ ] :warning: Test against loopy before merging

Some quality of life improvements. This allows you to write a common include guard pattern such as: ```Python test = c.IfNDef('__HEADER__', [ c.Define('__HEADER__'), c.Comment("Header content") ]) print(test) ``` Which results...

Both ```python Pointer(ArrayOf(Pointer(POD(np.float32, "xxx")), 2)), Pointer(Pointer(ArrayOf(POD(np.float32, "yyy"), 2))), ``` result in ```c float **xxx[2]; float **yyy[2]; ``` The expected result is ```c float *(*xxx)[2]; float (**xxx)[2]; ```

with the current file structure, it is not possible to implement the **preprocessor** ```#if``` statement, as it would overwrite (or be overwritten by) the **C** ```if ()``` statement. I would...

Hello all. I'd like to use cgen to create come C++ classes. From what I see that's not supported, correct?

This enables pyright and fixed a lot of errors that it complained about (mainly around override and class variables).