ytm._core.backends.toolchain.Toolchain#

class ytm._core.backends.toolchain.Toolchain(openmp: bool = True)#

Bases: object

Builds C code into shared libraries for the cpu backend.

Parameters:
openmpbool, default=True

Try to build with OpenMP. If no flags work, it builds without, and is_openmp_working is False with the reasons in omp_failures.

compile(code: str) → CDLL#

Build code into a shared library and load it, reusing a cached build if there is one.