1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
#include <cassert>
#include <cctype>

#include <flens/lapack/interface/include/config.h>

#ifdef LAPACK_IMPL
#   undef   LAPACK_IMPL
#endif
#define  LAPACK_IMPL(x)     x

extern "C" {

INTEGER
LAPACK_DECL(ilaenv)(const INTEGER *SPEC,
                    const char *NAME,
                    const char *OPTS,
                    const INTEGER *N1,
                    const INTEGER *N2,
                    const INTEGER *N3,
                    const INTEGER *N4,
                    int NAME_LEN,
                    int OPTS_LEN);

//
// for "ilaenv" and "xerbla" LAPACK_IMPL(..) calls the LAPACK_DECL(..)
// such that the routines from the LAPACK test suite get called
//
INTEGER
LAPACK_IMPL(ilaenv)(const INTEGER *SPEC,
                    const char *NAME,
                    const char *OPTS,
                    const INTEGER *N1,
                    const INTEGER *N2,
                    const INTEGER *N3,
                    const INTEGER *N4,
                    int NAME_LEN,
                    int OPTS_LEN)
{
    return LAPACK_DECL(ilaenv)(SPEC,
                               NAME,
                               OPTS,
                               N1,
                               N2,
                               N3,
                               N4,
                               NAME_LEN,
                               OPTS_LEN);
}

void
LAPACK_IMPL(xerbla)(const char      *SRNAME,
                    const INTEGER   *INFO,
                    int             SRNAME_LEN)
{
    return LAPACK_DECL(xerbla)(SRNAME,
                               INFO,
                               SRNAME_LEN);
}

// extern "C"