pomp
Inference for partially observed Markov processes
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pomp_mat.h File Reference
#include <Rconfig.h>
#include <R_ext/Lapack.h>
#include "internal.h"
Include dependency graph for pomp_mat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FCONE
 

Functions

static R_INLINE void pomp_backsolve (double *a, int lda, int n, double *x, int incx, char *uplo, char *transpose, char *unit)
 
static R_INLINE void pomp_qr (double *a, int m, int n, int *pivot, double *tau)
 
static R_INLINE void pomp_qrqy (double *c, double *a, int lda, double *tau, int m, int n, int k, char *side, char *transpose)
 

Macro Definition Documentation

◆ FCONE

#define FCONE

Definition at line 7 of file pomp_mat.h.

Function Documentation

◆ pomp_backsolve()

static R_INLINE void pomp_backsolve ( double *  a,
int  lda,
int  n,
double *  x,
int  incx,
char *  uplo,
char *  transpose,
char *  unit 
)
static

Definition at line 11 of file pomp_mat.h.

15 {
16 // Level 2 BLAS triangular-matrix solver DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
17 // DTRSV: x <- A ^{-1} x -or- x <- A ^{-T} x, A triangular
18 // N is the order of A
19 // LDA is A's leading dimension
20 // INCX is the increment between successive X locations
21 // UPLO is "U" or "L" depending on whether A is upper or lower triangular
22 // TRANSPOSE is "T" or "N" depending on whether the transpose is desired
23 // DIAG is "U" or "N" depending on whether A is unit triangular or not
24 F77_CALL(dtrsv)(uplo,transpose,unit,&n,a,&lda,x,&incx FCONE FCONE FCONE);
25}
#define FCONE
Definition pomp_mat.h:7
Here is the caller graph for this function:

◆ pomp_qr()

static R_INLINE void pomp_qr ( double *  a,
int  m,
int  n,
int *  pivot,
double *  tau 
)
static

Definition at line 27 of file pomp_mat.h.

30 {
31 int info, j, lwork = -1;
32 double work1;
33 // zero out the pivots (assumed by DGEQP3)
34 for (j = 0; j < n; j++) pivot[j] = 0;
35 // LAPACK QR decomposition routine
36 // DGEQP3(M,N,A,LDA,JPVT,TAU,WORK,LWORK,INFO)
37 F77_CALL(dgeqp3)(&m,&n,a,&m,pivot,tau,&work1,&lwork,&info); // workspace query
38 lwork = (int) ceil(work1);
39 {
40 double work[lwork];
41 F77_CALL(dgeqp3)(&m,&n,a,&m,pivot,tau,work,&lwork,&info); // actual call
42 }
43 for (j = 0; j < n; j++) pivot[j]--;
44}
#define tau
Definition gompertz.c:94
Here is the caller graph for this function:

◆ pomp_qrqy()

static R_INLINE void pomp_qrqy ( double *  c,
double *  a,
int  lda,
double *  tau,
int  m,
int  n,
int  k,
char *  side,
char *  transpose 
)
static

Definition at line 46 of file pomp_mat.h.

50 {
51 int info, lwork = -1;
52 double work1;
53 // workspace query
54 // DORMQR(SIDE,TRANS,M,N,K,A,LDA,TAU,C,LDC,WORK,LWORK,INFO)
55 F77_CALL(dormqr)(side,transpose,&m,&n,&k,a,&lda,tau,c,&m,&work1,&lwork,&info FCONE FCONE);
56 lwork = (int) ceil(work1);
57 { // actual call
58 double work[lwork];
59 F77_CALL(dormqr)(side,transpose,&m,&n,&k,a,&lda,tau,c,&m,work,&lwork,&info FCONE FCONE);
60 }
61}
Here is the caller graph for this function: