Beispiel #1
0
void call_dgels(char *trans, int m, int n, int nrhs, 
                double *a, int lda, double *b, int ldb, 
                double *work, int lwork, int *info) {
   DECLARE_CHARACTER( TRANS, 1 );
   DECLARE_INTEGER(M);
   DECLARE_INTEGER(N);
   DECLARE_INTEGER(NRHS);
   DECLARE_INTEGER(LDA);
   DECLARE_INTEGER(LDB);
   DECLARE_INTEGER(LWORK);
   DECLARE_INTEGER(INFO);

   slaStringExport(trans, TRANS, 1);
   M = m;
   N = n;
   NRHS = nrhs;
   LDA = lda;
   LDB = ldb;
   LWORK = lwork;
   F77_CALL(dgels)( CHARACTER_ARG(TRANS), 
                    INTEGER_ARG(&M),
                    INTEGER_ARG(&N),
                    INTEGER_ARG(&NRHS),
                    DOUBLE_ARRAY_ARG(a),
                    INTEGER_ARG(&LDA),
                    DOUBLE_ARRAY_ARG(b),
                    INTEGER_ARG(&LDB),
                    DOUBLE_ARRAY_ARG(work),
                    INTEGER_ARG(&LWORK),
                    INTEGER_ARG(&INFO)
                    TRAIL_ARG(TRANS) );
   *info = INFO;
}
Beispiel #2
0
void hdrInD( char *param,
             char *xname,
             char *item,
             int comp,
             double *value,
             int *status ) {

  DECLARE_CHARACTER_DYN(fparam);
  DECLARE_CHARACTER_DYN(fxname);
  DECLARE_CHARACTER_DYN(fitem);

  F77_CREATE_CHARACTER(fparam,strlen( param ));
  cnf_exprt( param, fparam, fparam_length );
  F77_CREATE_CHARACTER(fxname,strlen( xname ));
  cnf_exprt( xname, fxname, fxname_length );
  F77_CREATE_CHARACTER(fitem,strlen( item ));
  cnf_exprt( item, fitem, fitem_length );

  F77_LOCK( F77_CALL(hdr_ind)( CHARACTER_ARG(fparam),
                     CHARACTER_ARG(fxname),
                     CHARACTER_ARG(fitem),
                     INTEGER_ARG(&comp),
                     DOUBLE_ARRAY_ARG(value),
                     INTEGER_ARG(status)
                     TRAIL_ARG(fparam)
                     TRAIL_ARG(fxname)
                     TRAIL_ARG(fitem) ); )
Beispiel #3
0
/* Define a function called ast_resample_ukern1 which has a suitable
   interface to allow it to be passed as an interpolation function to
   the C interface of astResample<X> in the case where the "interp"
   parameter is set to AST__UKERN1. In turn, it invokes the equivalent
   user-supplied FORTRAN 77 interpolation function, a pointer to which
   should previously have been stored in the static variable
   "ast_resample_FINTERP". */
static void ast_resample_ukern1( double offset, const double params[],
                                 int flags, double *value ) {
   DECLARE_INTEGER(STATUS);
   int *status;

/* Obtain the C status and then invoke the FORTRAN 77 interpolation
   function via the stored pointer. */
   status = astGetStatusPtr;
   STATUS = astStatus;
   ( *ast_resample_FINTERP )( DOUBLE_ARG(&offset),
                              DOUBLE_ARRAY_ARG(params),
                              INTEGER_ARG(&flags),
                              DOUBLE_ARG(value),
                              INTEGER_ARG(&STATUS) );

/* Set the C status to the returned FORTRAN 77 status. */
   astSetStatus( STATUS );
}