return NonPackedContainsValueType(ref searchSpace, value, length);
}
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
internal static bool NonPackedContainsValueType<T>(ref T searchSpace, T value, int length) where T : struct, INumber<T>
{
Debug.Assert(length >= 0, "Expected non-negative length");
return NonPackedIndexOfValueType<TValue, TNegator>(ref searchSpace, value, length);
}
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
internal static int NonPackedIndexOfValueType<TValue, TNegator>(ref TValue searchSpace, TValue value, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
}
// having INumber<T> constraint here allows to use == operator and get better perf compared to .Equals
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
internal static int NonPackedIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
return NonPackedIndexOfAnyValueType<TValue, TNegator>(ref searchSpace, value0, value1, value2, length);
}
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
internal static int NonPackedIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, int length) where T : struct, INumber<T>
=> IndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, value3, length);
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int IndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, TValue value3, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, T value4, int length) where T : struct, INumber<T>
=> IndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, value3, value4, length);
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int IndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, TValue value3, TValue value4, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value, int length) where T : struct, INumber<T>
=> LastIndexOfValueType<T, Negate<T>>(ref searchSpace, value, length);
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfValueType<TValue, TNegator>(ref TValue searchSpace, TValue value, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, length);
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, length);
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, value3, length);
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, TValue value3, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, T value4, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, value3, value4, length);
- [MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, TValue value3, TValue value4, int length)
where TValue : struct, INumber<TValue>
where TNegator : struct, INegator<TValue>