Exemplo n.º 1
0
 // GID - GID
 friend gid_type operator- (gid_type const& lhs, gid_type const& rhs)
 {
     boost::uint64_t lsb = lhs.id_lsb_ - rhs.id_lsb_;
     boost::uint64_t msb = lhs.id_msb_ - rhs.id_msb_;
     if (lsb > lhs.id_lsb_)
         --msb;
     return gid_type(msb, lsb);
 }
Exemplo n.º 2
0
 // GID + GID
 friend gid_type operator+ (gid_type const& lhs, gid_type const& rhs)
 {
     boost::uint64_t lsb = lhs.id_lsb_ + rhs.id_lsb_;
     boost::uint64_t msb = lhs.id_msb_ + rhs.id_msb_;
     if (lsb < lhs.id_lsb_ || lsb < rhs.id_lsb_)
         ++msb;
     return gid_type(msb, lsb);
 }
Exemplo n.º 3
0
 friend gid_type operator& (gid_type const& lhs, std::uint64_t rhs)
 {
     return gid_type(lhs.id_msb_, lhs.id_lsb_ & rhs);
 }
Exemplo n.º 4
0
 // GID - std::uint64_t
 friend gid_type operator- (gid_type const& lhs, std::uint64_t rhs)
 { return lhs - gid_type(0, rhs); }
Exemplo n.º 5
0
Arquivo: name.hpp Projeto: adk9/hpx
 // GID + boost::uint64_t
 friend gid_type operator+ (gid_type const& lhs, boost::uint64_t rhs)
 { return lhs + gid_type(0, rhs); }