For routines where we depend on the Fortran LAPACK for implementation,
we have created a new C/LAPACK API, which can be found in
ATLAS/interfaces/lapack/C2F/src. This API is presently
undocumented. It prefixes ATL_C2F to the native LAPACK
This interface is designed to be quick to extend, and it's main
goal is to provide access to the F77 LAPACK without requiring the
caller to know the arcana of calling a Fortran77 routine from C
(which varies by compiler and platform). Therefore, you get a
nice C interface, using enums, with correct pass-by-address/value.
For every routine that takes a work argument, this API provides
two routines: one with the normal name which does not take
a work, where the API does the malloc for the user, and a second
routine with _wrk suffixed to the name that works exactly
like the F77 routine (user must pass in appropriate workspace).
So, for instance the lapack routine geqrf takes work, and
so for double precision this API provides a routine ATL_C2Fdgeqrf
which takes no workspace-related parameters, and a
ATL_C2Fdgeqrf_wrk which takes workspace parameters.
The C2F API is built by simple wrappers around the F77 LAPACK,
and presently we have wrappers only for the QR-related routines.
It is extremely straightfoward to expand this API to cover all
of LAPACK, but I won't do so unless users ask for given routines,
or my own research requires them (no use producing code that
one using), so let me know if there are routines you'd like to
see ATLAS provide via this API.
R. Clint Whaley