/****************************************************************** * Interface to translate Fortran calls to MPUTIL routines * into calls to GMP *****************************************************************/ #include #include #ifdef _CRAY #include "gmp.h" #include /* CVS info */ /* $Date: 2005/01/10 20:46:01 $ */ /* $Revision: 1.2 $ */ /* $RCSfile: wrap.c,v $ */ /* $Name: rel_5 $ */ static char cvs_info[] = "BMARKGRP $Date: 2005/01/10 20:46:01 $ $Revision: 1.2 $ $RCSfile: wrap.c,v $ $Name: rel_5 $"; MPADD ( MP_INT *sum, MP_INT *u, MP_INT *v ) { mpz_add ( sum, u, v ); } MPMULT ( MP_INT *prod, MP_INT *u, MP_INT *v ) { mpz_mul ( prod, u, v ); } MPMOD ( MP_INT *rem, MP_INT *dividend, MP_INT *modulus ) { mpz_mod ( rem, dividend, modulus ); } MPSET ( MP_INT *dest, MP_INT *source ) { mpz_set ( dest, source ); } MPFROMSTRING ( MP_INT *X, _fcd fstring ) { char *cstring; int i, length; cstring = _fcdtocp(fstring); length = strlen(cstring); for (i=0;i