mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-22 18:58:47 +00:00
refactor: remove TODOs (resolves #71)
This commit is contained in:
parent
b68c804b46
commit
a748010a38
@ -32,9 +32,6 @@ public static class IntrinsicExtensions
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||
public static Vector64<byte> CorrectBoolean(this Vector64<byte> vector)
|
||||
{
|
||||
// TODO: AdvSimd implementation.
|
||||
// TODO: WasmSimd implementation. (?)
|
||||
|
||||
Vector64<byte> output = IntrinsicUtility.GetUninitializedVector64<byte>();
|
||||
|
||||
for (var i = 0; i < Vector64<byte>.Count; i++)
|
||||
|
@ -150,9 +150,6 @@ public static class IntrinsicUtility
|
||||
return HorizontalOr_Sse(left, right);
|
||||
}
|
||||
|
||||
// TODO: AdvSimd implementation.
|
||||
// TODO: WasmSimd implementation. (?)
|
||||
|
||||
return HorizontalOrInternal_Fallback(left, right);
|
||||
}
|
||||
|
||||
|
@ -79,14 +79,6 @@ public static class SpanExtensions
|
||||
public static bool Contains<T>(this ReadOnlySpan<T> span, T value) where T : struct, Enum
|
||||
{
|
||||
#if NET6_0_OR_GREATER
|
||||
// Use MemoryMarshal.CreateSpan instead of using creating new Span instance from pointer will trim down a lot of
|
||||
// instructions on Release mode.
|
||||
|
||||
// Also use reference instead of MemoryMarshal.Cast to remove boundary check (or something, it just result in something
|
||||
// like that).
|
||||
|
||||
// TODO: Figure out some kind of way to directly pass the Span directly into Contains call, which make method smaller and
|
||||
// more prone to inlining...
|
||||
unsafe
|
||||
{
|
||||
#pragma warning disable CS8500
|
||||
@ -481,7 +473,6 @@ public static class SpanExtensions
|
||||
{
|
||||
fixed (bool* pSource = source)
|
||||
{
|
||||
// TODO Hasn't been tested since March 6th 2023 (Reason: Unavailable hardware).
|
||||
Vector128<ulong> vector1 = AdvSimd.LoadVector128((byte*)pSource).CorrectBoolean().AsUInt64();
|
||||
Vector128<ulong> vector2 = AdvSimd.LoadVector128((byte*)(pSource + 16)).CorrectBoolean().AsUInt64();
|
||||
|
||||
@ -566,7 +557,6 @@ public static class SpanExtensions
|
||||
{
|
||||
fixed (bool* pSource = source)
|
||||
{
|
||||
// TODO Hasn't been tested since March 6th 2023 (Reason: Unavailable hardware).
|
||||
Vector64<byte> load = AdvSimd.LoadVector64((byte*)pSource);
|
||||
return unchecked((byte)(IntegerPackingMagic * load.CorrectBoolean().AsUInt64().GetElement(0) >> 56));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user