Borderbasix

mpfspecial.hpp
Go to the documentation of this file.
2 
3 template<>
4 void INIT_ELEM<pol<mon_mpf,Scl<MPF> > >(void *ptr, int size)
5 {
6  typedef pol<mon_mpf,Scl<MPF> > pol;
7  int nbelem=size/sizeof(pol),k=0;
8  for(pol *i=(pol*)ptr;k<nbelem;i++,k++)
9  mpf_init(((i->ind).coeff.rep()));
10  }
11 
12 template<>
13 void INIT_ELEM<Scl<MPF> >(void * ptr, int size)
14 {
15  int nbelem=size/sizeof(Scl<MPF>),k=0;
16  for(Scl<MPF> *i=(Scl<MPF> *)ptr;k<nbelem;i++,k++)
17  mpf_init(i->rep())
18  ;
19 }
20 template<>
21 void CLEAR_ELEM<Scl<MPF> >(void * ptr, int size)
22 {
23  //cout<<"clear elem "<<endl;
24  int nbelem=size/sizeof(Scl<MPF>),k=0;
25  for(Scl<MPF> *i=(Scl<MPF>*)ptr;k<nbelem;i++,k++)
26  mpf_clear(i->rep());
27 }
28 template<>
29 void CLEAR_ELEM<pol<mon_mpf,Scl<MPF> > >(void *ptr, int size)
30 {
31  typedef pol<mon_mpf,Scl<MPF> > pol;
32  typedef pol::coeff_t coeff;
33  int nbelem=size/sizeof(pol),k=0;
34  for(pol *i=(pol*)ptr;k<nbelem;i++,k++)
35  {
36  mpf_clear(((i->ind).coeff.rep()));
37 // MAC_REV_FREE<coeff>(i->nf,i->size*sizeof(coeff));
38  }
39 }
40 
41 
42 
43 
Definition: pol.hpp:6
T coeff_t
Definition: pol.hpp:9
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
Monom< Scl< MPF >, mon::rep_t > mon_mpf
Definition: mpfspecial.hpp:1
Home  |  Download & InstallContributions