Commit 56ca5e9b authored by agebhard's avatar agebhard
Browse files

add Fortran parameter defintions and library call initializations.

parent c477e6bb
#include <R.h>
int F77_NAME(idbvip) (int *md, int *ncp, int *ndp,
double *xd, double *yd, double *zd,
int *nip, double *xi, double *yi, double *zi,
int *iwk, double *wk, int *missi);
int F77_NAME(sdbi3p) (int *md, int *ndp, double *xd, double *yd, double *zd,
int *nip, double *xi, double *yi, double *zi,
int *ier, double *wk, int *iwk,
int *extrpi, int *near, int *next, double *dist);
int F77_NAME(idsfft) (int *md, int *ncp, int *ndp,
double *xd, double *yd,double *zd,
int *nxi, int *nyi,
double *xi, double *yi, double *zi,
int *iwk, double *wk, int *missi);
int F77_NAME(sdsf3p) (int *md, int *ndp, double *xd, double *yd, double *zd,
int *nxi, double *xi, int *nyi, double *yi, double *zi,
int *ier, double *wk, int *iwk,
int *extrpi, int *near, int *next, double *dist);
int F77_NAME(uvip3p) (int *np, int *nd, double *xd, double *yd,
int *ni, double *xi, double *yi, int *err);
int F77_NAME(intrpl) (int *l,double *x, double *y, int *n,
double *u, double *v, int *err);
#include <R.h>
#include <Rinternals.h>
#include "akima.h"
#include <R_ext/Rdynload.h>
/* Fortran interface descriptions: */
static R_NativePrimitiveArgType idbvip_t[13] = {
INTSXP, // MD,
INTSXP, // NCP,
INTSXP, // NDP,
REALSXP, // XD,
REALSXP, // YD,
REALSXP, // ZD,
INTSXP, // NIP,
REALSXP, // XI,
REALSXP, // YI,
REALSXP, // ZI,
INTSXP, // IWK,
REALSXP, // WK,
LGLSXP // MISSI
};
static R_NativePrimitiveArgType sdbi3p_t[16] = {
INTSXP, // MD,
INTSXP, // NDP,
REALSXP, // XD,
REALSXP, // YD,
REALSXP, // ZD,
INTSXP, // NIP,
REALSXP, // XI,
REALSXP, // YI,
REALSXP, // ZI,
INTSXP, // IER,
REALSXP, // WK,
INTSXP, // IWK,
INTSXP, // EXTRPI,
INTSXP, // NEAR,
INTSXP, // NEXT,
REALSXP // DIST
};
static R_NativePrimitiveArgType idsfft_t[14] = {
INTSXP, // MD,
INTSXP, // NCP,
INTSXP, // NDP,
REALSXP, // XD,
REALSXP, // YD,
REALSXP, // ZD,
INTSXP, // NXI,
INTSXP, // NYI,
REALSXP, // XI,
REALSXP, // YI,
REALSXP, // ZI,
INTSXP, // IWK,
REALSXP, // WK,
LGLSXP // MISSI
};
static R_NativePrimitiveArgType sdsf3p_t[17] = {
INTSXP, // MD,
INTSXP, // NDP,
REALSXP, // XD,
REALSXP, // YD,
REALSXP, // ZD,
INTSXP, // NXI,
REALSXP, // XI,
INTSXP, // NYI,
REALSXP, // YI,
REALSXP, // ZI,
INTSXP, // IER,
REALSXP, // WK,
INTSXP, // IWK,
INTSXP, // EXTRPI,
INTSXP, // NEAR,
INTSXP, // NEXT,
REALSXP // DIST
};
static R_NativePrimitiveArgType uvip3p_t[8] = {
INTSXP, // NP,
INTSXP, // ND,
REALSXP, // XD,
REALSXP, // YD,
INTSXP, // NI,
REALSXP, // XI,
REALSXP, // YI,
INTSXP // ERR
};
static R_NativePrimitiveArgType intrpl_t[7] = {
INTSXP, // L,
REALSXP, // X,
REALSXP, // Y,
INTSXP, // N,
REALSXP, // U,
REALSXP, // V,
INTSXP // ERR
};
static R_FortranMethodDef fortranMethods[] = {
{"idbvip", (DL_FUNC) &F77_SUB(idbvip), 13, idbvip_t}, /* interpp.old */
{"sdbi3p", (DL_FUNC) &F77_SUB(sdbi3p), 16, sdbi3p_t}, /* interpp.new */
{"idsfft", (DL_FUNC) &F77_SUB(idsfft), 14, idsfft_t}, /* interp.old */
{"sdsf3p", (DL_FUNC) &F77_SUB(sdsf3p), 17, sdsf3p_t}, /* interp.new */
{"uvip3p", (DL_FUNC) &F77_SUB(uvip3p), 8, uvip3p_t}, /* aspline */
{"intrpl", (DL_FUNC) &F77_SUB(intrpl), 7, intrpl_t} /* aspline */
};
void
R_init_akima(DllInfo *info)
{
R_registerRoutines(info,
NULL /*cMethods*/, NULL /*callMethods*/,
fortranMethods, NULL/*externalMethods*/);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment