In fact, I want to call magma from fortran. So I add magma.lib and create an interface to use the C fuction of magma:
Interface
Integer function magma_dpotrf(uplo, n, a, lda, info) BIND (C, NAME="magma_dpotrf")
use iso_c_binding
Implicit none
!character (c_char), value :: uplo????
integer (c_int), value ::n
real (c_double) ::a(*)
integer (c_int), value ::lda
integer (c_int)::info
end function
end Interface
But the parameter uplo is a user defined type In C code (magma_uplo_t uplo):
typedef enum {
MagmaUpper = 121,
MagmaLower = 122,
MagmaUpperLower = 123,
MagmaFull = 123, /* lascl, laset */
MagmaHessenberg = 124 /* lascl */
} magma_uplo_t;
magma_int_t
magma_dpotrf(
magma_uplo_t uplo, magma_int_t n,
double *A, magma_int_t lda,
magma_int_t *info);
magma_int_t = int, Does anyone knows how to create interface for it? Thanks in advance