Borderbasix

mpzspecial.hpp
Go to the documentation of this file.
2 template<>
3 void INIT_ELEM<pol<mon_mpz,Scl<MPZ> > >(void *ptr, int size)
4 {
5  typedef pol<mon_mpz,Scl<MPZ> > ppol;
6  int nbelem=size/sizeof(ppol),k=0;
7  for(ppol *i=(ppol*)ptr;k<nbelem;i++,k++)
8  mpz_init(&((i->ind).coeff.rep()));
9 }
10 template<>
11 void INIT_ELEM<Scl<MPZ> >(void * ptr, int size)
12 {
13  int nbelem=size/sizeof(Scl<MPZ>),k=0;
14  for(Scl<MPZ> *i=(Scl<MPZ> *)ptr;k<nbelem;i++,k++)
15  mpz_init(&i->rep())
16  ;
17 }
18 template<>
19 void CLEAR_ELEM<Scl<MPZ> >(void * ptr, int size)
20 {
21  //cout<<"clear elem "<<endl;
22  int nbelem=size/sizeof(Scl<MPZ>),k=0;
23  for(Scl<MPZ> *i=(Scl<MPZ>*)ptr;k<nbelem;i++,k++)
24  mpz_clear(&i->rep());
25 }
26 
27 template<>
28 void CLEAR_ELEM<pol<mon_mpz,Scl<MPZ> > >(void *ptr, int size)
29 {
30  typedef pol<mon_mpz,Scl<MPZ> > pol;
31  typedef pol::coeff_t coeff;
32  int nbelem=size/sizeof(pol),k=0;
33  for(pol *i=(pol*)ptr;k<nbelem;i++,k++)
34  {
35  mpz_clear(&((i->ind).coeff.rep()));
36  //MAC_REV_FREE<coeff>(i->nf,i->size*sizeof(coeff));
37  }
38 }
Definition: pol.hpp:6
T coeff_t
Definition: pol.hpp:9
Monom< Scl< MPZ >, mon::rep_t > mon_mpz
Definition: mpzspecial.hpp:1
MSKint32t k
Definition: mosek.h:2713
Definition: Scl.hpp:26
R rep_t
Definition: Monom.hpp:27
MSKint32t MSKint32t MSKint32t i
Definition: mosek.h:2278
#define pol
Definition: pol2ter.hpp:3
Multivariate monomials.
Definition: Monom.hpp:21
Home  |  Download & InstallContributions