HLIBpro
3.0
|
𝖧𝖫𝖨𝖡𝗉𝗋𝗈 offers bindings for the C language, with most, albeit not all of the functionality implemented that is available in the standard C++ interface.
As 𝖧𝖫𝖨𝖡𝗉𝗋𝗈 supports single and double precision computation, the floating point precision needs to be chosen apriori. All types and functions in the C interface with are specific to a floating point format have a unique prefix:
Datatype | Prefix |
---|---|
float | hpro_s |
double | hpro_d |
float complex | hpro_c |
double complex | hpro_z |
All other types and functions only use the prefix hpro
.
To make the C functions available in your program, you can either include all via
or the header file for a particular value type, e.g.,
for real valued, double precision computations.
The following example programs have been converted from their C++ versions:
For compatibility with 𝖧𝖫𝖨𝖡𝗉𝗋𝗈 v2.x wrapper functions are implemented using the old function names, e.g.,
for real valued matrix-vector multiplication and
for the complex valued version.
By default, these wrapper functions map to the double precision functions of 𝖧𝖫𝖨𝖡𝗉𝗋𝗈, i.e., to
and
for the above matrix-vector computation.
This can be changed with
which activate single or double precision computations for all subsequent function calls.