Example #1
0
 /// <inheritdoc cref="IBinaryInteger{TSelf}.RotateRight(TSelf, int)" />
 public static uint RotateRight(uint value, int rotateAmount) => BitOperations.RotateRight(value, rotateAmount);
Example #2
0
 /// <inheritdoc cref="IBinaryInteger{TSelf}.TrailingZeroCount(TSelf)" />
 public static uint TrailingZeroCount(uint value) => (uint)BitOperations.TrailingZeroCount(value);
Example #3
0
        //
        // IBinaryInteger
        //

        /// <inheritdoc cref="IBinaryInteger{TSelf}.LeadingZeroCount(TSelf)" />
        public static uint LeadingZeroCount(uint value) => (uint)BitOperations.LeadingZeroCount(value);
Example #4
0
 /// <inheritdoc cref="IBinaryInteger{TSelf}.PopCount(TSelf)" />
 public static uint PopCount(uint value) => (uint)BitOperations.PopCount(value);
Example #5
0
 private static uint QueueRound(uint hash, uint queuedValue)
 {
     return(BitOperations.RotateLeft(hash + queuedValue * Prime3, 17) * Prime4);
 }
Example #6
0
 private static uint MixState(uint v1, uint v2, uint v3, uint v4)
 {
     return(BitOperations.RotateLeft(v1, 1) + BitOperations.RotateLeft(v2, 7) + BitOperations.RotateLeft(v3, 12) + BitOperations.RotateLeft(v4, 18));
 }
Example #7
0
 /// <inheritdoc cref="IBinaryNumber{TSelf}.Log2(TSelf)" />
 public static ulong Log2(ulong value) => (ulong)BitOperations.Log2(value);
Example #8
0
 private static uint Round(uint hash, uint input)
 {
     return(BitOperations.RotateLeft(hash + input * Prime2, 13) * Prime1);
 }
Example #9
0
        //
        // IBinaryNumber
        //

        /// <inheritdoc cref="IBinaryNumber{TSelf}.IsPow2(TSelf)" />
        public static bool IsPow2(ulong value) => BitOperations.IsPow2(value);
Example #10
0
 /// <inheritdoc cref="IBinaryInteger{TSelf}.TrailingZeroCount(TSelf)" />
 public static ulong TrailingZeroCount(ulong value) => (ulong)BitOperations.TrailingZeroCount(value);
Example #11
0
 /// <inheritdoc cref="IBinaryInteger{TSelf}.RotateRight(TSelf, int)" />
 public static ulong RotateRight(ulong value, int rotateAmount) => BitOperations.RotateRight(value, rotateAmount);
Example #12
0
 /// <inheritdoc cref="IBinaryInteger{TSelf}.PopCount(TSelf)" />
 public static ulong PopCount(ulong value) => (ulong)BitOperations.PopCount(value);
Example #13
0
 /// <inheritdoc cref="IBinaryInteger{TSelf}.LeadingZeroCount(TSelf)" />
 public static ulong LeadingZeroCount(ulong value) => (ulong)BitOperations.LeadingZeroCount(value);