public static TagBits MakeComplement(ref TagBits rhs)
    {
        TagBits result = new TagBits(ref rhs);

        result.Complement();
        return(result);
    }
Пример #2
0
        /// <summary>
        /// Complements a set of tag bits.
        /// </summary>
        /// <param name="bits">The bits to complement.</param>
        /// <returns>The complement of those bits.</returns>
        internal static TagBits Not(TagBits bits)
        {
            ulong hibits = bits.bits7;

            bits.Complement();
            bits.bits7 = GetLowerBits(bits.bits7) | NotHighBits(hibits);
            return(bits);
        }
Пример #3
0
        /// <summary>
        /// Complements a set of tag bits.
        /// </summary>
        /// <param name="bits">The bits to complement.</param>
        /// <returns>The complement of those bits.</returns>
        internal static TagBits Not(TagBits bits)
        {
            bits.Complement();
            // Box into a type to allow the fields to be changed
            object localBits = bits;
            ulong  hibits    = FIFTH_BIT.Get(localBits);

            FIFTH_BIT.Set(localBits, GetLowerBits(hibits) | NotHighBits(hibits));
            return((TagBits)localBits);
        }