示例#1
0
        public static ulong ReverseEndianness1(ulong value)
        {
            // Operations on 32-bit values have higher throughput than
            // operations on 64-bit values, so decompose.

            return(((ulong)ReverseEndiannessUIntTests.ReverseEndianness1((uint)value) << 32)
                   + ReverseEndiannessUIntTests.ReverseEndianness1((uint)(value >> 32)));
        }
 public static int ReverseEndianness1(int value)
 {
     return((int)ReverseEndiannessUIntTests.ReverseEndianness1((uint)value));
 }
示例#3
0
 public static ulong HostToNetworkOrder(ulong host)
 {
     return((ulong)((ReverseEndiannessUIntTests.HostToNetworkOrder((uint)host) & 0xffffffffL) << 0x20) | (ulong)(ReverseEndiannessUIntTests.HostToNetworkOrder((uint)(host >> 0x20)) & 0xffffffffL));
 }