Beispiel #1
0
    {DIV_EQ, "DIV_EQ", op_doeq_divide},
    {PLUS_EQ, "PLUS_EQ", op_doeq_add},
    {MINUS_EQ, "MINUS_EQ", op_doeq_subtract},
    {OPTIONAL_ASSIGN, "OPTIONAL_ASSIGN", op_optional_assign, JUMP},
    {OPTIONAL_END, "OPTIONAL_END", op_optional_end},
    {SCATTER_START, "SCATTER_START", op_scatter_start},
    {SCATTER_END, "SCATTER_END", 0},

    /* Bitwise Operators */
    {'&', "&", op_bwand},
    {'|', "|", op_bwor},
    {SHLEFT, "SHLEFT", op_bwshl},
    {SHRIGHT, "SHRIGHT", op_bwshr},

    /* Object variable functions */
    FDEF(F_ADD_VAR, "add_var", add_var)
        FDEF(F_DEL_VAR, "del_var", del_var)
        FDEF(F_SET_VAR, "set_var", set_var)
        FDEF(F_GET_VAR, "get_var", get_var)
        FDEF(F_INHERITED_VAR, "inherited_var", inherited_var)
        FDEF(F_DEFAULT_VAR, "default_var", default_var)
        FDEF(F_CLEAR_VAR, "clear_var", clear_var)
        FDEF(F_VARIABLES, "variables", variables)
        /* debugger */
        FDEF(F_DEBUG_CALLERS, "debug_callers", debug_callers)
        FDEF(F_CALL_TRACE, "call_trace", call_trace)
        /* Object method functions */
        FDEF(F_LIST_METHOD, "list_method", list_method)
        FDEF(F_ADD_METHOD, "add_method", add_method)
        FDEF(F_DEL_METHOD, "del_method", del_method)
        FDEF(F_METHOD_BYTECODE, "method_bytecode", method_bytecode)
Beispiel #2
0
    not explicitly declared.    This is necessary when we link with
    a C++ compiler because the linkage changes as the declarations
    are (currently) within extern "C" blocks.
*/
#include <R_ext/Callbacks.h>
//#include <Rdynpriv.h>

//#include "basedecl.h"


//#define FDEF(name, n)  {#name, (DL_FUNC) &F77_SYMBOL(name), n, NULL}
// We don't care what the values of these symbols are at this point
#define FDEF(name, n)  {#name, (DL_FUNC) NULL, n, NULL}
static R_FortranMethodDef fortranMethods[] = {
    /* LINPACK */
    FDEF(dqrcf, 8), // qr and auxiliaries
    FDEF(dqrdc2, 9),
    FDEF(dqrqty, 7),
    FDEF(dqrqy, 7),
    FDEF(dqrrsd, 7),
    FDEF(dqrxb, 7),
    FDEF(dtrco, 6), // .kappa_tri

    {NULL, NULL, 0}
};

void R_init_base(DllInfo *dll)
{
//    R_registerRoutines(dll, NULL, callMethods, fortranMethods, NULL);
	R_registerRoutines(dll, NULL, NULL, fortranMethods, NULL);
    R_useDynamicSymbols(dll, FALSE);
Beispiel #3
0
    CALLDEF_DO(rmultinom, 3),

    {NULL, NULL, 0}
};

#define FDEF(name)  {#name, (DL_FUNC) &F77_SUB(name), sizeof(name ## _t)/sizeof(name ## _t[0]), name ##_t}


static R_NativePrimitiveArgType lowesw_t[] = { REALSXP, INTSXP, REALSXP, INTSXP};
static R_NativePrimitiveArgType lowesp_t[] = {
    INTSXP, REALSXP, REALSXP, REALSXP, REALSXP, INTSXP, REALSXP};


static const R_FortranMethodDef FortEntries[] = {
    FDEF(lowesw),
    FDEF(lowesp),
    {"setppr", (DL_FUNC) &F77_SUB(setppr), 6},
    {"smart", (DL_FUNC) &F77_SUB(smart), 16},
    {"pppred", (DL_FUNC) &F77_SUB(pppred), 5},
    {"setsmu", (DL_FUNC) &F77_SUB(setsmu), 0},
    {"rbart", (DL_FUNC) &F77_SUB(rbart), 20},
    {"bvalus", (DL_FUNC) &F77_SUB(bvalus), 7},
    {"supsmu", (DL_FUNC) &F77_SUB(supsmu), 10},
    {"hclust", (DL_FUNC) &F77_SUB(hclust), 11},
    {"hcass2", (DL_FUNC) &F77_SUB(hcass2), 6},
    {"kmns", (DL_FUNC) &F77_SUB(kmns), 17},
    {"eureka", (DL_FUNC) &F77_SUB(eureka), 6},
    {"stl", (DL_FUNC) &F77_SUB(stl), 18},
    {NULL, NULL, 0}
};