- Timestamp:
- Oct 14, 1998, 3:34:04 PM (26 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 6a7528729789dfcc28e43e9a7ba6d072c986c7d7
- Parents:
- 8b4670dada34587a5623038b51515950afe93e51
- Location:
- MP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
MP/MP/ChangeLog
r8b4670d r71b3e0 1 1 1998-10-14 Olaf Bachmann <obachman@mathematik.uni-kl.de> 2 3 * MP_PariBigInt.[c,h]: Added memory management functions for Pari 4 Bigints 2 5 3 6 * MP_TcpTransp.c: added MP_KillLink, -MPrsh option to MP_OpenLink -
MP/MP/MP.h
r8b4670d r71b3e0 1651 1651 char *buffer)); 1652 1652 EXTERN long IMP_PariBigIntAsciiSize _ANSI_ARGS_((MP_ApInt_t mp_number)); 1653 1654 /* Memory mamagment for Pari BigInts: 1655 By default, the following functions are simple cgeti and empty; 1656 You can reset this at run-time to whatever fits your needs 1657 */ 1658 EXTERN GEN (*IMP_AllocCgeti) _ANSI_ARGS_((long)); 1659 EXTERN void (*IMP_FreeCgeti) _ANSI_ARGS_((GEN)); 1653 1660 1654 1661 #ifdef HAVE_GMP_PARI_CONVERSIONS -
MP/MP/MP_PariBigInt.c
r8b4670d r71b3e0 32 32 #endif 33 33 34 /************************************************************************** 35 * 36 * Memory management routines 37 * 38 *************************************************************************/ 39 40 /* By default, simply use cgeti, on alloc */ 41 GEN IMP_DefaultAllocCgeti(long l) 42 { 43 return cgeti(l); 44 } 45 /* and, do nothing on free */ 46 void IMP_DefaultFreeCgeti(GEN number) 47 {} 48 /* However, you might also use IMP_RawMemAlloc */ 49 GEN IMP_RawMemAllocCgeti(long length) 50 { 51 GEN z = (GEN) IMP_RawMemAllocFnc( ((ulong)length)<<TWOPOTBYTES_IN_LONG ); 52 z[0]=evaltyp(1)+evalpere(1)+evallg(length); 53 return( z ); 54 } 55 void IMP_RawMemFreeCgeti(GEN number) 56 { 57 IMP_RawMemFreeFnc(number); 58 } 59 60 GEN (*IMP_AllocCgeti)(long) = IMP_DefaultAllocCgeti; 61 void (*IMP_FreeCgeti)(GEN) = IMP_DefaultFreeCgeti; 62 63 /************************************************************************** 64 * 65 * Put/Get 66 * 67 *************************************************************************/ 68 34 69 MP_Status_t IMP_PutPariBigInt(MP_Link_pt link, MP_ApInt_t mp_number) 35 70 { … … 81 116 82 117 /* Initialize the number */ 83 number = cgeti(length+2);118 number = IMP_AllocCgeti(length+2); 84 119 setlgef(number, length+2); 85 120 setsigne(number, sign); … … 164 199 if (length < 0 ) length = -length; 165 200 166 pnum = cgeti(length + 2);201 pnum = IMP_AllocCgeti(length + 2); 167 202 setlgef(pnum, length + 2); 168 203 setsigne(pnum, sign); -
MP/MP/h/MP_PariBigInt.h
r8b4670d r71b3e0 34 34 EXTERN long IMP_PariBigIntAsciiSize _ANSI_ARGS_((MP_ApInt_t mp_number)); 35 35 36 /* Memory mamagment for Pari BigInts: 37 By default, the following functions are simple cgeti and empty; 38 You can reset this at run-time to whatever fits your needs 39 */ 40 EXTERN GEN (*IMP_AllocCgeti) _ANSI_ARGS_((long)); 41 EXTERN void (*IMP_FreeCgeti) _ANSI_ARGS_((GEN)); 42 36 43 #ifdef HAVE_GMP_PARI_CONVERSIONS 37 44 #include "gmp.h" -
MP/MPT/ChangeLog
r8b4670d r71b3e0 1 1998-10-14 Olaf Bachmann <obachman@mathematik.uni-kl.de> 2 3 * MPT_ApNumber.c: MPT_DeleteApInt, MPT_InitCpyApInt is determined 4 w.r.t. MP_DEFAULT_APINT_FORMAT and extended to 5 MP_DEFAULT_APINT_FORMAT == MP_PARI 6 1 7 Sat Jun 28 15:27:59 1997 Olaf Bachmann <obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)> 2 8
Note: See TracChangeset
for help on using the changeset viewer.