version 1.2, 2003/03/23 20:17:35 |
version 1.3, 2003/03/30 08:05:22 |
|
|
/* -*- mode: C; coding: euc-japan -*- */ |
/* -*- mode: C; coding: euc-japan -*- */ |
/* $OpenXM: OpenXM/src/ox_toolkit/dump.c,v 1.1 2000/10/10 05:23:20 ohara Exp $ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/dump.c,v 1.2 2003/03/23 20:17:35 ohara Exp $ */ |
|
|
/* |
/* |
This module includes functions for sending/receiveng CMO's. |
This module includes functions for sending/receiveng CMO's. |
Line 18 static void dump_cmo_mathcap(cmo_mathcap* m); |
|
Line 18 static void dump_cmo_mathcap(cmo_mathcap* m); |
|
static void dump_cmo_null(cmo_null* m); |
static void dump_cmo_null(cmo_null* m); |
static void dump_cmo_string(cmo_string* m); |
static void dump_cmo_string(cmo_string* m); |
static void dump_cmo_monomial32(cmo_monomial32* c); |
static void dump_cmo_monomial32(cmo_monomial32* c); |
#if defined(WITH_GMP) |
|
static void dump_cmo_zz(cmo_zz* c); |
static void dump_cmo_zz(cmo_zz* c); |
static void dump_mpz(mpz_ptr mpz); |
static void dump_mpz(mpz_ptr mpz); |
#endif /* WITH_GMP */ |
|
static void dump_string(void *s, int len); |
static void dump_string(void *s, int len); |
static void dump_integer(int x); |
static void dump_integer(int x); |
|
|
Line 48 static void dump_integer(int x) |
|
Line 46 static void dump_integer(int x) |
|
dump_string(&x, sizeof(int)); |
dump_string(&x, sizeof(int)); |
} |
} |
|
|
#if defined(WITH_GMP) |
|
static void dump_mpz(mpz_ptr mpz) |
static void dump_mpz(mpz_ptr mpz) |
{ |
{ |
int i; |
int i; |
Line 58 static void dump_mpz(mpz_ptr mpz) |
|
Line 55 static void dump_mpz(mpz_ptr mpz) |
|
dump_integer(mpz->_mp_d[i]); |
dump_integer(mpz->_mp_d[i]); |
} |
} |
} |
} |
#endif /* WITH_GMP */ |
|
|
|
__inline__ |
__inline__ |
static void dump_cmo_null(cmo_null* m) |
static void dump_cmo_null(cmo_null* m) |
Line 105 static void dump_cmo_monomial32(cmo_monomial32* c) |
|
Line 101 static void dump_cmo_monomial32(cmo_monomial32* c) |
|
dump_cmo(c->coef); |
dump_cmo(c->coef); |
} |
} |
|
|
#if defined(WITH_GMP) |
|
static void dump_cmo_zz(cmo_zz* c) |
static void dump_cmo_zz(cmo_zz* c) |
{ |
{ |
dump_mpz(c->mpz); |
dump_mpz(c->mpz); |
} |
} |
#endif /* WITH_GMP */ |
|
|
|
static void dump_cmo_distributed_polynomial(cmo_distributed_polynomial* m) |
static void dump_cmo_distributed_polynomial(cmo_distributed_polynomial* m) |
{ |
{ |
Line 150 void dump_cmo(cmo* m) |
|
Line 144 void dump_cmo(cmo* m) |
|
case CMO_MONOMIAL32: |
case CMO_MONOMIAL32: |
dump_cmo_monomial32((cmo_monomial32 *)m); |
dump_cmo_monomial32((cmo_monomial32 *)m); |
break; |
break; |
#if defined(WITH_GMP) |
|
case CMO_ZZ: |
case CMO_ZZ: |
dump_cmo_zz((cmo_zz *)m); |
dump_cmo_zz((cmo_zz *)m); |
break; |
break; |
#endif /* WITH_GMP */ |
|
case CMO_DISTRIBUTED_POLYNOMIAL: |
case CMO_DISTRIBUTED_POLYNOMIAL: |
dump_cmo_distributed_polynomial((cmo_distributed_polynomial *)m); |
dump_cmo_distributed_polynomial((cmo_distributed_polynomial *)m); |
break; |
break; |