JuliaInterop / Clang.jl

C binding generator and Julia interface to libclang
https://juliainterop.github.io/Clang.jl/
MIT License
220 stars 68 forks source link

Is it possible to handle headers with `__float128`? #509

Open Gnimuc opened 2 weeks ago

Gnimuc commented 2 weeks ago

Discussed in https://github.com/JuliaInterop/Clang.jl/discussions/508

Originally posted by **amontoison** August 30, 2024 Some Fortran libraries, like `CUTEst`, can be easily compiled in quadruple precision with the `gfortran` compiler. The associated type in the header file to call the routines from C is `__float128` and is equivalent to `Float128` (implemented in `Quadmath.jl`). It will be a nice feature to add an option to generate Julia wrappers for this precision. We just need to add `using Quadmath` at the top of the generated file if Julia wrappers can be generated. I have a package where I need to write these additional wrappers by hand: - https://github.com/JuliaSmoothOptimizers/CUTEst.jl/tree/main/gen - https://github.com/JuliaSmoothOptimizers/CUTEst.jl/blob/main/src/libcutest.jl
Gnimuc commented 2 weeks ago

https://github.com/JuliaInterop/Clang.jl/blob/9c77fd6b4982c8b34c21a64748aea2664409206e/src/generator/jltypes.jl#L145