bridge/class-master/depend/pari/src/modules/mpqs.c
/* mpqs() calls the following (after recording avma) to allocate GENs for
 * the current polynomial and self-initialization scratchpad data on the
 * PARI stack.  This space is released by mpqs() itself at the end. */
mpqs() calls the following (after recording avma) to allocate GENs for
the current polynomial and self-initialization scratchpad data on the
PARI stack.  This space is released by mpqs() itself at the end.
mpqs () calls the following ( after recording avma ) to allocate GENs for the current polynomial and self - initialization scratchpad data on the PARI stack . This space is released by mpqs () itself at the end .
static void
mpqs_poly_ctor(mpqs_handle_t *h)
{
  mpqs_int32_t i;
  long size_per = h->omega_A * sizeof(mpqs_per_A_prime_t);
  h->per_A_pr = (mpqs_per_A_prime_t *) pari_calloc(size_per);
  h->A = cgeti(h->omega_A + 2);
  h->B = cgeti(h->omega_A + 3);
#ifdef MPQS_DEBUG
  h->C = cgeti(h->omega_A + 4);
#endif
  for (i = 0; i < h->omega_A; i++)
    h->per_A_pr[i]._H = cgeti(h->omega_A + 2);
}
static void mpqs_poly_ctor ( mpqs_handle_t * h ) { mpqs_int32_t i ; long size_per = h -> omega_A * sizeof ( mpqs_per_A_prime_t ) ; h -> per_A_pr = ( mpqs_per_A_prime_t * ) pari_calloc ( size_per ) ; h -> A = cgeti ( h -> omega_A + 2 ) ; h -> B = cgeti ( h -> omega_A + 3 ) ; #ifdef MPQS_DEBUG h -> C = cgeti ( h -> omega_A + 4 ) ; #endif for ( i = 0 ; i < h -> omega_A ; i ++ ) h -> per_A_pr [ i ] . _H = cgeti ( h -> omega_A + 2 ) ; }
mpqs() calls the following (after recording avma) to allocate GENs for
 the current polynomial and self-initialization scratchpad data on the
 PARI stack.
mpqs () calls the following ( after recording avma ) to allocate GENs for the current polynomial and self - initialization scratchpad data on the PARI stack .
/* Sizing:  A is the product of omega_A primes, each well below word
   * size.
   * |B| is bounded by (omega_A + 4) * A, so can have at most one word
   * more, and that's generous.
   * |C| is less than A*M^2, so can take at most two words more than A.
   * The array H holds residues modulo A, so the same size as used for A
   * is sufficient. */ /* the handle starts out all zero, so in particular bin_index and index_i
   * are initially 0.
   * TODO: index_j currently initialized in mqps() but this is going to
   * change. */