Changeset 28a3d2 in git


Ignore:
Timestamp:
Jul 5, 2018, 3:45:35 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
7c8188b8f91cdb0c85b5db214f0baa451bb5186afec0e698195c1310cb8930215e910b220b8ad5ce
Parents:
33ca139a30b77f4102096eb5d3ec15ce75f4aa77
Message:
ssiLink: use ssiInfo to read coeffs
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/links/ssiLink.cc

    r33ca13 r28a3d2  
    403403  if (cf->cfReadFd!=NULL)
    404404  {
    405      return n_ReadFd(d->f_read,cf);
     405     return n_ReadFd(d,cf);
    406406  }
    407407  else if (getCoeffType(cf) == n_transExt)
  • libpolys/coeffs/coeffs.h

    r33ca13 r28a3d2  
    276276
    277277   void    (*cfWriteFd)(number a, const ssiInfo *f, const coeffs r);
    278    number  (*cfReadFd)( s_buff f, const coeffs r);
     278   number  (*cfReadFd)( const ssiInfo *f, const coeffs r);
    279279
    280280   /// Inplace: a *= b
     
    988988
    989989/// io via ssi:
    990 static FORCE_INLINE number n_ReadFd( s_buff f, const coeffs r)
     990static FORCE_INLINE number n_ReadFd( const ssiInfo *f, const coeffs r)
    991991{ STATISTIC(n_ReadFd); assume(r != NULL); assume(r->cfReadFd != NULL); return r->cfReadFd(f, r); }
    992992
  • libpolys/coeffs/flintcf_Q.cc

    r33ca13 r28a3d2  
    511511  mpq_clear(m);
    512512}
    513 static number ReadFd(s_buff f, const coeffs)
     513static number ReadFd(const ssiInfo *d, const coeffs)
    514514{
    515515  // format: len a_len .. a_0
    516516  fmpq_poly_ptr aa=(fmpq_poly_ptr)omAlloc(sizeof(fmpq_poly_t));
    517517  fmpq_poly_init(aa);
    518   int l=s_readint(f);
     518  int l=s_readint(d->f_read);
    519519  mpz_t nm;
    520520  mpz_init(nm);
     
    524524  {
    525525
    526     s_readmpz_base (f,nm, SSI_BASE);
     526    s_readmpz_base (d->f_read,nm, SSI_BASE);
    527527    mpq_set_num(m,nm);
    528     s_readmpz_base (f,nm, SSI_BASE);
     528    s_readmpz_base (d->f_read,nm, SSI_BASE);
    529529    mpq_set_den(m,nm);
    530530    fmpq_poly_set_coeff_mpq(aa,i,m);
  • libpolys/coeffs/flintcf_Zn.cc

    r33ca13 r28a3d2  
    444444}
    445445
    446 static number ReadFd(s_buff f, const coeffs r)
     446static number ReadFd(const ssiInfo *d, const coeffs r)
    447447{
    448448  // format: len a_len .. a_0
    449449  nmod_poly_ptr aa=(nmod_poly_ptr)omAlloc(sizeof(nmod_poly_t));
    450450  nmod_poly_init(aa,r->ch);
    451   int l=s_readint(f);
     451  int l=s_readint(d->f_read);
    452452  unsigned long ul;
    453453  for (int i=l;i>=0;i--)
    454454  {
    455     unsigned long ul=s_readlong(f);
     455    unsigned long ul=s_readlong(d->f_read);
    456456    nmod_poly_set_coeff_ui(aa,i,ul);
    457457  }
  • libpolys/coeffs/longrat.cc

    r33ca13 r28a3d2  
    32223222}
    32233223
    3224 static number nlReadFd(s_buff f, const coeffs)
     3224static number nlReadFd(const ssiInfo *d, const coeffs)
    32253225{
    32263226  int sub_type=-1;
    3227   sub_type=s_readint(f);
     3227  sub_type=s_readint(d->f_read);
    32283228  switch(sub_type)
    32293229  {
     
    32333233         number n=nlRInit(0);
    32343234         mpz_init(n->n);
    3235          s_readmpz(f,n->z);
    3236          s_readmpz(f,n->n);
     3235         s_readmpz(d->f_read,n->z);
     3236         s_readmpz(d->f_read,n->n);
    32373237         n->s=sub_type;
    32383238         return n;
     
    32423242       {// read mpz_t
    32433243         number n=nlRInit(0);
    3244          s_readmpz(f,n->z);
     3244         s_readmpz(d->f_read,n->z);
    32453245         n->s=3; /*sub_type*/
    32463246         #if SIZEOF_LONG == 8
     
    32513251     case 4:
    32523252       {
    3253          LONG dd=s_readlong(f);
     3253         LONG dd=s_readlong(d->f_read);
    32543254         //#if SIZEOF_LONG == 8
    32553255         return INT_TO_SR(dd);
     
    32633263         number n=nlRInit(0);
    32643264         mpz_init(n->n);
    3265          s_readmpz_base (f,n->z, SSI_BASE);
    3266          s_readmpz_base (f,n->n, SSI_BASE);
     3265         s_readmpz_base (d->f_read,n->z, SSI_BASE);
     3266         s_readmpz_base (d->f_read,n->n, SSI_BASE);
    32673267         n->s=sub_type-5;
    32683268         return n;
     
    32713271       {// read raw mpz_t
    32723272         number n=nlRInit(0);
    3273          s_readmpz_base (f,n->z, SSI_BASE);
     3273         s_readmpz_base (d->f_read,n->z, SSI_BASE);
    32743274         n->s=sub_type=3; /*subtype-5*/
    32753275         #if SIZEOF_LONG == 8
  • libpolys/coeffs/modulop.cc

    r33ca13 r28a3d2  
    377377}
    378378
    379 static number npReadFd(s_buff f, const coeffs)
     379static number npReadFd(const ssiInfo *d, const coeffs)
    380380{
    381381  // read int
    382382  int dd;
    383   dd=s_readint(f);
     383  dd=s_readint(d->f_read);
    384384  return (number)(long)dd;
    385385}
Note: See TracChangeset for help on using the changeset viewer.