#if !defined  HAVE_BITSUBSETQ_H__
#define       HAVE_BITSUBSETQ_H__

#include "fxttypes.h"

inline bool is_subset(ulong u, ulong e)
// Return whether the set bits of u are a subset of the set bits of e.
// That is, as bitsets, test whether u is a subset of e.
{
    return  ( (u & e)==u );
//    return  ( (u & ~e)==0 );
//    return  ( (~u | e)!=0 );
}
// -------------------------

inline bool is_proper_subset(ulong u, ulong e)
// Return whether u (as bitset) is a proper subset of e.
{
//    return  ( (u<e) && ( (u & e)==u ) );
    return  ( (u<e) & ((u & e)==u) );  // avoid branch
}
// -------------------------

#endif  // !defined HAVE_BITSUBSETQ_H__
