Esempio n. 1
0
bool bug1(globalID globalZone)
{
   if (globalZone < globalID(0))
      return false;
   else
      return true;
}
Esempio n. 2
0
int main(int argc, char *argv[])
   {
  // The error is that this is unparsed as: "class globalID value = (globalID::globalID(100)7) + 5;"
     globalID value = globalID(100) * 7 + 5 ;

     return 0 ;
   }
int SparseTileLayoutData<Dim>::globalID(int i0) const
{
  // Make sure the point is in our domain.

  PAssert(Dim == 1);

  // Call the Loc version.

  Loc<Dim> loc;
  loc[0] = i0;
  return globalID(loc);
}
int SparseTileLayoutData<Dim>::globalID(int i0, int i1, int i2, int i3) const
{
  // Make sure the point is in our domain.

  PAssert(Dim == 4);

  // Call the Loc version.

  Loc<Dim> loc;
  loc[0] = i0;
  loc[1] = i1;
  loc[2] = i2;
  loc[3] = i3;
  return globalID(loc);
}
Esempio n. 5
0
 inline globalID operator * (const int i) const { return globalID(m_gid * i) ;}
Esempio n. 6
0
 inline globalID operator - (const int i) const { return globalID(*this) -= i ;}
Esempio n. 7
0
 inline globalID operator * (const globalID &g) const { return globalID (m_gid * g.m_gid) ;}
Esempio n. 8
0
 inline globalID operator / (const int &i) const { return globalID (m_gid / i) ;}
Esempio n. 9
0
 inline globalID operator - (const globalID &g) const { return globalID(*this) -= g ;}
Esempio n. 10
0
 inline globalID operator -- (int) {return globalID(m_gid--) ;}
Esempio n. 11
0
 inline globalID operator ++ (int) {return globalID(m_gid++) ;}
Esempio n. 12
0
void bug4(struct outer *ptr)
{
   if (ptr->g.valB <= 16 && ptr->g.valA < globalID(200000)) {
     /* stuff */ ;
   }
}
Esempio n. 13
0
void bug3(globalID len) {
   for (globalID i=globalID(0); i<len; ++i) {
   }
}