version 1.1, 2000/10/10 05:23:20 |
version 1.2, 2003/03/23 20:17:34 |
|
|
/* -*- mode: C; coding: euc-japan -*- */ |
/* -*- mode: C; coding: euc-japan -*- */ |
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/cmolen.c,v 1.1 2000/10/10 05:23:20 ohara Exp $ */ |
|
|
/* This module is needed by bconv.c */ |
/* This module is needed by bconv.c */ |
|
|
Line 17 static int cmolen_cmo_list(cmo_list* c); |
|
Line 17 static int cmolen_cmo_list(cmo_list* c); |
|
static int cmolen_cmo_mathcap(cmo_mathcap* c); |
static int cmolen_cmo_mathcap(cmo_mathcap* c); |
static int cmolen_cmo_null(cmo_null* c); |
static int cmolen_cmo_null(cmo_null* c); |
static int cmolen_cmo_string(cmo_string* c); |
static int cmolen_cmo_string(cmo_string* c); |
|
#if defined(WITH_GMP) |
static int cmolen_cmo_zz(cmo_zz* c); |
static int cmolen_cmo_zz(cmo_zz* c); |
|
#endif /* WITH_GMP */ |
static int cmolen_cmo_monomial32(cmo_monomial32* c); |
static int cmolen_cmo_monomial32(cmo_monomial32* c); |
|
|
__inline__ |
__inline__ |
Line 57 static int cmolen_cmo_monomial32(cmo_monomial32* c) |
|
Line 59 static int cmolen_cmo_monomial32(cmo_monomial32* c) |
|
return len + cmolen_cmo(c->coef); |
return len + cmolen_cmo(c->coef); |
} |
} |
|
|
|
#if defined(WITH_GMP) |
static int cmolen_cmo_zz(cmo_zz* c) |
static int cmolen_cmo_zz(cmo_zz* c) |
{ |
{ |
int len = abs(c->mpz->_mp_size); |
int len = abs(c->mpz->_mp_size); |
return sizeof(int) + len*sizeof(int); |
return sizeof(int) + len*sizeof(int); |
} |
} |
|
#endif /* WITH_GMP */ |
|
|
static int cmolen_cmo_distributed_polynomial(cmo_distributed_polynomial* c) |
static int cmolen_cmo_distributed_polynomial(cmo_distributed_polynomial* c) |
{ |
{ |
Line 97 int cmolen_cmo(cmo* c) |
|
Line 101 int cmolen_cmo(cmo* c) |
|
case CMO_MONOMIAL32: |
case CMO_MONOMIAL32: |
size += cmolen_cmo_monomial32((cmo_monomial32 *)c); |
size += cmolen_cmo_monomial32((cmo_monomial32 *)c); |
break; |
break; |
|
#if defined(WITH_GMP) |
case CMO_ZZ: |
case CMO_ZZ: |
size += cmolen_cmo_zz((cmo_zz *)c); |
size += cmolen_cmo_zz((cmo_zz *)c); |
break; |
break; |
|
#endif /* WITH_GMP */ |
case CMO_DISTRIBUTED_POLYNOMIAL: |
case CMO_DISTRIBUTED_POLYNOMIAL: |
size += cmolen_cmo_distributed_polynomial((cmo_distributed_polynomial *)c); |
size += cmolen_cmo_distributed_polynomial((cmo_distributed_polynomial *)c); |
break; |
break; |