Exemple #1
0
Scope::Scope()
 {
 data=0;
 stfgnd(getgc("8x13","red"));
 stw(32768);
 sth(256);
 }
Exemple #2
0
Hslider::Hslider()
 {
 rept=0;
 rate=0;
 delay=0;
 wsize=50;
 pos=0;
 dsize=100;
 fn=0;
 tevent=0;
 start=-1;
 min=8;
 sth(20);
 }
 ///Randomly rotate sgrid_m
 void NonLocalECPComponent::randomize_grid(ParticleSet::ParticlePos_t& sphere, bool randomize)
 {
   if(randomize) {
     //const RealType twopi(6.28318530718);
     //RealType phi(twopi*Random()),psi(twopi*Random()),cth(Random()-0.5),
     RealType phi(TWOPI*((*myRNG)())), psi(TWOPI*((*myRNG)())), cth(((*myRNG)())-0.5);
     RealType sph(std::sin(phi)),cph(std::cos(phi)),
     sth(std::sqrt(1.0-cth*cth)),sps(std::sin(psi)),
     cps(std::cos(psi));
     TensorType rmat( cph*cth*cps-sph*sps, sph*cth*cps+cph*sps,-sth*cps,
         -cph*cth*sps-sph*cps,-sph*cth*sps+cph*cps, sth*sps,
         cph*sth,             sph*sth,             cth     );
     SpherGridType::iterator it(sgridxyz_m.begin());
     SpherGridType::iterator it_end(sgridxyz_m.end());
     SpherGridType::iterator jt(rrotsgrid_m.begin());
     int ic=0;
     while(it != it_end) {*jt = dot(rmat,*it); ++it; ++jt;}
     //copy the radomized grid to sphere
     std::copy(rrotsgrid_m.begin(), rrotsgrid_m.end(), sphere.begin());
   } else {
     //copy sphere to the radomized grid
     std::copy(sphere.begin(), sphere.end(), rrotsgrid_m.begin());
   }
 }
inline void MacroAssembler::sth(Register d, Register s1, RegisterOrConstant s2) { sth(d, Address(s1, s2)); }
inline void MacroAssembler::sth(Register d, const Address& a, int offset) {
  if (a.has_index()) { assert(offset == 0, ""); sth(d, a.base(), a.index()        ); }
  else               {                          sth(d, a.base(), a.disp() + offset); }
}
inline void MacroAssembler::clrh( Register s1, int simm13a) { sth( G0, s1, simm13a); }
inline void MacroAssembler::clrh( Register s1, Register s2) { sth( G0, s1, s2 ); }