version 1.91, 2015/08/06 10:01:52 |
version 1.96, 2016/06/28 11:59:30 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.90 2015/08/06 00:43:21 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.95 2016/03/31 01:40:11 noro Exp $ |
*/ |
*/ |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <gmp.h> |
#include <gmp.h> |
#include <mpfr.h> |
#include <mpc.h> |
|
#include <limits.h> |
|
|
/* from mpfr-impl.h */ |
/* from mpfr-impl.h */ |
#define MPFR_PREC(x) ((x)->_mpfr_prec) |
#define MPFR_PREC(x) ((x)->_mpfr_prec) |
|
|
#define MPFR_LAST_LIMB(x) ((MPFR_PREC (x) - 1) / GMP_NUMB_BITS) |
#define MPFR_LAST_LIMB(x) ((MPFR_PREC (x) - 1) / GMP_NUMB_BITS) |
#define MPFR_LIMB_SIZE(x) (MPFR_LAST_LIMB (x) + 1) |
#define MPFR_LIMB_SIZE(x) (MPFR_LAST_LIMB (x) + 1) |
|
|
|
#define RAT_CEIL(nm,dn) (((nm)+(dn)-1)/((dn))) |
|
#define MPFR_LIMB_SIZE_REAL(x) (RAT_CEIL(MPFR_PREC((x)),sizeof(mp_limb_t)*CHAR_BIT) * (sizeof(mp_limb_t)/sizeof(int)) ) |
|
#define MPFR_LIMB_SIZE_BODY(x) (RAT_CEIL(MPFR_PREC((x)),sizeof(unsigned int)*CHAR_BIT)) |
|
|
#if defined(hpux) |
#if defined(hpux) |
#include <netinet/in.h> |
#include <netinet/in.h> |
# define setbuffer(FP,buf,siz) setvbuf(FP,buf,_IOFBF,siz) |
# define setbuffer(FP,buf,siz) setvbuf(FP,buf,_IOFBF,siz) |
#endif |
#endif |
|
|
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
#if !defined(VISUAL) && !defined(__MINGW32__) |
#include <unistd.h> |
#include <unistd.h> |
#include <sys/param.h> |
#include <sys/param.h> |
#endif |
#endif |
|
|
#define alloca(x) __builtin_alloca(x) |
#define alloca(x) __builtin_alloca(x) |
#endif |
#endif |
|
|
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
#if defined(VISUAL) || defined(__MINGW32__) |
#include <limits.h> |
#include <limits.h> |
#include <malloc.h> |
#include <malloc.h> |
#endif |
#endif |
Line 94 typedef void * pointer; |
|
Line 99 typedef void * pointer; |
|
#include <strings.h> |
#include <strings.h> |
#else |
#else |
#include <string.h> |
#include <string.h> |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
#if defined(VISUAL) || defined(__MINGW32__) |
#define index(s,c) strchr(s,c) |
#define index(s,c) strchr(s,c) |
#define bzero(s,len) memset(s,0,len) |
#define bzero(s,len) memset(s,0,len) |
#define bcopy(x,y,len) memcpy(y,x,len) |
#define bcopy(x,y,len) memcpy(y,x,len) |
Line 663 struct order_spec { |
|
Line 668 struct order_spec { |
|
int nv; |
int nv; |
int ispot; /* 1 means Position over Term (Pos then Term) */ |
int ispot; /* 1 means Position over Term (Pos then Term) */ |
int pot_nelim; /* size of positions for pot-elimination order */ |
int pot_nelim; /* size of positions for pot-elimination order */ |
|
int *top_weight; |
|
int module_rank; |
|
int *module_top_weight; |
union { |
union { |
int simple; |
int simple; |
struct { |
struct { |
Line 772 typedef unsigned int ModNum; |
|
Line 780 typedef unsigned int ModNum; |
|
#define GCFREE(p) Risa_GC_free(p) |
#define GCFREE(p) Risa_GC_free(p) |
#define CALLOC(d,e) MALLOC((d)*(e)) |
#define CALLOC(d,e) MALLOC((d)*(e)) |
|
|
#if !defined(__CYGWIN__) && (defined(__GNUC__) || defined(vax) || defined(apollo) || defined(alloca) || defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__)) |
#if !defined(__CYGWIN__) && (defined(__GNUC__) || defined(vax) || defined(apollo) || defined(alloca) || defined(VISUAL) || defined(__MINGW32__)) |
#define ALLOCA(d) alloca(d) |
#define ALLOCA(d) alloca(d) |
#else |
#else |
#define ALLOCA(d) MALLOC(d) |
#define ALLOCA(d) MALLOC(d) |
#endif |
#endif |
|
|
/* for setjmp/longjmp compatibility */ |
/* for setjmp/longjmp compatibility */ |
#if defined(__CYGWIN__) || defined(__x86_64) |
#if defined(__CYGWIN__) || (defined(__x86_64) && !defined(__MINGW32__)) |
#define JMP_BUF sigjmp_buf |
#define JMP_BUF sigjmp_buf |
#define SETJMP(x) sigsetjmp(x,~0) |
#define SETJMP(x) sigsetjmp(x,~0) |
#define LONGJMP(x,y) siglongjmp(x,y) |
#define LONGJMP(x,y) siglongjmp(x,y) |
Line 1257 void rtime_init(void); |
|
Line 1265 void rtime_init(void); |
|
void setmod_gf2n(P); |
void setmod_gf2n(P); |
void mt_sgenrand(unsigned long); |
void mt_sgenrand(unsigned long); |
unsigned long mt_genrand(void); |
unsigned long mt_genrand(void); |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
#if defined(VISUAL) || defined(__MINGW32__) |
void srandom(unsigned int); |
void srandom(unsigned int); |
unsigned int random(void); |
unsigned int random(void); |
#endif |
#endif |
Line 2668 void mkwcz(int k,int l,Z *t); |
|
Line 2676 void mkwcz(int k,int l,Z *t); |
|
int remzi(Z n,int m); |
int remzi(Z n,int m); |
|
|
|
|
#if 0 && !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
#if 0 && !defined(VISUAL) && !defined(__MINGW32__) |
void bzero(const void *,int); |
void bzero(const void *,int); |
void bcopy(const void *,void *,int); |
void bcopy(const void *,void *,int); |
char *index(char *,int); |
char *index(char *,int); |