File: external_libs.h

package info (click to toggle)
phast 1.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,008 kB
  • sloc: ansic: 54,195; makefile: 358; sh: 337; perl: 321
file content (69 lines) | stat: -rw-r--r-- 1,900 bytes parent folder | download
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
61
62
63
64
65
66
67
68
69
/***************************************************************************
 * PHAST: PHylogenetic Analysis with Space/Time models
 * Copyright (c) 2002-2005 University of California, 2006-2010 Cornell 
 * University.  All rights reserved.
 *
 * This source code is distributed under a BSD-style license.  See the
 * file LICENSE.txt for details.
 ***************************************************************************/

/*
  
  This file contains some definitions which are useful for linking to
  external libraries (R, clapack, veclib)

 */

#ifndef _PHAST_EXTERNAL_LIBS_
#define _PHAST_EXTERNAL_LIBS_

#include <stdlib.h>

#ifdef RPHAST
#include <Rconfig.h>
#define PHAST_INLINE R_INLINE
#else
#define PHAST_INLINE inline
#endif

#ifdef R_LAPACK
#include <R_ext/Lapack.h>
#define LAPACK_INT int
#define LAPACK_DOUBLE double
#else

#ifdef VECLIB
#include <Accelerate/Accelerate.h>
#define LAPACK_INT __CLPK_integer
#define LAPACK_DOUBLE __CLPK_doublereal
#else

#ifndef SKIP_LAPACK 

int dgeev_(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *wr,
           double *wi, double *vl, int *ldvl, double *vr, int *ldvr,
           double *work, int *lwork, int *info);

int dgebal_(char *job, int *n, double *a, int *lda, int *ilo, int *ihi,
            double *scale, int *info);

int dgesv_(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b,
           int *ldb, int *info);

int dgebak_(char *job, char *side, int *n, int *ilo, int *ihi, double *scale,
            int *m, double *v, int *ldv, int *info);

int dgetrf_(int *m, int *n, double *a, int *lda, int *ipiv, int *info);

int dgetri_(int *n, double *a, int *lda, int *ipiv, double *work, int *lwork,
            int *info);

#define LAPACK_INT int
#define LAPACK_DOUBLE double
#endif  /*ifndef SKIP_LAPACK */

#endif  /*ifdef VECLIB */

#endif  /* ifdef R_LAPACK */

#endif  /* ifndef PHAST_EXTERNAL_LIBS */