/usr/include/osl/bits/pieceMask64.h is in libosl-dev 0.8.0-1.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | /* pieceMask64.h
*/
#ifndef PIECEMASK64_H
#define PIECEMASK64_H
#include "osl/bits/mask.h"
namespace osl
{
namespace container
{
class PieceMask64
{
protected:
Mask64 mask;
public:
static int numToIndex(int) { return 0; }
static int numToOffset(int num) { return num; }
PieceMask64() { resetAll(); }
explicit PieceMask64(misc::Mask64 const& m) : mask(m) {}
protected:
misc::Mask64& mutableMask(int) { return mask; }
public:
const misc::Mask64& getMask(int) const { return mask; }
void resetAll()
{
mask=misc::Mask64::makeDirect(0uLL);
}
void setAll()
{
mask=misc::Mask64::makeDirect(0xffffffffffuLL);
}
PieceMask64& operator^=(const PieceMask64& o)
{
mask ^= o.mask;
return *this;
}
PieceMask64& operator&=(const PieceMask64& o)
{
mask &= o.mask;
return *this;
}
PieceMask64& operator|=(const PieceMask64& o)
{
mask |= o.mask;
return *this;
}
PieceMask64& operator-=(const PieceMask64& o)
{
mask -= o.mask;
return *this;
}
PieceMask64& operator+=(const PieceMask64& o)
{
mask += o.mask;
return *this;
}
bool none() const { return mask.none(); }
bool hasMultipleBit() const
{
if (none())
return false;
return mask.hasMultipleBit();
}
/**
* bit の数を2まで数える
* @return 0,1,2 (2の場合は2以上)
*/
int countBit2() const
{
if (none())
return 0;
return mask.countBit2();
}
int
#ifdef __GNUC__
__attribute__ ((pure))
#endif
countBit() const
{
return mask.countBit();
}
int takeOneBit()
{
assert(!none());
return mask.takeOneBit();
}
};
} // namespace container
using container::PieceMask64;
} // namespace osl
#endif /* PIECEMASK64_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|