Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7118 Discussions

Difference between cgesvd and LAPACKE_cgesvd or cgesdd and LAPACKE_cgesdd

Angelo_L_
Beginner
942 Views

I would like to know the difference between 

LAPACKE_cgesvd

(see https://software.intel.com/en-us/node/521150) and

cgesvd

(see https://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_lapack_examples/cgesvd_ex.c.htm).

Is LAPACKE_cgesvd just a wrapper around cgesvd automatically selecting the resources? Is there any performance improvement/penalty using the former or the latter?

Thank you very much for any help.

0 Kudos
1 Reply
Ying_H_Intel
Employee
942 Views

Hi Angelo,

Yes, the LAPACKE_cgesvd just a wrapper around cgesvd automatically selecting the resources for convenience of C developers. It may lower the performance but considering the problem size, the performance penalty can be ignored in most cases. 

Here is one thread to discuss the design background of C interface to LAPACKL

https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/300188

and the PDF https://software.intel.com/sites/default/files/m/d/4/1/d/8/C_Interface_to_LAPACK.pdf

Disadvantages to using a wrapper approach to access existing FORTRAN subprograms are
increased memory footprints and lower performance where a transpose is needed. Another way
to implement row-major C interfaces without an increase in memory is to re-organize the

LAPACK algorithms (for instance, LU factorization to be mapped on row-major ordering) or use
tricks to call some complementary routine such as
dgelqf for dgeqrf, .

Best Regards,

Ying

0 Kudos
Reply