/libcg

Primary LanguageMakefileMIT LicenseMIT

libcg: Conjugate gradient for C in Julia

CI

This serves as a proof-of-concept for writing dynamic libraries for C or other languages in Julia.

It creates a library for performing solving a matrix-free linear system via the conjugate gradient method. It wraps the cg! function from IterativeSolvers.jl and exposes it as a C-callable interface using PackageCompiler.jl.

Examples are provided for calling this from C and Rust.