Custom C Structs and Pure-C `cdef` Classes

To handle more complex, composite data structures efficiently without the GIL, define C `struct`s or Cython `cdef` classes whose attributes are exclusively C types. These allow grouping related data for pass-by-value or pass-by-pointer operations in `nogil` contexts.

Sources

Open the full topic